-
VB.NET datagrid control
I'm using a datagrid control via web services to display a dataset. However, I want to hide one of the columns from the user. How can I do this? Set the width to zero? If so, how can I do that? :) I can't seem to find anything in the help about it.
Any help would be appreciated.
-
To answer my own question:
If strGridType = "Type1" Then
myts.MappingName = "Type1"
Dim mytb1 As New DataGridTextBoxColumn()
mytb1.MappingName = "TimeStamp"
mytb1.HeaderText = "Date"
mytb1.Alignment = HorizontalAlignment.Center
mytb1.Width = 0
myts.GridColumnStyles.Add(mytb1)
end if
Set the width to zero...
-
Hello !!!
Did u check the Properties of Datagrid ??
When u right click on it u get a option like property builder along with autoformat at the lower side of the propertry box. When u click on property builder u can see options like format borders............ etc I dont know which option but one of the option for sure let's you control the columns to be displayed in the datagrid u can restrict only the columns which u want to display over there
I hope this helps u /////////