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

What is the best way to make empty columns have a width of 0?

0 Answers 16 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeffrey Sylvan
Top achievements
Rank 1
Jeffrey Sylvan asked on 09 Aug 2010, 02:31 PM
I have a RadGrid in edit mode with GridBoundColumns and GridTemplateColumns.

The GridBoundColumns turn into a textbox and the GridTemplateColumns contain one item - a validator, which is associated with the previous boudncolumns.

In the old days, the validation columns only took up space if the validator was active. Now the empty columns always take up space which is causing an unsightly gap between textboxes.

What is the best way to fix this gap? I want the column width to be 0 if there's no items inside it.

Note that i tried to turn off the columns' visibility when there were no active validators in any of its rows but that caused problems during callback. The coulmn's visibility wasn't restored when turning visible to true. 

edit:
Answer - the "bug" happened because I was toggling the columns' visible property. I should have toggled the Display property. Turning the visible property false then true causes issues. Turning the Display property false then true does not.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Jeffrey Sylvan
Top achievements
Rank 1
Share this question
or