Feb 09, 2018, 2:11 AM
Selected Rows in Grid panel can not be refreshed.
I have a grid panel with check box selection model.
When retrieving data, i use this code to set the selected rows.
Dim sm As CheckboxSelectionModel = CType(GrdAllowance.GetSelectionModel(), CheckboxSelectionModel)
sm.ClearSelections()
While sqlrd.Read()
If (sqlrd("IsChecked").ToString = "YES") Then
Dim value As String = IIf(IsDBNull(sqlrd("AllowanceID")), "", sqlrd("AllowanceID").ToString().Trim())
sm.SelectedRows.Add(New SelectedRow(value))
End If
End While
sqlrd.Close()
after i check or uncheck others row, and then want to get original selected rows by refreshing the grid(using the same code above),
the selected rows won't be set to original selected rows unless i refreshed the page.
i have attached the screenshots.
Any idea why?
pardon my english.
When retrieving data, i use this code to set the selected rows.
Dim sm As CheckboxSelectionModel = CType(GrdAllowance.GetSelectionModel(), CheckboxSelectionModel)
sm.ClearSelections()
While sqlrd.Read()
If (sqlrd("IsChecked").ToString = "YES") Then
Dim value As String = IIf(IsDBNull(sqlrd("AllowanceID")), "", sqlrd("AllowanceID").ToString().Trim())
sm.SelectedRows.Add(New SelectedRow(value))
End If
End While
sqlrd.Close()
after i check or uncheck others row, and then want to get original selected rows by refreshing the grid(using the same code above),
the selected rows won't be set to original selected rows unless i refreshed the page.
i have attached the screenshots.
Any idea why?
pardon my english.