Results 1 to 3 of 3

Thread: VB.NET datagrid control

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    Tennessee
    Posts
    279

    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.
    A cynic knows the price of everything but the value of nothing.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    Tennessee
    Posts
    279
    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...
    A cynic knows the price of everything but the value of nothing.

  3. #3
    New Member
    Join Date
    Apr 2002
    Posts
    5
    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 /////////

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width