Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Dynamic datagrid and Datatable

Thread Tools

Dynamic datagrid and Datatable

Tim Seaburn
Posts: n/a
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?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort a datatable and create a new datatable Fredrik Rodin ASP .Net 3 09-28-2007 07:28 AM
How can I add a row from a typed datatable to another instance of that typed datatable? Ersin Gençtürk ASP .Net 1 10-06-2004 01:11 PM
Create a Datatable from a SQL datatable column shema? jg ASP .Net 1 08-17-2004 09:43 PM
Casting DataTable to class inherit from DataTable =?Utf-8?B?Qmx1ZWZsb3dlcg==?= ASP .Net 0 04-02-2004 05:41 AM
Adding DataTable Rows To another DataTable J. Babe ASP .Net 1 08-15-2003 05:04 PM