Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
dropdown provider
posted

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:

Product Color_type
Car

Red

Car Yellow
Car Orange
Iphone 128GB
Iphone 256GB

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

Products Color_type
Car

(DropDwon)
Red
Yellow
Orange

Iphone

(DropDown)
128GB
256GB

is it possible?

Parents
  • 1700
    Offline posted

    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

Reply Children