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

Sorted Issue

5 Answers 47 Views
GridView
This is a migrated thread and some comments may be shown as answers.
chou
Top achievements
Rank 1
chou asked on 09 Jun 2011, 10:36 AM
Hi telerik:
How to keep cell's background after girdview sorted?
I try to set the cell's background when the gridview sorted,but the CellInfo's item is null.
Because i need the item to judge i would set the cell's background or not.
Please Help. 

5 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 09 Jun 2011, 11:51 AM
Hello chou,

May you provide a bit more details on your exact requirements ? Do you want to keep the selected cell ? If so, you will need to save the cell before sorting and once the grid is sorted, to set it again.
 

Best wishes,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
chou
Top achievements
Rank 1
answered on 10 Jun 2011, 04:43 AM
Thanks for your response.
 Some cells have backcolor before sorted.
What i need is to keep the cell's backcolor after sorted.
0
Maya
Telerik team
answered on 10 Jun 2011, 07:24 AM
Hello chou,

I would recommend you to use a CellStyleSelector instead. Thus you will be able to sett the background of the cells you want, but it will not be removed while sorting. You may take a look at our demos and online documentation for further reference.
  

Greetings,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
chou
Top achievements
Rank 1
answered on 10 Jun 2011, 09:45 AM
Hi:
I was thinking about CellStyleSelector.
But the cell's backcolor can be changed in some situations.
I don't know if the CellStyleSelector can feed this 
For example:
There is another GridView.When i change the other GridVIewCell's value and this GridViewCell's backcolor should be changed.
If can, could you please provide a demo?
Or anyother way to solve the issue?

thanks.
0
Vlad
Telerik team
answered on 10 Jun 2011, 09:50 AM
Hi,

 Indeed CellStyleSelector will be re-evaluated when a property value is changed.

All the best,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
chou
Top achievements
Rank 1
Answers by
Maya
Telerik team
chou
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or