ComboBoxColumn with value

8 posts, 0 answers
  1. Johnny
    Johnny avatar
    30 posts
    Member since:
    Jan 2012

    Posted 06 Feb 2012 Link to this post

    Hi,

    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.
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 07 Feb 2012 Link to this post

    Hello Johnny,

    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.

    Kind regards,
    Maya
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Johnny
    Johnny avatar
    30 posts
    Member since:
    Jan 2012

    Posted 09 Feb 2012 Link to this post

    Hi,

    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.
  4. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 10 Feb 2012 Link to this post

    Hello Johnny,

    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 ? 

    Greetings,
    Maya
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  5. Johnny
    Johnny avatar
    30 posts
    Member since:
    Jan 2012

    Posted 14 Feb 2012 Link to this post

    Hi,

    Thanks for providing that thread. I was able to use the example as the guidance to get what I wanted.
  6. Johnny
    Johnny avatar
    30 posts
    Member since:
    Jan 2012

    Posted 14 Feb 2012 Link to this post

    Actually, I could be able to get one combo box column work, and that combo box column works very similar as the one from the example.   Since controlling in my grid is kinda complicated, I still can't able to get that cascaded column output the value, which means combo A controls combo B and combo B not only display string of Name in column B but it also display Number in column C. Do you have any example project that I can use it as a reference? since the schedule to finish this grid is pretty tight, I wish I can have more time to think through. Thank you very much. !!
  7. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 15 Feb 2012 Link to this post

    Hi Johnny,

    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. 

    Kind regards,
    Maya
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  8. Johnny
    Johnny avatar
    30 posts
    Member since:
    Jan 2012

    Posted 15 Feb 2012 Link to this post

    Thank you!! It works perfectly.
Back to Top