This is a migrated thread and some comments may be shown as answers.

Filtering databound column based on other column

2 Answers 40 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jota
Top achievements
Rank 1
Jota asked on 21 Nov 2011, 04:09 PM
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 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 24 Nov 2011, 10:37 AM
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,
Alexander
the Telerik team

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

0
Jota
Top achievements
Rank 1
answered on 24 Nov 2011, 01:14 PM
Thanks a lot, that was what I was looking for.

Tags
GridView
Asked by
Jota
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Jota
Top achievements
Rank 1
Share this question
or