index | search | no replies | posting guidelines | help login | register
Index » Products » ASP DataGrid
search this forum:
:: Some questions on DataGrid ::    show all messagesPost a New Message | Post a Reply
Jun 17 2004, 5:00 AM
 Re: Some questions on DataGridPost a Reply
 ghost

View this author's profile Send this author a private message Visit author's homepage

from: Washington, DC

You can hide a column using the Hidden property as follows
objGrid.HiddenColumn(Field Name)
A simple implementation might look like the example below

<%
  
objGrid.Command = "SELECT NameField, AddressField, SalaryField FROM Employees"
  
'if some condition,  then hide the employee's salary
  If Not Session("Department")= "ADMIN" Then
     objGrid.HiddenColumn("SalaryField")
  End  If
  
'create your connection
objGrid.CreateConnection(Connection String)
  
'display your reports
objGrid.Display
  
%>



-------------------------
Ghost
Pages: (1)   [1]

search this forum: