Hi, I have a webdatagrid (Product, Color_type) the products is text field, and the Color_type is Dropdown Provider cell.
my DB is is like:
Red
so what I need is when I load my webdatagrid, it will load the drop down with only available Color_type for the products
the results should be
(DropDwon)RedYellowOrange
(DropDown)128GB256GB
is it possible?
Hello,
This could be achieved by using the dropdown opening client-side event and using the loadItems method of the dropdown provider there. In the dropdown opening event the value of the Product column should be obtained and provided as an argument of the loadItems method. Then on server-side the ItemRequested event should be used to set the data source for the dropdown provider based on the value of the Product column.
I have prepared a small sample to demonstrate this approach, which I am attaching below.
Please test the sample on your side and let me know if you have any questions or concerns.
Regards, Ivan Kitanov
DDBasonOnAnotherColumn.zip
Hi Ivan, I'm really sorry that I forgot to mentioned that I'm using Vb.net, please accept my apologies. I tried to follow your example and to code it into vb.net code, all good except below line, I didn't manage to write it in vb.net code, would you please help.
this.DropDownProvider1.EditorControl.ItemsRequested += EditorControl_ItemsRequested;
and I have another question, is it possible to assign a DropdownProvider to specific row and cell? for example, I have DropDownProvider_1 and DropDownProvider_2, I want to assign the DropDownProvider_1 to rows(1).item("Editor") and DropDownProvider_2 to rows(2).item("Editor") , both cells are in the same column, is it possible for each cell (cells are under one column) in each row to have different DropDownProvider ? can this be achieved in Code Behind?