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

RadGrid Appearance Issues

2 Answers 115 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chad Johnson
Top achievements
Rank 1
Chad Johnson asked on 03 Jan 2013, 07:51 PM

My application is using version 2012.3.1016.40 of the ASP.NET AJAX telerik controls.  My interface is using a RadTabStrip.  On Tab A I have the following RadGrid defined:

<telerik:RadGrid ID="radGridAttachments" runat="server" AutoGenerateColumns="false" AllowPaging="true" AllowCustomPaging="true"
    OnNeedDataSource="radGridAttachments_NeedDataSource" OnInsertCommand="radGridAttachments_InsertCommand" OnItemDataBound="radGridAttachments_ItemDataBound"
    Visible="false" OnDeleteCommand="radGridAttachments_DeleteCommand" OnItemCommand="radGridAttachments_ItemCommand">
    <MasterTableView CommandItemDisplay="Top" DataKeyNames="ID" NoMasterRecordsText="No Attachment records to display">
        <CommandItemTemplate>
            <telerik:RadButton ID="radButtonAdd" runat="server" Text="Add New Attachment" CommandName="InitInsert"
                Visible='<%# !radGridAttachments.MasterTableView.IsItemInserted %>'
                ButtonType="StandardButton" CssClass="button" Skin="Windows7" />
        </CommandItemTemplate>
        <Columns>
            <telerik:GridBoundColumn DataField="FileName" HeaderText="File" ReadOnly="true" />
            <telerik:GridDateTimeColumn DataField="UploadDate" DataFormatString="{0:MM/dd/yyyy hh:mm tt}" HeaderText="Upload Date" ReadOnly="true" />
            <telerik:GridBoundColumn DataField="UploadEmployee" HeaderText="Uploaded By" ReadOnly="true" />
            <telerik:GridBoundColumn DataField="Description" HeaderText="Description" />
            <telerik:GridTemplateColumn HeaderText="Attachment">
                <ItemTemplate>
                    <telerik:RadButton ID="radButtonView" runat="server" CommandName="ViewAttachment" Text="View" CssClass="button" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridButtonColumn UniqueName="DeleteColumn" ButtonType="PushButton" Text="Delete" CommandName="Delete" />
        </Columns>
        <PagerStyle AlwaysVisible="True" />
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <table>
                    <tr>
                        <td><asp:Label Text="File:" runat="server" /></td>
                        <td><telerik:RadAsyncUpload ID="radAsyncUpload" runat="server" InitialFileInputsCount="1" MaxFileInputsCount="1" ControlObjectsVisibility="None" /></td>
                    </tr>
                    <tr>
                        <td><asp:Label Text="Description:" runat="server" /></td>
                        <td><telerik:RadTextBox ID="radTextBoxFileDescription" runat="server" Text='<%# Bind("Description") %>' /></td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <telerik:RadButton ID="radButtonInsert" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                OnClientClicking="radButtonInsert_ClientClicking" CssClass="button">
                            </telerik:RadButton>
                            <telerik:RadButton ID="radButtonCancel" runat="server" Text="Cancel" CausesValidation="false"
                                CommandName="Cancel" CssClass="button">
                            </telerik:RadButton>                                                   
                        </td>
                    </tr>
                </table>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    </ClientSettings>
    <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>

The Tab A RadGrid is shown in the attachment named TabARadGrid.jpg.

On Tab B I have the following RadGrid defined:

<telerik:RadGrid ID="radGridClients" runat="server" AllowCustomPaging="True" AllowFilteringByColumn="true"
    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" GridLines="Horizontal"
    EnableLinqExpressions="False" Width="100%" Visible="false"
    OnNeedDataSource="radGridClients_NeedDataSource" OnItemDataBound="radGridClients_ItemDataBound"
    OnInit="radGridClients_Init" EnableHeaderContextMenu="true" GroupingEnabled="false">
    <GroupingSettings CaseSensitive="false" />
    <MasterTableView DataKeyNames="ID" AllowCustomSorting="true" NoMasterRecordsText="No Client records to display">
        <Columns>
            <telerik:GridHyperlinkColumn DataNavigateUrlFields="ID" DataTextField="ID" HeaderText="Client ID" SortExpression="ID" UniqueName="ClientID" />
            <telerik:GridBoundColumn DataField="LastName" HeaderText="Last" SortExpression="LastName" UniqueName="LastName" />
            <telerik:GridBoundColumn DataField="FirstName" HeaderText="First" SortExpression="FirstName" UniqueName="FirstName" />
            <telerik:GridBoundColumn DataField="MiddleName" HeaderText="Middle" SortExpression="MiddleName" UniqueName="MiddleName" />
            <telerik:GridBoundColumn DataField="SSN4" HeaderText="SSN4" SortExpression="SSN4" UniqueName="SSN4" />
        </Columns>
        <PagerStyle AlwaysVisible="True" />
    </MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    </ClientSettings>
    <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>

The Tab B RadGrid is shown in the attachment named TabBRadGrid.jpg.

In my Web.Config file I have the following line in the <appSettings> section:

<add key="Telerik.Skin" value="Office2010Blue" />

I am not applying any further styling of my own to the RadGrids.

My first question is why does the Tab B RadGrid have bold lines in the header and footer and around the "No records..." message and the Tab A RadGrid doesn't?

My second question is how do I get the Tab B RadGrid to look like the Tab A RadGrid (no bold lines, etc.)?

 



2 Answers, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 08 Jan 2013, 04:32 PM
Hi Chad,

To resolve the problem with unwanted borders you should remove GridLines ="Horizontal" from the Tab B RadGrid declaration. Give this a try and let us know about the result.

Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Chad Johnson
Top achievements
Rank 1
answered on 08 Jan 2013, 04:38 PM
That was the problem.  I should have known it would be something simple.  Thank you Pavlina!
Tags
Grid
Asked by
Chad Johnson
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Chad Johnson
Top achievements
Rank 1
Share this question
or