Hi,
Iam using a dropdownprovider in a cell in the webdatagrid and setting value field and text field .
How can I access both values binded to the dropdownprovider(id,text) client side or server sidcause , cause I have another cell that I want set its value from dropdownprovider selected value when select an item and set the dropdownprovider cell text by the selected item text
Thanks
Thank you for posting in our community.
I am assuming that you are looking for cascading behavior of dropdowns in WebDataGrid. I have created and attached a small sample demonstrating this.
If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me along with steps to reproduce it.
Looking forward to hearing from you.
76581.Sample.zip
hi ,
tankyou for you solution but thats not what i need.
i just want to get the dropdown values textvalue and idvalue in the rowupdating event code behind
When you choose to use an editor provider for example DropDownProvider and assign it to a particular ColumnKey, this editor provider will appear whenever you start to edit a cell from the specified column. This means that if you have 25 rows, you won't have 25 DropDownProviers, instead, you will have one DropDownProvider, which will be called on cell editing (when the cell starts to be in edit mode).
To get the instance of the provider in the OnRowUpdating event handler, you can do the following:
protected void wdg_RowUpdating(object sender, Infragistics.Web.UI.GridControls.RowUpdatingEventArgs e) { DropDownProvider ddp = ((DropDownProvider)wdg.EditorProviders["providerID"]); var value = ddp.EditorControl.CurrentValue; }
I have modified and attached the previous sample for your reference. Please test it on your side and let me know whether it helps you achieve your requirements.
6371.Sample.zip