Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
binding ComboBox in infragistics grid using asp.net mvc helpers
posted

Hi All,

      I need to bind a combo box in infragistics grid on button click.I am not able to see the combo box on grid binding.I want to know why I am not able to do so.Please help.Thanks

  • 1740
    Offline posted

    Hello,

    The combo is initializing when we are on edit mode. That's why you can't see the combo. This is the normal behavior.

    When you fire the button click event you can get your combo by this line of code:

    $("#grid").igGridUpdating("editorForKey", "Your field name").data().igCombo.

    And after that you can set your dataSource and bind the combo.

    I want to clarify that this is not recommended approach to bind the combo on button click. Could you please describe your workflow with more details, and we will try to recommend you better way to achieve this solution.

    If you have further questions, please feel free to contact us.

    • 0
      Offline posted in reply to Aleksandar Kamenov

      Hello:

      I'm try to generate the combobox data source from taked it from columnsetting of the grid, like:
             comboRightsDataSource = grid.data("igGridUpdating").options.columnSettings[2].editorOptions.dataSource;
      But It's not working for me because I need to take from hierarchy grid and I have the combobox on the columns layout. Do you have any idea how to take it?

      • 60
        posted in reply to Aleksandar Kamenov

        Thanks for the reply,but when I am using ("#grid").igGridUpdating("editorForKey", "Your field name").data().igCombo.I am getting the data as null on button click.Can u tell me the what is the editorForKey property?


        Thanks

        • 1740
          Offline posted in reply to Madhuri Arutla

          Hello,

          This line of code should execute when you are on button click method and you should get your grid by correct id. If your approach is like that I'm describing please send me the isolated working sample to see what exactly is the problem.

          I'm looking forward your reply.

          • 60
            posted in reply to Aleksandar Kamenov

            Yes Of Course I am changing the with my column key from the Grid

            • 1740
              Offline posted in reply to Madhuri Arutla

              Hello,

              EditorForKey (Gets the editor for a column by the column key). I want to clarify that you change the string ("your field name") with your column key from the grid.

              I'm looking forward your reply.