I have a WebDataGrid with 2 columns, A & B.
Column A is readonly.
Column B has a DropDownProvider to pick the value.
I want the data items in B to be dependent on the value in A. So for example:If A = 1, then B = {red, pink, salmon}If A = 2, then B = {blue, cyan, turquoise}etc.
I have gotten the behavior I want using Load-on-Demand on column B, i.e: loadItems(A.value, false).However, this forces me to Load-on-Demand each time I open the drop down which makes the UI a bit slow.
Is there a better way to do this? Maybe use Load-on-Demand, but somehow cache the results on the client side? Any ideas?
Hello Walter,
We appreciate the sample.
It demonstrates the issue that you experience and I was able to understand your query.
The issue happens because DropDownProvider is one per column.
It is one WebDropDown control which is loaded every time when a cell from the column
It loads the items every time cell from this column enters in edit mode.
I guess you are trying to achieve something like keeping the items in the view state.
Currently this can be done if you use WebDropDown in a templated column only .
Let me know if you feel that I haven't answered your question.
Hi Todor,
See my attached solution, the page in question is DropDownProviderPerRow.aspx
For each row on the grid, Column A will have a different value . Column B will have a value and a DropDownProvider which has 3 different options. The options in the DDP are populated based on the value of Column A.
Thanks,Walter
Hi ssd,
If I understand you right, you have readonly column A and Column B, which is dependable on the column A value. So once the data is loaded in the Grid, no matter what I choose from the drop down, the values in the drop down won't be changed? then why you will load them on every selection changesd of the drop down??
Maybe I don't understand you right, but can you send us a sample, with code to acquire better vision of your problem
Thanks,