views:

183

answers:

2

I have a Telerik RadGrid on my aspx web page. I notice that when I run my web application I get an extra space at the end as the below picture illustrates. I'm not sure why this shows up, I checked the markup and there is no extra column, hidden or otherwise, after the last column with the Drop link. I also looked at the RadGrid properties and there's nothing there that seems to indicate that there's anything additional that is being rendered. That extra space does not show up in the visual designer, so I'm not sure what is causing it. Any help is appreciated.

alt text

Markup for the RadGrid is shown below:

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" OnItemCreated="RadGrid1_ItemCreated"
            OnDeleteCommand="RadGrid1_DeleteCommand" GridLines="None" AllowSorting="True"
            Skin="Web20" PageSize="20" FooterStyle-Wrap="false" >
            <MasterTableView EditFormSettings-PopUpSettings-Modal="True" EditMode="PopUp" DataSourceID="SqlDataSource1"
                AutoGenerateColumns="False" DataKeyNames="ID" ShowFooter="True" AllowPaging="True">
                <Columns>
                    <telerik:GridBoundColumn DataField="Date Submitted" DataType="System.DateTime" HeaderText="Date Submitted"
                        ReadOnly="True" SortExpression="Date Submitted" UniqueName="Date Submitted">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ReqCategory" HeaderText="ReqCategory" SortExpression="ReqCategory"
                        UniqueName="ReqCategory" Visible="False">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title" SortExpression="Title"
                        UniqueName="Title">
                    </telerik:GridBoundColumn>
                    <%-- <telerik:GridBoundColumn DataField="Description" HeaderText="Description" 
                        SortExpression="Description" UniqueName="Description">
                    </telerik:GridBoundColumn>--%>
                    <telerik:GridBoundColumn DataField="Owner" HeaderText="Owner" SortExpression="Owner"
                        UniqueName="Owner">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Requestor" HeaderText="Requestor" SortExpression="Requestor"
                        UniqueName="Requestor">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status"
                        UniqueName="Status">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Requested Completion" HeaderText="Requested Completion"
                        SortExpression="Requested Completion" UniqueName="Requested Completion">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Estimated Completion" HeaderText="Estimated Completion"
                        SortExpression="Estimated Completion" UniqueName="Estimated Completion">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Ticket Submitted By" HeaderText="Ticket Submitted By"
                        SortExpression="Ticket Submitted By" UniqueName="Ticket Submitted By">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="View Ticket" UniqueName="TemplateViewColumn">
                        <ItemTemplate>
                            <asp:HyperLink ID="ViewLink" runat="server" Text="View"></asp:HyperLink>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Edit Ticket" UniqueName="TemplateEditColumn">
                        <ItemTemplate>
                            <asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridButtonColumn HeaderText="Drop Ticket" Text="Drop" CommandName="Delete"
                        UniqueName="Drop" ConfirmText="Are you sure you want to drop this ticket?" ConfirmTitle="Drop Ticket" ConfirmDialogType="RadWindow">
                    </telerik:GridButtonColumn>
                </Columns>
                <EditFormSettings>
                    <PopUpSettings Modal="True"></PopUpSettings>
                </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>
A: 

I usually run into this when a width value for each column that does not add up to the width value of the RadGrid or leaving width values out altogether..

Try entering width values for each column but leave out the width value for the one column that would usually be the longest. In this case, I would choose the Title column.

Romany Saad
Hello Romany, I haven't specified a width for any of the columns in the RadGrid as the markup above shows.
kingrichard2005
Sorry, I posted my answer before you posted the markup.I created a test page here and filled it with your 2 test rows and could not duplicate the behavior.I used Telerik v2010.1.415.35. What version are you using?
Romany Saad
Hi Romany, I'm not sure how to find what version of RadControls I'm using. I just did an upgrade to latest version early last month. So unless there's been an update since then, it's safe to assume I have the latest version.
kingrichard2005
A: 

Got it, turns out I was setting the ColumnSpan to an arbitrary number, 2 in this case, in the code-behind where the RadGrid is generated and it was causing that additional space to appear at the end. I was doing this to test another issue that has since been resolved. The snippet of code that was causing this is as follows and is commented out in my code now.

footerItem.Cells(2).ColumnSpan = 2
kingrichard2005