Need Help >>>>>>>>>

Discussion in 'ASP .Net Datagrid Control' started by Gary, Apr 1, 2004.

  1. Gary

    Gary Guest

    Nobody answered my previous post from last night. I
    would really like to get this solved. Is is puzzling.

    I want to change the layout of columns in a datagrid. I
    want to change the heading and the width of columns. In
    the Load Event on the form, I have the following code:

    Dim tsNotes As New DataGridTableStyle
    tsNotes.MappingName = "Notes"

    Dim cstDate As New DataGridTextBoxColumn
    cstDate.MappingName = "NoteDate"
    cstDate.HeaderText = "Note Date"
    cstDate.Width = 1650

    Dim cstStartTime As New DataGridTextBoxColumn
    cstStartTime.MappingName = "StartTime"
    cstStartTime.HeaderText = "Start Time"
    cstStartTime.Width = 1550

    Dim cstEndTime As New DataGridTextBoxColumn
    cstEndTime.MappingName = "EndTime"
    cstEndTime.HeaderText = "End Time"
    cstEndTime.Width = 1550

    tsNotes.GridColumnStyles.Add(cstDate)
    tsNotes.GridColumnStyles.Add(cstStartTime)
    tsNotes.GridColumnStyles.Add(cstEndTime)

    Me.DG_Notes.TableStyles.Add(tsNotes)

    But when I run this code, I can see no columns at all.
    If I change themapping name from "Notes" to "PNotes",
    these styles do not get applied. If I leave it
    at "Notes" I can't see any columns. What am I doing
    wrong?

    Any help would be appreciated.

    Thanks in advance,

    Gary
    Gary, Apr 1, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TN Bella
    Replies:
    1
    Views:
    2,457
    Edward
    Jun 18, 2004
  2. Teep
    Replies:
    2
    Views:
    755
    Larry Marburger
    Jun 21, 2004
  3. John
    Replies:
    1
    Views:
    388
    John C. Bollinger
    Aug 19, 2004
  4. =?Utf-8?B?Q2hyaXM=?=

    Help Help. I really need some help with this

    =?Utf-8?B?Q2hyaXM=?=, Jan 31, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    545
    =?Utf-8?B?SmFzb24gVmVybWlsbGlvbg==?=
    Jan 31, 2007
  5. ElementX
    Replies:
    9
    Views:
    482
    RedGrittyBrick
    Oct 1, 2008
Loading...

Share This Page