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

Show empty Grid in client side

1 Answer 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ali zubair
Top achievements
Rank 1
ali zubair asked on 03 Jun 2010, 03:08 PM
Hi All,
I have a problem. i have a rad grid in which i bound some fields and i also use template field.
I bind my grid using client side API. it words fine when my function returns data but when my function does not return any data i want to show empty grid with message that "There is no data to display."
my code for binding data is.

var data = [{Text: "Click Me"}];
     tableView = $find("<%= rgAddress.ClientID %>").get_masterTableView();        
     if (result != "")
     {
        tableView.set_dataSource(result[0].objStudentAddressCollection);
        tableView.dataBind();
     }
     else
     {
        tableView.set_dataSource(data);
        tableView.dataBind();
     }
Above code shows one row in grid along with template column. How can i show empty grid using client side api.??????
And i have also used "NoRecordsTemplate"

Any help please. its urgent.



1 Answer, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 03 Jun 2010, 03:29 PM
Hello Ali,

Refer to the following forum thread for more information how to achieve your goal:
http://www.telerik.com/community/forums/aspnet/grid/norecordstemplate-using-client-side-data-binding.aspx

Best wishes,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
ali zubair
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or