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

Problem using GroupByExpressions

4 Answers 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Babu Puchakayala
Top achievements
Rank 1
Babu Puchakayala asked on 15 Jun 2010, 10:03 PM
Hi,

I have empty spaces on my column names. When I am trying to do groupby I am getting error. Is there any way that i can groupby column names even if i have spaces in column names. I cant change the column names in sql server. I am calling storeproc so i cant even change the query in program. And I am not using mastertableview. I am directly binding the columns to the radgrid.

Please let me know if there is any solution. Here is My radgrid.
<telerik:RadGrid ID="gvTrackers" Height="550px" runat="server" CallbackMode="true" 
            Serialize="true" FolderStyle="styles/style_11" AllowPaging="true" AllowSorting="True" 
            GridLines="None" AutoGenerateColumns="true" ShowGroupPanel="True" EnableHeaderContextMenu="true" 
            EnableHeaderContextFilterMenu="true" AllowMultiRowSelection="true" AllowFilteringByColumn="True" 
            OnNeedDataSource="gvTrackers_NeedDataSource" OnItemCreated="gvTrackers_ItemCreated" 
            OnExcelMLExportStylesCreated="gvTrackers_ExcelMLExportStylesCreated" OnExcelMLExportRowCreated="gvTrackers_ExcelMLExportRowCreated" 
            OnItemCommand="gvTrackers_ItemCommand"
            <HeaderStyle Height="80px" BackColor="#004000" Font-Size="8pt" Font-Bold="True" ForeColor="White" 
                HorizontalAlign="Center" BorderColor="White" BorderWidth="0px" /> 
            <ExportSettings IgnorePaging="true" ExportOnlyData="true"
            <Pdf AllowModify="false" AllowPrinting="true" PageWidth="16in" /> 
            </ExportSettings> 
            <MasterTableView AllowMultiColumnSorting="true" CommandItemDisplay="Top"
                <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" 
                    ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" /> 
            </MasterTableView> 
            <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True"
                <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
                <Selecting AllowRowSelect="True"></Selecting> 
                <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" 
                    ResizeGridOnColumnResize="False"></Resizing> 
            </ClientSettings> 
            <GroupingSettings ShowUnGroupButton="true" /> 
            <PagerStyle Mode="NextPrevAndNumeric" HorizontalAlign="Right" Font-Bold="true" AlwaysVisible="true" /> 
        </telerik:RadGrid> 


One more question. Is there anyway that i can get print option to the radgrid. Like if press print button it should the all columns from the radgrid directly without exporting to any format file. Is there any option in radgrid.

Thanks
Babu

4 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 16 Jun 2010, 10:39 AM
Hello Babu,

RadGrid grouping works only with unique column names without space. Please check out the following Forum link which discusses the same issue.
Why can't I group by fields with a space in the field name? .

And refer the following Code Library which demonstrates how to print the whole RadGrid contents.
Print RadGrid contents

Regards,
Princy.
0
Babu Puchakayala
Top achievements
Rank 1
answered on 16 Jun 2010, 03:12 PM
Hi Princy,

Thanks for your answer. Printing option is working exactly how i want. Thanks Telerik Team. But I am unable to open the link "Why can't I group by fields with a space in the field name? ."
0
Babu Puchakayala
Top achievements
Rank 1
answered on 16 Jun 2010, 06:28 PM
Hi Princy,

When i am printing the grid. Its not printing the all rows. And one more can i remove the gridoutlines, paging and filtering images? If yes how to do it? (Instead of window printing is there any grid printing?)
0
Pavlina
Telerik team
answered on 21 Jun 2010, 02:05 PM
Hi Babu,

Here is the link for group by column with a space in the field name:
http://www.telerik.com/community/forums/aspnet/grid/why-can-t-i-group-by-fields-with-a-space-in-the-field-name.aspx

Additionally, you can refer to the following forum thread which elaborates on how to print all rows:
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-print.aspx

Regards,
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
Babu Puchakayala
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Babu Puchakayala
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or