Grid - Rounded Corners


Modern Browsers:

Customer IDCompany NameContact NameContact TitleAddressPostal Code
 Item 1 to 5 of 30
Page:
of 6 Page size:
ALFKIAlfreds FutterkisteMaria AndersSales RepresentativeObere Str. 5712209
ANATRAna Trujillo Emparedados y heladosAna TrujilloOwnerAvda. de la Constitución 222205021
ANTONAntonio Moreno TaqueríaAntonio MorenoOwnerMataderos 231205023
AROUTAround the HornThomas HardySales Representative120 Hanover Sq.WA1 1DP
BERGSBerglunds snabbköpChristina BerglundOrder AdministratorBerguvsvägen 8S-958 22

Cross-browser solution:

Customer IDCompany NameContact NameContact TitleAddressPostal Code
 Item 1 to 5 of 30
Page:
of 6 Page size:
ALFKIAlfreds FutterkisteMaria AndersSales RepresentativeObere Str. 5712209
ANATRAna Trujillo Emparedados y heladosAna TrujilloOwnerAvda. de la Constitución 222205021
ANTONAntonio Moreno TaqueríaAntonio MorenoOwnerMataderos 231205023
AROUTAround the HornThomas HardySales Representative120 Hanover Sq.WA1 1DP
BERGSBerglunds snabbköpChristina BerglundOrder AdministratorBerguvsvägen 8S-958 22

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB
There are two ways to round off the corners of the RadGrid.

The first one is easier and can be acheived with the following CSS rule:

.RadGrid
{
   border-radius: 10px;
   overflow: hidden;
}
Unfortunately this is supported only in modern browsers as Firefox, IE 9+, Chrome, Opera and Safari.

For cross-browser support you need to create an image which can be used for rounding off the corners.

  • DefaultCS.aspx
  • scripts.js
  • styles.css
<%@ Page Language="c#"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    <script src="scripts.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <br />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <h3 style="color: #333333; font-size: 16px; font-weight: normal; margin: 0 0 15px;">Modern Browsers:</h3>
    <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" Skin="MetroTouch" CssClass="RadGrid_ModernBrowsers"
        AllowPaging="True" PageSize="5" AllowSorting="True">
        <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
        <MasterTableView Width="100%">
        </MasterTableView>
    </telerik:RadGrid>
    <br />
    <h3 style="color: #333333; font-size: 16px; font-weight: normal; margin: 0 0 15px;">Cross-browser solution:</h3>
    <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid2" DataSourceID="SqlDataSource1" runat="server" Skin="MetroTouch" CssClass="RadGrid_Rounded"
        AllowPaging="True" PageSize="5" AllowSorting="True">
        <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
        <MasterTableView Width="100%">
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnGridCreated="onGridCreated" />
        </ClientSettings>
    </telerik:RadGrid>
    <br />
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT TOP 30 CustomerID, CompanyName, ContactName, ContactTitle, Address, PostalCode FROM Customers"
        runat="server"></asp:SqlDataSource>
    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?