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

[Solved] Conditionnally display column content

1 Answer 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mickaël
Top achievements
Rank 1
Mickaël asked on 30 Jan 2013, 04:20 PM
Hey,

I'm currently using RadGrid and I am very happy about it.
There's one thing I can't achieve, though.

I have a two-level hierarchy, with - say - Categories and SubCategories.
I have a GridButtonColumn which serves as a Delete button on the Categories level.

This button must be hidden if a Category has at least one SubCategory. On the initial load of the page, I successfully hide the Delete button, hooking in the ItemDataBound event.
Now let's say I remove all the SubCategories of a Category, the Delete button won't appear. I have to refresh (i.e. Rebind) the grid to make it appear again.

Do you know a way of doing it?
Thanks in advance,
Mickaël

1 Answer, 1 is accepted

Sort by
0
Mickaël
Top achievements
Rank 1
answered on 30 Jan 2013, 04:35 PM
Sorry everybody, I posted too soon..

I found a way of doing it.
Every time a SubCategory is added or removed, the DetailTableDataBind event is fired, and gets the SubCategories of a Category. I can know in this event if I have to show or hide the button again.

Thanks anyway,
Mickaël
Tags
Grid
Asked by
Mickaël
Top achievements
Rank 1
Answers by
Mickaël
Top achievements
Rank 1
Share this question
or