This is a migrated thread and some comments may be shown as answers.

Change no records template/no records text in JavaScript?

1 Answer 161 Views
Grid
This is a migrated thread and some comments may be shown as answers.
KN425000
Top achievements
Rank 1
KN425000 asked on 24 Apr 2012, 02:49 PM
I have a pure AJAX web form, with no code-behind file.  I have the NoRecordsTemplate declaratively set to one value, indicating that no data has been found *yet*.  After I query a web service for data, I bind the data to the grid, and the grid displays properly.  However, if no data is found, I would like to programmatically change the no records text to say something else. 

I haven't found anything on this topic in the Telerik docs or the internet.  Is this possible?  I see other people being told it's possible using server-side code, but that's not an option here.


Thanks

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 27 Apr 2012, 12:38 PM
Hello Mike,

You can find the NoRecords element using its class name which is rgNoRecords. It is <tr> and its single <td> child contains the template, by default only a text in a <div> element (see screenshot). You can modify the <td>'s innerHTML to make it display something else.

Greetings,
Tsvetina
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.
Tags
Grid
Asked by
KN425000
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or