I am trying to implement go to page number functionality in a detail table and can't seem to get it to work right. I'd like to implement it using client side code and tried the following based loosely on a demo.
There are 3 detail tables, the one I'm trying to access in this case is the second one.
I also tried something server side that didn't work as well.
In this case, ChildGrid had a null ClientID, but all the other properties represented the correct grid. Calling Rebind on it never fires the bind code. The only way I seemed to be able to get this to work was to do
and I really detest that way.
Any suggestions or examples I can look at? I couldn't find any demos that did this.
| function txtPendingReleaseInfo_ValueChanged(sender, args) |
| { |
| var grid =$find("<%= RGPendingCases.ClientID %>"); |
| var detailTables = grid.get_detailTables();
|
| var release = detailTables[1]; |
| release.page(sender.get_value()); |
| } |
There are 3 detail tables, the one I'm trying to access in this case is the second one.
I also tried something server side that didn't work as well.
| Protected Sub txtPendingReleaseInfo_OnTextChanged(ByVal sender As Object, ByVal e As EventArgs) |
| Dim txtPendingReleaseInfo = DirectCast(sender, Telerik.Web.UI.RadNumericTextBox) |
| Dim PageIndex As Integer |
| Integer.TryParse(txtPendingReleaseInfo.Text, PageIndex) |
| Dim ChildGrid = RGPendingCases.MasterTableView.DetailTables(1) |
| If PageIndex < 1 Then |
| PageIndex = 1 |
| End If |
| ChildGrid.CurrentPageIndex = PageIndex - 1 |
| ChildGrid.Rebind() |
| End Sub |
In this case, ChildGrid had a null ClientID, but all the other properties represented the correct grid. Calling Rebind on it never fires the bind code. The only way I seemed to be able to get this to work was to do
| DirectCast(RGPendingCases.Controls(1).Controls(0).Controls(4).Controls(1).FindControl(ControlName), Telerik.Web.UI.GridTableView) |
and I really detest that way.
Any suggestions or examples I can look at? I couldn't find any demos that did this.