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

Help with customising my grouping

2 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Temp
Top achievements
Rank 1
Temp asked on 11 Jul 2008, 12:04 AM
Hi there, can someone please help me with a problem I can't work out how to get round. I am slowly getting to speed with the radgrid, and am using some grouping now. I want to nto allow the grouping to be expanded and collapsed, and only display the FieldValue in the GroupHeader, and no text and colon.

I tried 

ExpandCollapseColumn-Display

="false"

in my MasterTable but this does not seem to help. I have included my code and a screenshot.


<telerik:RadGrid ID="RadGridDevelopmentNeeds" runat="server" EnableEmbeddedSkins="False" AutoGenerateColumns="false" DataSourceID="srcDevelopmentNeeds" EnableViewState="true" OnItemCommand="RadGridDevelopmentNeeds_ItemCommand">  
                        <MasterTableView GroupHeaderItemStyle-BackColor="Pink" ExpandCollapseColumn-Display="false" > 
                            <GroupByExpressions> 
                                <telerik:GridGroupByExpression> 
                                    <GroupByFields> 
                                        <telerik:GridGroupByField FieldName="Status" SortOrder="Ascending"/>  
                                    </GroupByFields> 
                                    <SelectFields> 
                                        <telerik:GridGroupByField FieldName="Status" HeaderText=" "/>  
                                    </SelectFields> 
                                </telerik:GridGroupByExpression> 
                            </GroupByExpressions> 
                            <Columns> 
                                  
                                <telerik:GridTemplateColumn UniqueName="Rank">  
                                    <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" Font-Bold="true"/>  
                                    <ItemTemplate><%# Eval("Rank")%>.</ItemTemplate> 
                                </telerik:GridTemplateColumn> 
                                <telerik:GridTemplateColumn UniqueName="DNName">  
                                    <ItemStyle CssClass="dnindex"/>  
                                    <ItemTemplate> 
                                        <asp:LinkButton ID="lbSelectDevelopmentNeed" runat="server" CommandName="LoadDevelopmentNeed" CommandArgument='<%#Eval("GUID") %>' CssClass="dnindex"><%#Eval("Name")%></asp:LinkButton> 
                                    </ItemTemplate> 
                                </telerik:GridTemplateColumn> 
                            </Columns> 
                        </MasterTableView> 
                    </telerik:RadGrid> 

I cant attach a picture here but here is a link to one.
http://www.bluerocket.co.nz/temp/gridgroupproblem.gif

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Jul 2008, 05:39 AM
Hello Temp,

Check out the link given below, which explains how to prevent collapsing of groups in the grid by disabling the GridGroupSplitterColumn.
Preventing groups expansion by hiding the expand/collapse images

Also try removing the HeaderValueSeperator as shown in the code snipppet below.
ASPX:
<SelectFields>  
         <telerik:GridGroupByField FieldName="Status" HeaderValueSeparator="" />   
</SelectFields> 

Thanks
Princy.

 


0
Temp
Top achievements
Rank 1
answered on 13 Jul 2008, 10:01 PM
Hi Princy thanks very much for helping me. Unfortunately I did these things in this code and it has made not a single bit of difference. I still get the column with the button.

Is there a working example I can look at on the demo site?

Another thing I guess I could try is manually setting the images, and making them width="0" height="0" ?

Seems a really basic thing to do here, I am really suprised you can't just turn this column off with a simple display="true/false" type option. The only other option I have is to make several grids for each status, which seems overkill.
Tags
Grid
Asked by
Temp
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Temp
Top achievements
Rank 1
Share this question
or