Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Binding multiple datagrids to the same datasource

Reply
Thread Tools

Binding multiple datagrids to the same datasource

 
 
joe data
Guest
Posts: n/a
 
      04-27-2004
I need to bind multiple datagrids to the same list of objects.

// Bind to datagrids
// Where l_objSchedules is an ArrayList of objects
dgViewScheduleFuture.DataSource = l_objSchedules;
dgViewScheduleFuture.DataBind();

dgViewSchedule.DataSource = l_objSchedules;
dgViewSchedule.DataBind();

I would like to be able to setup an Itemdatabound event for each data grid
so I can process the lists individually and determine which grid they need
to be placed into.
// datagrid event handlers
dgViewScheduleFuture.ItemDataBound +=new
DataGridItemEventHandler(dgViewScheduleFuture_Item DataBound);
dgViewSchedule.ItemDataBound +=new
DataGridItemEventHandler(dgViewSchedule_ItemDataBo und);

Currently I am only receiving all the ItemdataBound event for the
dgViewScheduleFuture datagrid. I only receive header and footer events for
the second datagrid. It appears that the data grid that binds first is the
only one to receive all the events. Does anybody know if it is possible to
bind grids in this manners or is there a more effecient technique to use.

thanks in advance


 
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
Binding multiple Datasource to DropDownlist Mr Not So Know It All ASP .Net 0 01-03-2007 11:01 PM
multiple datagrids on same page paging broken TJ ASP .Net Web Controls 1 06-16-2006 06:08 AM
Get DataGrids DataSource Vishal ASP .Net Datagrid Control 2 01-19-2005 08:46 PM
Binding Datagrids brian ASP .Net 0 01-29-2004 08:33 PM
Binding Datagrids To a collection Eldon Ferran de Pol ASP .Net 1 12-04-2003 09:48 AM



Advertisments