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
940
Combo (dropdown) in Grid
posted

I am having great difficulty in getting a igCombo as a column within my igGrid.

I have been through all of the Infragistics samples without success and am battling to work this out.

I have a MVC view which is passed a Model from a controller containing a list of Documents (vmDocumentItems) and DocumentTypes (vmDocumentTypeItems) in separate view models.

I need to populate the igGrid with vmDocumentItems model data and the igCombo with the vmDocumentTypeItems model data

Please take a look at the attached PDF document which contains the code sample.

I would appreciate if someone would assist me with this requirement.

igGridCombo.rar
Parents Reply
  • 23953
    Offline posted in reply to Mark Dakyns

    Hello Mark,

    What you can do is to use a formatter function for the DocumentTypeId column. Inside the formatter you can build a SELECT html. I'm attaching a simple JavaScript sample which demonstrates this approach. Note that I didn't use the igCombo in this case, because this will require more code to instantiate and destroy each combo when a page is changed. Also creating igCombo for each row will affect the performance of the page.

    I can see that you're not using the Updating feature so it's not clear to me what will be the purpose of this column if the user cannot update the data. Is it for visualization purposes only?

    I guess that you're not using the igGrid.cellClick event (when opening the file in new window), because you don't have a primary key, right?

    Hope this helps,
    Martin Pavlov
    Infragistics, Inc. 

    igGrid_customColumn.zip
Children