Populate second cell from combobox selection

2 posts, 0 answers
  1. Silveron
    Silveron avatar
    8 posts
    Member since:
    Sep 2012

    Posted 07 Mar 2013 Link to this post

    I have an access database, which has a table, which has two fields.  Item and Price.  Very simple.

    I created a vb.net project, on that form is a radgrid.  The radgrid I created two columns.  The first column is a combbox (item), the second a textbox (price).  I bound the combobox to the accesstable.item.  When I run the project, I can see the items in the combobox.  However what I want to do is when I select an item, I want the price column to populate with the price associated with that item.

    Can anyone help?
  2. Stefan
    Admin
    Stefan avatar
    2911 posts

    Posted 12 Mar 2013 Link to this post

    Hello Silveron,

    Thank you for writing.

    You can achieve the desired functionality by using the CollectionChanged event of RadGridView.Rows collection to handle the programmatically added rows and the ValueChanged event of the control to handle changing the values in the combo box cells. Attached you can find a sample project demonstrating this approach.

    I hope that you find it useful.

    Regards,
    Stefan
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Back to Top