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

[Solved] Display grid column if no data available

2 Answers 325 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chinmay
Top achievements
Rank 1
Chinmay asked on 12 Sep 2009, 06:13 PM
Hi ,

My team is using Telerik radgrid . We are using  liscence  version.
Problem - If no data is availble in the grid then grid is not visible.
                 Even if there is no data binded to grid our requirement is to display the columns .We are using entity framework .
                 Can you please help incase any attribute available for displaying columns if no record is available.

Thanks
Chinmay

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Sep 2009, 04:41 AM
Hi Chinmay,

Try enabling the ShowHeadersWhenNoRecords  property to show the headers when there is no data in the Grid.

ASPX:
 
 <MasterTableView  ShowHeadersWhenNoRecords="true"   > 


You may also try the following code snippet to display the Grid when the Grid is not bound to any datasource.

CS:
 
 RadGrid1.DataSource = new string[] { }; 
            RadGrid1.DataBind(); 

Thanks
Shinu
0
Chinmay
Top achievements
Rank 1
answered on 17 Sep 2009, 06:58 PM
Thanks Sinu ,

I will try & update you.

But I got two more showstopper issue in RADTextbox. Can you please help .

1 - I am assigning values to a RadTextbox from javascript function. But the value is not visible in TextBox. if I click on textbox the value is displaying.
2 - I am using RadTab strip and I have 8 tabs in my "main.aspx" page .All the 8 tabs are binded declaratively with 8 different user controls. The problem is when ever we request for main page it's hitting all the usercontrol's pageload .Even if I click on any tab it's hitting all the user control's pageload. I tried to use dynamic way of adding tabs to tabstrip, it worked for 2 tabs perfectly.But if I try to attach more than 2 it's again hitting all the user control's pageload. Can you please provide any sample or code snippet which will avoid all the pageload hit it will be great . If I click on a particular tab then only that tab's associated user control's pageload should hit. Currently the page is taking 2 minutes to display as it's hitting all the usercontrol's pageload which the client is not happy with.
Can you please help with this issue.
Tags
Grid
Asked by
Chinmay
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Chinmay
Top achievements
Rank 1
Share this question
or