Thanks for your previous help.
I am making an update to this per our customers request and I have hit a snag. Since the CurrentRow property is not being updated, I cannot get the index of the current row based upon this solution. I have attempted to iterate over the rows using the row.RowInfo.DataBound item to find the object that the items is bound to to get the row. I can do a for loop that will convert a GridViewRowInfo to a GridRowElement, but I cannot do a CType() to do the same process in a for i = 0 type loop.
Unfortunately, I keep getting this compiler error:
Value of type 'Telerik.WinControls.UI.GridViewInfo' cannot be converted to 'Telerik.WinControls.UI.GridViewRowInfo'.
This occurs in the following code:
Function GetCurrentSelectedRow(ByVal piece As PieceEntity) As Integer
Dim retVal As Integer = -1
For Each row As GridRowElement In grdBin.Rows
If piece.PieceId = CType(row.RowInfo.DataBoundItem, PieceEntity).PieceId Then
' set current row
grdBin.CurrentRow = row.GridViewInfo ' ERROR OCCURS HERE!
Any help with this would be helpful. I am trying to do the following:
1. User drags and drops the row to a separate control (working fine)
2. System will identify the index of the row dragged
3. System will remove the row and rebind the control
4. System will scroll the grid to the index that contained the original dragged row. (So if it is 20 out of 100, after drag and drop row 21 becomes 20 and grid is scrolled to 20)