Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where is the property for Highlighting Grid:(
Message
General information
Forum:
ASP.NET
Category:
WebForms
Miscellaneous
Thread ID:
00790338
Message ID:
00790355
Views:
13
Sorry, I am very very new to C#

where should this code go and how should it be called.



>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform