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

[Solved] Column visibility with sort and silter

3 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
william johnson
Top achievements
Rank 1
william johnson asked on 28 Jan 2010, 05:01 PM
Hi

I have a grid running with some custom code to add remove columns (I do this by setting the visability of the columns to true/false as necseeary)

My problem is if i set a column to visability false, and then that column had a sort or filter already active on it then that sort or filter persists when the column is invisible

what do i need to do to remove the sort and filter from the column when making it invisible?

Thanks

3 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 29 Jan 2010, 01:00 PM
Hi william,

Try setting the column's CurrentFilterValue = "" and CurrentFilterFunction=GridKnownFunction.NoFilter.

I hope this helps.

Kind regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
william johnson
Top achievements
Rank 1
answered on 01 Feb 2010, 09:16 AM
thanks for this

I have tried this solution and it is not working for me

I fear that by the time my function to remove a column is called i already have the data and thus clearing these values has no effect

Is it possible to set the filter values and then cause a re-filter function or is there a specific event i need to hook my code into
0
Tsvetoslav
Telerik team
answered on 04 Feb 2010, 09:37 AM
Hello william,

Could you paste your aspx and code behind - please, use the code formatter tool of the ticket editor.

Thanks in advance.

Greetings,
Tsvetoslav
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Grid
Asked by
william johnson
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
william johnson
Top achievements
Rank 1
Share this question
or