I am trying to localize my text in the pager of my RadGrid.
But what displays is "null records" with the controls to the right.
What might be causing this?
<PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" PagerTextFormat="{0} {1} {2} {3} {5} records {4} " />But what displays is "null records" with the controls to the right.
What might be causing this?
7 Answers, 1 is accepted
0
Josh
Top achievements
Rank 1
answered on 23 Jan 2013, 09:04 PM
In addition I tried to set the text in the ItemDataBound event handler
However, I still see "null records" with the controls to the right.
radGrid.MasterTableView.PagerStyle.PagerTextFormat = pager.Paging.DataSourceCount + " records {4}";However, I still see "null records" with the controls to the right.
0
Shinu
Top achievements
Rank 2
answered on 24 Jan 2013, 04:27 AM
Hi,
I am not quite sure about your scenario. You can set the PagerTextFormat depending on the mode as explained in the following documentation.
Using PagerTextFormat
Thanks,
Shinu
I am not quite sure about your scenario. You can set the PagerTextFormat depending on the mode as explained in the following documentation.
Using PagerTextFormat
Thanks,
Shinu
0
Josh
Top achievements
Rank 1
answered on 24 Jan 2013, 02:51 PM
Shinu,
Should
Should
PagerTextFormat="{5} records {4} " produce the string "null records" when displayed in the browser?0
Hello Josh,
Note that the '{4}' parameter is mandatory and should be positioned on the left. For instance
Kind regards,
Kostadin
the Telerik team
Note that the '{4}' parameter is mandatory and should be positioned on the left. For instance
PagerTextFormat="{4} records {5} "Kind regards,
Kostadin
the Telerik team
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 their blog feed now.
0
Josh
Top achievements
Rank 1
answered on 30 Jan 2013, 02:47 PM
I changed PagerTextFormat to "{4} records {5} ". I get the same result. I've attached a screenshot.
0
Accepted
Hello Josh,
I tried to replicate the problem you are facing with PagerTextFormat property in sample runnable project, but to no avail. Find attached my test page and see what is the difference in your case.
Greetings,
Pavlina
the Telerik team
I tried to replicate the problem you are facing with PagerTextFormat property in sample runnable project, but to no avail. Find attached my test page and see what is the difference in your case.
Greetings,
Pavlina
the Telerik team
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 their blog feed now.
0
Josh
Top achievements
Rank 1
answered on 04 Feb 2013, 03:17 PM
Same result. However, I found the problem.
Someone was using some javascript to find and replace the text that should appear. The js was searching for "strong". However, when I used the PagerTextFormat, I had replaced
"Change page: {4} Page <strong>{0}</strong> of <strong>{1}</strong>, items <strong>{2}</strong> to <strong>{3}</strong> of <strong>{5}</strong>.Change page: {4} Page <strong>{0}</strong> of <strong>{1}</strong>, items <strong>{2}</strong> to <strong>{3}</strong> of <strong>{5}</strong>."
with "{4} {5} records". The js was returning the text "null records".
Sorry for the run around and thanks for all the help.
Someone was using some javascript to find and replace the text that should appear. The js was searching for "strong". However, when I used the PagerTextFormat, I had replaced
"Change page: {4} Page <strong>{0}</strong> of <strong>{1}</strong>, items <strong>{2}</strong> to <strong>{3}</strong> of <strong>{5}</strong>.Change page: {4} Page <strong>{0}</strong> of <strong>{1}</strong>, items <strong>{2}</strong> to <strong>{3}</strong> of <strong>{5}</strong>."
with "{4} {5} records". The js was returning the text "null records".
Sorry for the run around and thanks for all the help.