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

"No records to display. " is not shown after rebinding empty data source to grid from client side

3 Answers 193 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sampada
Top achievements
Rank 1
Sampada asked on 23 Aug 2012, 11:18 AM
Team,

I am removing all data rows of grid from client side.
I wanted to show 
"No records to display."
in grid.
But it does not shows empty row which contains "No records to display".
Please let me know from where I can set this empty row message from clientside?
Following is my code. 
This code works if grid doesn't contain any data but if grid contains the data then it removes the row from the grid but doesn't show
 "No records to display". 

var mastertableview = objgrid.get_masterTableView();
mastertableview.set_dataSource({});
mastertableview.set_virtualItemCount(1);
mastertableview.dataBind();

Regards,
Sampada

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Aug 2012, 05:12 AM
Hi,

Try setting the following to show "No records to display" message.
aspx:
<MasterTableView ShowHeadersWhenNoRecords="true">

Thanks,
Shinu.
0
Sampada
Top achievements
Rank 1
answered on 24 Aug 2012, 05:30 AM
Hello Shinu,

I have already set the ShowHeadersWhenNoRecords="true" but it does not show "No records to display" .
Can we set the same property from client side?

Regards,
Sampada 

0
Radoslav
Telerik team
answered on 28 Aug 2012, 08:46 AM
Hello Sampada,

Please check out the following forum thread which elaborates on the same matter:
http://www.telerik.com/community/forums/aspnet-ajax/grid/client-side-databind-with-no-records.aspx

I hope this helps.

Greetings,
Radoslav
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
Sampada
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Sampada
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or