6 Answers, 1 is accepted
0
Carlos
Top achievements
Rank 1
answered on 09 Jan 2014, 03:46 PM
basically i had the values from the radgrid passed to a datatabel so i can use them other way.
It worked until i updated telerik, i basically had the Radgrid1.AllowPaging = true; Radgrid1.Rebind(); but it stopped working.
any thoughts or ideas?
It worked until i updated telerik, i basically had the Radgrid1.AllowPaging = true; Radgrid1.Rebind(); but it stopped working.
any thoughts or ideas?
0
Princy
Top achievements
Rank 2
answered on 10 Jan 2014, 05:49 AM
Hi Carlos,
Without your code its hard to identify the issue. Make sure you have bound the Grid using the Advanced Data-binding (using NeedDataSource event). Below is a sample code that uses Rebind(), please try the code snippet and see if it works.
ASPX:
C#:
Thanks,
Princy
Without your code its hard to identify the issue. Make sure you have bound the Grid using the Advanced Data-binding (using NeedDataSource event). Below is a sample code that uses Rebind(), please try the code snippet and see if it works.
ASPX:
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowPaging
=
"true"
PageSize
=
"5"
OnNeedDataSource
=
"RadGrid1_NeedDataSource"
>
</
telerik:RadGrid
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"Ignore Paging"
OnClick
=
"Button1_Click"
/>
C#:
protected
void
RadGrid1_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
dynamic data =
new
[] {
new
{ ID = 1, Name =
"Name1"
, Number=123},
new
{ ID = 2, Name =
"Name2"
, Number=234},
new
{ ID = 3, Name =
"Name3"
, Number=234},
new
{ ID = 4, Name =
"Name4"
, Number=456},
new
{ ID = 5, Name =
"Name5"
, Number=567},
new
{ ID = 6, Name =
"Name6"
, Number=567},
new
{ ID = 7, Name =
"Name7"
, Number=789},
new
{ ID = 8, Name =
"Name8"
, Number=896},
new
{ ID = 9, Name =
"Name9"
, Number=741}
};
RadGrid1.DataSource = data;
}
protected
void
Button1_Click(
object
sender, EventArgs e)
{
RadGrid1.AllowPaging =
false
;
RadGrid1.Rebind();
}
Thanks,
Princy
0
Carlos
Top achievements
Rank 1
answered on 10 Jan 2014, 09:42 AM
Hi all,
The table is bound, the:
Doesnt work anymore, what i found for some strange reason, that now i have to do:
This worked, i dont know what happen of diferrent from before the last update, to now, but the back up still works the first way, with the update it doesnt.
Best regards
The table is bound, the:
RadGrid1.AllowPaging = false;
RadGrid1.Rebind();
Doesnt work anymore, what i found for some strange reason, that now i have to do:
RadGrid1.MasterTableView.AllowPaging = false;
RadGrid1.Rebind();
This worked, i dont know what happen of diferrent from before the last update, to now, but the back up still works the first way, with the update it doesnt.
Best regards
0
Princy
Top achievements
Rank 2
answered on 21 Jan 2014, 11:19 AM
Hi Carlos,
If you have enabled the Paging in the MasterTableView , you have to access it using the MasterTableView property:
ASPX:
C#:
If you use in the RadGrid, you can use either one to access the Paging:
ASPX:
C#:
Thanks,
Princy
If you have enabled the Paging in the MasterTableView , you have to access it using the MasterTableView property:
ASPX:
<
MasterTableView
AllowPaging
=
"true"
. .>
C#:
RadGrid1.MasterTableView.AllowPaging =
false
;
If you use in the RadGrid, you can use either one to access the Paging:
ASPX:
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowPaging
=
"true"
. . >
C#:
RadGrid1.AllowPaging =
false
;
//OR
RadGrid1.MasterTableView.AllowPaging =
false
;
Thanks,
Princy
0
Carlos
Top achievements
Rank 1
answered on 21 Jan 2014, 12:21 PM
I noticed that,
the paggin wad on radgrid, the code worked until the last update of telerik, then to correct it it onlçy work if i did to mastertableview.
the paggin wad on radgrid, the code worked until the last update of telerik, then to correct it it onlçy work if i did to mastertableview.
0
Hi Carlos,
I tested accessing the grid pager both ways and it is working properly as you can see from the attached project. Give it a try and see what is the difference in your case.
Regards,
Pavlina
Telerik
I tested accessing the grid pager both ways and it is working properly as you can see from the attached project. Give it a try and see what is the difference in your case.
Regards,
Pavlina
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.