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.
Sorry, but the attached .RAR is giving me a CRC error, so I have attached the .PDF in the attached .ZIP file
There seems to be a problem with the .pdf file wrapped in both the .rar and .zip archives, so have saved the .docx in a .rar archive to see if that works.
Many thanks Martin - your one line of code did work.
Hello Mark,
I am following up to see if the information provided has resolved this matter.
Please let me know if you have any further questions concerning this matter.
Try with the following code:
$("#vmDocumentList").igGridSelection("selectedRow").element.find("select").val();
Hope this helps,Martin PavlovInfragistics, Inc.
Martin
I have been able to populate the SELECT with my model data as per the attached example.
Please would you tell me how I establish what the value of the DocumentTypeId is in the selected igGrid row.
I can obtain the other column values from the selected row, but cannot get the selected DocumentType.
Please assist.
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?