Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Adding Columns at runtime in datagrid control

Reply
Thread Tools

Adding Columns at runtime in datagrid control

 
 
Naveed Alam
Guest
Posts: n/a
 
      09-05-2003
have a datgrid control that has 3 columns defined at design time.
Remaining columns are coming from a query and not known until runtime. I
have dynamically added the columns in datagrid and constructed an array
that holds results to be displayed in the corresponding cells of newly
added columns. I don't know how to assign these array members to
corresponding cells of these columns.
I am using datarow's itemarray property to assign the array members to
each corresponding cell. but getting an error stating "Input array is
longer than the number of columns in this table". Please tell me the
exact way of doing my task. Any help please???




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

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
Datagrid Template Columns At Runtime =?Utf-8?B?RGF2ZXkgUA==?= ASP .Net 0 06-10-2005 08:38 AM
How to add a Dropdown list to a datagrid at runtime (dynamic) without using template columns in ASP.NET and still have the ability to us the datagrid Update event. Daniel Roth ASP .Net Datagrid Control 0 04-05-2005 03:58 AM
Binded Datagrid Formatting columns or hiding columns ton ASP .Net Web Controls 2 02-11-2004 04:09 AM
Adding runtime columns to designtime datagrid Chip ASP .Net 1 11-10-2003 09:14 PM
Columns and Inherited Datagrid...Active Schema does not support columns rob thomson ASP .Net Datagrid Control 0 09-04-2003 03:09 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57