Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need a way to use two data grids at same time
Message
 
À
29/06/2004 13:28:56
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00918567
Message ID:
00919428
Vues:
13
Tony,

>I have one datagrid that is used as the navigation control:
>'Register the Requisition Header DataGrid as the Navigation control
>Me.NavControl = Me.grdListing
>
>I have another grid in another tab that is filled with a bunch of records for a particular user or company displayed from a search.
>
>Right now when I click on a row some text boxes are populated with the grid data.
>
>However, when I do this I also want the application to navigate to the record I just picked.

Do you mean that you want the business object to navigate to the newly selected row? If so, try the following code (and replace "MyDataGrid" with a reference to your secondary DataGrid and "BusinessObject" with a reference to your business object):
// Call the control's NavigateData method with a "Refresh" directive.
// All this does is return the current DataRowView!
DataRowView drView = 
   this.MyDataGrid.NavigateData(this.BindingContext, BusinessObject, mmNavigate.Refresh);

if (drView != null) 
{
	BusinessObject.NavigatedData(drView);
}
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform