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

[Solved] rad grid header loads when not binding data to grid

4 Answers 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chap
Top achievements
Rank 1
Chap asked on 23 Apr 2013, 01:05 PM
hi,

My page has two buttons (search and print) and a grid.

Initial view is attached. (expect.PNG) . a blue line for show grid.

When clicking search button, I bind data to grid and it works well.

Print button for load popup to show a report. When I clicked print button I am getting 'what getting.PNG' like this. Grid header is loading (which I am not expecting). 

My problem is I don't want to show that when clicking print button. I am quite sure that I am not binding anything to grid. I tried with set enable false to print button and thats not worked. 

Here I am using Microsoft.Practices for paging (ObjectContainerDataSource) and wcsf. I am not ajaxfying to print button. 

Please guide me to resolve this and I glad that if you can explain this.

regards
chap

sample code for grid I am using

<telerik:RadGrid ID="gridFV" AllowSorting="True" runat="server" Skin="Vista" PagerStyle-Mode="NextPrevAndNumeric"
                        Width="98%" AutoGenerateColumns="False" GroupingSettings-CaseSensitive="false"
                        GridLines="None" ShowStatusBar="True" OnInit="gridFV_Init" AllowPaging="true"
                        OnNeedDataSource="gridFV_NeedDataSource">

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Apr 2013, 01:14 PM
Hi,

Try setting the following.
aspx:
<MasterTableView ShowHeadersWhenNoRecords="false" ...>

Thanks,
Shinu
0
Chap
Top achievements
Rank 1
answered on 23 Apr 2013, 01:30 PM
I try with it. But it still loading the header.
0
Shinu
Top achievements
Rank 2
answered on 24 Apr 2013, 05:54 AM
Hi,

Set the DataSource as shown below to hide header.
c#
RadGrid1.DataSource = new string[] { };

Thanks,
Shinu
0
Chap
Top achievements
Rank 1
answered on 24 Apr 2013, 08:26 AM
Hi shinu,

I'll try with this.
Tags
Grid
Asked by
Chap
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Chap
Top achievements
Rank 1
Share this question
or