Citat:
Zna li neko kako moze u DataGridu da se nadje tekst selektovanog Row-a
Code:
Dim i As Integer
For i = 0 To CType(DataGrid1.DataSource, DataTable).Columns.Count - 1
MsgBox(DataGrid1.Item(DataGrid1.CurrentRowIndex, i).ToString)
Next
Citat:
BTW, kako bih mogao da ogranicim selektovanje na ceo red a ne samo na jednu celiju. Dakle kad korisnik klikne na bilo koju celiju u redu red se ce selektuje (kao u ListBoxu).
U DataGrid1_MouseUp event-handler rutinu mozes da stavis nesto kao:
Code:
Dim pt = New Point(e.X, e.Y)
Dim hittest As DataGrid.HitTestInfo = DataGrid1.HitTest(pt)
If hittest.Type = DataGrid.HitTestType.Cell Then
DataGrid1.CurrentCell = New DataGridCell(hittest.Row, hittest.Column)
DataGrid1.Select(hittest.Row)
End If
Mislim da primeri sami sebe najbolje objasnjavaju.
Commercial-Free !!!