Hi Mijail,
Currently, we don’t have support for customizing the caption in the Grid header. If you want to do as per your requirement then you should use jQuery “pagebeforeshow” event to update the full caption as an workaround. Please refer the below code snippets.
$("div[data-role='page']").bind("pagebeforeshow", function () {
var ele = $sf.getCurrentPage().find("#grid .sf-caption-row");
ele.html(ele.html().replace("Items", "Records"));
});
Otherwise, you can make the “ShowCaption” property with false which we have provided to remove the header. Please do as in following code snippets.[...]
.Datasource(Employees.List).Caption("Employees").ShowCaption(false)
[...]
Please try this and get back to us if this helps out.
Regards,
Thivya.
We have provided Load event for the Grid control so that you can use the script with “OnLoad” event. Please refer the following code snippets.
function load() {
var ele = $sf.getCurrentPage().find("#grid .sf-caption-row");
ele.html(ele.html().replace("Items",
"Records"));
}
[...]
.Events(e => e.OnLoad("load"))
[...]
Please let us know if you have any queries.
Regards,
Thivya.
Hi Mijail,
We are not able to reproduce the issue you mentioned that Grid push back the
"items" label when reloading the page. For your reference we have
attached sample hereby please go through the sample and get back to us if this
helps out.