I am designing a grid that has three columns, and two of those are ComboBoxColumn and the last column is an expression column. I would like to get all three columns working with each other, which means selection from column A would determines the available selection choices in column B, and column C would display the number that binds to the selection of column B. To better illustrate my design, considering the grid display information about continents, countries, and population, where column A (continents) controls the selection of countries in column B and column C displays the number of population from the country selection from column B. So far I have gotten both of the column A and B working, but I have difficulty to get the last column bind to the selection from column B. I have my column B's DataMemberBinding binds to population, and set the expression for column C binds to population too. However, once I try to test my app, the app would crash. How can I get my design working? Thanks.
7 Answers, 1 is accepted
I would recommend you to run through this blog post for a reference. Considering GridViewExpressionColumn, you can use both our online documentation and demos for more information.
Let me know in case you need any further assistance.
Maya
the Telerik team
Thanks for the reply, I actually got the cascaded columns working by following the way as the blog post. I am trying to get my last column work now. I have tried many different approaches to get it work, however, it is not working so far. Currently I set up the number associate with each of the selection from the drop down box as another class, and with ID associate with it. And I have an express column binds to the number I would like to display whenever the drop down box update its value. However, the express column only shows the ID number but not the actual value I would like to display.
Based on the provided information I get the impression that you are trying to create your expression from different sources (the one of the grid and the one of the combo box column). Am I right or am I missing something ? Could you take a look at this forum thread and the sample project attached there (GridViewExpressionColumn_ExprFromTwoSources) and let me know whether it corresponds to your scenario ?
Maya
the Telerik team
Thanks for providing that thread. I was able to use the example as the guidance to get what I wanted.
You can try updating the last column once the property for the second one (Country) is changed. I am sending you a sample project illustrating a possible way to go. Although it is for WPF, the same approach could be used in Silverlight as well.
Please take a look at it and let me know whether it corresponds to your requirements.
Maya
the Telerik team