Filtering databound column based on other column

3 posts, 0 answers
  1. Jota
    Jota avatar
    2 posts
    Member since:
    Apr 2008

    Posted 21 Nov 2011 Link to this post

    Let me try to explain my problem.

    I have a databound gridview... I have 2 different columns, one of the columns is a combobox column which takes it´s data from a database.
    Let´s call 1st column "A" and the combobox column "B".
    Column A can only accept 2 different values.
    Column B takes it´s values from database based on the 2 possible values on column A.

    Value 1 (in column A) has 12 different possible values in column B, and value 2 (in column A) has other 12 different values in column B. (one to many relation in database)
    Right now I fill the combobox with the 24 different values (12 for value 1 and 12 for value 2, I get this values from database cause when I load the gridview I already know this 2 different values that will be allowed in column A).

    What I want to achieve is that once I insert a value (from the 2 possible values) in column A, column B filters it´s values to only the 12 related to the value in column A and not the 24 related to the 2 possible values... so user won´t be able to select a value in column B not related to value in column A. And this has to be done on each row, that means that when the filter is applied it is only applied to the selected row, leaving the other rows with it´s own filter based on value in column A.

    Any help will be welcomed

    Thanks in advance

  2. Alexander
    Alexander avatar
    306 posts

    Posted 24 Nov 2011 Link to this post

    Hello Jota,

    Please review this KB article demonstrating how to create RadComboBoxEditor which data depends on the value of another RadGridView cell. Let us know if we can assist you further.

    Best regards,
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

  3. Jota
    Jota avatar
    2 posts
    Member since:
    Apr 2008

    Posted 24 Nov 2011 Link to this post

    Thanks a lot, that was what I was looking for.

Back to Top