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

Difference between display and visible properties?

3 Answers 314 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Carl
Top achievements
Rank 1
Carl asked on 20 Nov 2008, 08:11 PM
I've been looking through the documentation and forums for a good discussion of the difference between the "display" and "visible" properties but have not yet found a clear explanation.

Can somebody please explain the difference? Or else provide the links to the documentation page where it's explained?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 21 Nov 2008, 07:06 AM
Hi Carl,

Display property for GridColumn will tell the grid to render the column with "display:none" if the property is set to false and Visible property will turn off column rendering completely (again if set to false).

Kind regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Carl
Top achievements
Rank 1
answered on 21 Nov 2008, 05:59 PM
Based on your answer, then I assume that a GridBoundColumn for a DataField that corresponds to the primary key for the table as specified in DataKeyNames will work OK with Display="False" (so that the primary key is rendered but not displayed) and will NOT work at all with Visible="False" (so that the primary key is NOT rendered anywhere). Do I understand this correctly?

If so, then I'm still wondering what Visible is meant to be used for? What is the scenario for using it in a practical situation? If the developer does not want a datafield rendered at all, then why even bother to put it in as a GridBoundColumn in the markup for the *.aspx page? So it seems that Visible is redundant and unnecessary as long as Display can be used. Well.. I'm still curious about when and how it is useful to code with both Display and Visible????
0
Vlad
Telerik team
answered on 24 Nov 2008, 07:32 AM
Hi Carl,

Display property is useful if you want to hide/show columns client-side without post-back/ajax request. Visible property is useful if you do not want to show (do not render at all) a column server-side.

Sincerely yours,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Carl
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Carl
Top achievements
Rank 1
Share this question
or