Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where is the property for Highlighting Grid:(
Message
Information générale
Forum:
ASP.NET
Catégorie:
WebForms
Divers
Thread ID:
00790338
Message ID:
00790344
Vues:
18
Hi Mark,

Here is code to implement this:

[C#]
private void dataGrid1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) 
{ 
     System.Drawing.Point pt = new Point(e.X, e.Y); 
     DataGrid.HitTestInfo hti = dataGrid1.HitTest(pt); 
     if(hti.Type == DataGrid.HitTestType.Cell) 
     { 
          dataGrid1.CurrentCell = new DataGridCell(hti.Row, hti.Column); 
          dataGrid1.Select(hti.Row); 
     } 
} 

[VB/NET]
Private Sub dataGrid1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles dataGrid1.MouseUp 
     Dim pt = New Point(e.X, e.Y) 
     Dim hti As DataGrid.HitTestInfo = dataGrid1.HitTest(pt) 
     If hti.Type = DataGrid.HitTestType.Cell Then 
          dataGrid1.CurrentCell = New DataGridCell(hti.Row, hti.Column) 
          dataGrid1.Select(hti.Row) 
     End If 
End Sub
>I have just started to play with .net
>I dropped the base Grid class onto a form and exptected to be able to make it highlight the selected row but can not find a property to do this.
>Hopefully they have not missed this feature out because we had to wait years for it in VFP
>
>Thanks
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform