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

[Solved] RAD Grid Filter Not working when some columns are hidden..

2 Answers 309 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JD
Top achievements
Rank 1
JD asked on 14 May 2009, 07:00 PM
Hi there,

I m evaluating the RAD Grid and got stuck...I have a grid with AutoGenerateColumns=true and AllowFilteringByColumn=true.
and i m hiding some columns in ItemDataBound event of grid. Now when I m trying to filter i m not getting correct result.
Actually Filter event is looking for the column which is hidden.

Assume that Grid has column A B C D...Z and I m hiding column B C D E . Now When I filter on Column G it has filterPair of Column B.
So on Column G it is trying to filter the data of some other column.

Basically its not filtering for the current column index.
And Same thing for Grouping..I have ShowGroupPanel="True" and AllowDragToGroup="true"
When I try to drag the column it is dropping the different column due to the hidden columns.

Is there any way I can get the index of filter column in either data bound or item command event so I can change the FilterExpression to correct column name.



2 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetoslav
Telerik team
answered on 18 May 2009, 08:53 AM
Hi JD,

You need to use the ColumnCreated event of the grid to hide the columns as shown in the sample attached to this post.

I hope it will prove helpful for your implementation.

Best wishes,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
JD
Top achievements
Rank 1
answered on 20 May 2009, 03:18 PM
Thanks it worked.
Tags
Grid
Asked by
JD
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
JD
Top achievements
Rank 1
Share this question
or