Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Grid > Visible vs Display on Grid Column Definition

Not answered Visible vs Display on Grid Column Definition

Feed from this thread
  • Matthew avatar

    Posted on Oct 29, 2009 (permalink)

    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

    Reply

  • Schlurk Master avatar

    Posted on Oct 29, 2009 (permalink)

    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).

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Grid > Visible vs Display on Grid Column Definition
Related resources for "Visible vs Display on Grid Column Definition"

ASP.NET Grid Features  |  Documentation  |  Demos  |  Step-by-step Tutorial  ]