Hi,
I'm new to using Infragistics in my asp.net MVC app. I have an IgGrid with few fields among which is a dropdown list. The editMode of the grid while updating is a dialog. I need few fields to be hidden/showing depending on the value selected on the dropdown. Is this possible?
Regards,
Guru
Hello Guruprasad,
Thank you for posting in our forum.
Let me clarify something first: if I understand correctly you want to open the edit dialog for a certain row, then select something from its dropdown and you need to filter the rows below the dialog modal? Is that correct?
Best Regards,
Vasil Pavlov
Associate Software Developer
Infragistics, Inc.
Hi Vasil,
Thanks for replying back:). On the edit dialog, I have a dropdown field and a text field among other fields. For a particular value of the dropdown, I need the textfield to be visible on the dialog and made required. For other values of the dropdown, the field needs to be hidden in the dialog and made not required.
CustomComboMvcApplication1.zip
I am uploading the MVC sample as I promised you. When you click on a row and the edit dialog opens, if the value of "Worldwide Shipping" column is "Yes", then "Shipping Date" is a required field. If it is "No", then the input is disabled.
I am using some custom event handlers and "igValidator" to do this.
Also notice I am using a formatter function to display the "igCombo" values correctly in the igGrid.
Thanks a lot for the example:) This is what I was trying to do. I have a few questions though:
1. How did you get that selector reference "#igDecision_updating_dialog_container_content table tbody ...."? And is there a better way to get the reference, maybe assigning an ID to the dropdown and using that?
2. Is there an option for me to make the field visible/invisible from the dialog?
If you want to hide the Date input, then you have to target the div element containing it by using this selector: $("#igDecision_updating_dialog_container_content > table > tbody > tr:nth-child(3)");
After that you could call jQuery’s hide() and show() methods to hide/show the input.
If you need any additional assistance, feel free to contact me.