Dynamic datagrid and Datatable

Discussion in 'ASP .Net' started by Tim Seaburn, Jun 26, 2004.

  1. Tim Seaburn

    Tim Seaburn Guest

    I have a task that requires that I create and modify datatables and
    datagrids dynamically. I first created four static columns in a datagrid
    (all permutations have these same four columns). I then created a datatable
    with the four columns having the same name expecting them to bind into the
    four grid columns. It didn't work but if I had no columns defined in the
    gird it worked.

    The problem is that, with this approach, I can't figure out how to apply
    edit masks as I would with...
    Dim mycol As New BoundColumn
    mycol.DataFormatString = "{0:C}"

    Questions are:
    Why doesn't the grid.databind() work when four columns already exist with
    the same name as the dataset?
    How can we apply editing when the columns in the gird got created by the
    databind instead of an explicit dim mycol as new BoundColumn?
    thanks,
    tim
    Tim Seaburn, Jun 26, 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. J. Babe
    Replies:
    1
    Views:
    8,317
    Kevin Spencer
    Aug 15, 2003
  2. Fredrik Rodin

    Sort a datatable and create a new datatable

    Fredrik Rodin, Feb 16, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    9,031
    paul.mariotti
    Sep 28, 2007
  3. =?Utf-8?B?Qmx1ZWZsb3dlcg==?=

    Casting DataTable to class inherit from DataTable

    =?Utf-8?B?Qmx1ZWZsb3dlcg==?=, Apr 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    989
    =?Utf-8?B?Qmx1ZWZsb3dlcg==?=
    Apr 2, 2004
  4. jg
    Replies:
    1
    Views:
    715
    =?Utf-8?B?U2hhaWxlc2ggSmFubnU=?=
    Aug 17, 2004
  5. Ersin Gençtürk
    Replies:
    1
    Views:
    3,468
    Ersin Gençtürk
    Oct 6, 2004
Loading...

Share This Page