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,
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.
Best Regards,
Vasil Pavlov
Associate Software Developer
Infragistics, Inc.
Hi Vasil,
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?
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.
As your scenario is a little specific and requires some customization, I am in the process of preparing a working sample for you. I will keep you updated and send it to you as soon as it's ready.
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.