I'm experiencing an issue that was that is similar to the issue found at https://www.telerik.com/forums/client-side-service-binding-11-empty-rows. I have a radgrid that I'm binding to JSON results on the client-side. Regardless of the number of records, the record count always reads 11 items in 2 pages.
I've followed all of the recommendations in the previous issue, but I don't think there was ever any actual resolution to that problem.
Here's what I have, and a screenshot to show the symptoms:
Markup:
<
div
class
=
"tab-pane row in active"
id
=
"selected"
>
<
div
class
=
"col-md-12"
>
<
telerik:RadAjaxLoadingPanel
runat
=
"server"
Skin
=
"Default"
ID
=
"loadPanel"
/>
<
sg:IPGrid
runat
=
"server"
ID
=
"rgSelected"
>
<
MasterTableView
CommandItemDisplay
=
"Top"
AutoGenerateColumns
=
"false"
AllowPaging
=
"True"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
AlwaysVisible
=
"True"
Position
=
"Bottom"
/>
<
Columns
>
<
telerik:GridTemplateColumn
HeaderStyle-Width
=
"50px"
>
<
ItemTemplate
>
<
asp:Button
runat
=
"server"
ID
=
"Button1"
Text
=
"Add"
CssClass
=
"btn btn-sm"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"Title"
HeaderText
=
"Title"
HeaderStyle-Width
=
"450px"
/>
<
telerik:GridBoundColumn
DataField
=
"AssignedTo"
HeaderText
=
"Assigned To"
/>
<
telerik:GridBoundColumn
DataField
=
"HotfixOwner"
HeaderText
=
"Hotfix Owner"
/>
<
telerik:GridBoundColumn
DataField
=
"Target Release"
HeaderText
=
"Target Release"
/>
<
telerik:GridBoundColumn
DataField
=
"Target Date"
HeaderText
=
"Target Date"
DataFormatString
=
"{0:yyyy-MM-dd}"
/>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnCommand
=
"function() {}"
OnGridCreated
=
"OnGridCreated"
OnDataBound
=
"OnDataBound"
/>
</
ClientSettings
>
</
sg:IPGrid
>
</
div
>
</
div
>
Javascript:
function
OnGridCreated(sender, args) {
$find(
'<%= loadPanel.ClientID%>'
).show(
'selected'
);
}
function
OnDataBound(sender, args) {
$find(
'<%= loadPanel.ClientID%>'
).hide(
'selected'
);
}
$(
function
() {
$.ajax({
type:
"POST"
,
url:
"/pageinformation/styleguide.api/internaldocgeneratorws.asmx/getworkitemcollection"
,
data:
'{ workItems: '
+ JSON.stringify(deployment.WorkItems) +
' }'
,
contentType:
"application/json; charset=utf-8"
,
dataType:
"json"
,
cache:
true
}).done(
function
(data) {
var
tableView = $find(
'<%= rgSelected.ClientID %>'
).get_masterTableView();
tableView.set_dataSource(JSON.parse(data.d));
tableView.dataBind();
}).fail(
function
(jqXHR, textStatus) {
// If there is no communication between the server, show an error
$find(
'<%= MessageBox.ClientID %>'
).addError(jqXHR.responseJSON.Message,
false
);
});
});