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

Visible vs Display on Grid Column Definition

1 Answer 394 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 29 Oct 2009, 01:46 PM
Hello; I have two questions.

What is the difference between the Visible property and the Display property on a RadGrid's Column definition?

For example:

<rad:RadGrid ID="gdCompanies" runat="server"
  <MasterTableView AutoGenerateColumns="false" EditMode="EditForms"
    <Columns> 
    <rad:GridBoundColumn DataField="CompanyId" UniqueName="CompanyId" 
      Visible="false" 
      Display="false"/> 
    </Columns> 
  </MasterTableView> 
</rad:RadGrid> 
 

Also, is there a way to disable a field (specifically a GridBoundColumn) from being displayed in edit mode? I have tried visible=false and display=false, but the field is still displayed in edit mode (EditForms flavor).

Thanks,

Matthew

1 Answer, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 29 Oct 2009, 05:04 PM
The visible property is used through server-side to determine whether or not an item should be rendered to the page, while display simply changes the CSS style to 'display:none';. Basically if you are just trying to dynamically show/hide columns the Display property is the way to go.

As for disabling a column in the edit-form, try setting the column's ReadOnly property to true (false by default).
Tags
Grid
Asked by
Matthew
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Share this question
or