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

Remove 'Add New Record' command bar color in Telerik Grid

8 Answers 243 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dilip
Top achievements
Rank 1
Dilip asked on 23 Jul 2011, 06:59 PM
Remove 'Add New Record' command bar color in Telerik Grid

hi ,

i am using a TeleriK grid - Skin = Vista
i have a command bar for adding more records - "Add New Record"
All the functionality is working fine...

My issue is related to look and feel

I want the same look of Grid Headder for the command bar

i want command bar color alos in light blue, as the same of Grid headder

8 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 25 Jul 2011, 05:22 PM
Hi Dilip,

You could achieve your goal, by defining custom CSS class like the following:
<style type="text/css">
        table.rgCommandTable
        {
            background: lightBlue;
        }
  
    </style>

Regards,
Andrey
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Dilip
Top achievements
Rank 1
answered on 28 Jul 2011, 10:14 AM
Hi,
   I tried by defining the custom css class as you told but could not achieve it.

I also tried through settings of the grid control as,
<rad:RadGrid
CommandItemStyle-
BackColor="lightblue"
CommandItemStyle-Font-Bold="true"
which didnt help me

But when tried through the declaration of MasterTableView

<MasterTableView  CommandItemDisplay="Top"
            
CommandItemStyle-BackColor="lightblue"
            
CommandItemStyle-Font-Bold="true"  >
I could just see the blink of lightBlue on my commandItem ,when i refresh my page (that too only for a limited no.of times)
 So,Please suggest me the solution
Thanks in advance
0
Shinu
Top achievements
Rank 2
answered on 28 Jul 2011, 10:51 AM
Hello Dilip,

I have tried the same CSS and that worked as expected at my end. Here is the full aspx.
aspx:
<head runat="server">
    <title></title>
    <style type="text/css">
       table.rgCommandTable
        {
            background: lightBlue;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager runat="server" ID="ScriptManager1" />
        <telerik:RadGrid ID="RadGrid1" runat="server"
            OnNeedDataSource="RadGrid1_NeedDataSource"  ShowStatusBar="true" Width="100px" >
            <ExportSettings OpenInNewWindow="true" />
            <MasterTableView CommandItemDisplay="Top" >
            </MasterTableView>
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>

Thanks,
Shinu.
0
Dilip
Top achievements
Rank 1
answered on 02 Aug 2011, 10:49 AM
Thanks shinu that worked for me.
But i am unable to change the color of the font in the CommandItem.
When i changed the color of the commanditem to blue ,the font color has changed to white.But i want the font to be in black.I tried to give the color attribute in rgCommandTable,div.RadGrid_Default,MasterTable_Default,rgMasterTable but I could not get it.

So,please help me,
thanks in advance
0
Princy
Top achievements
Rank 2
answered on 02 Aug 2011, 10:59 AM
Hello Dilip,

Try overriding the default CSS as shown below.
CSS:
<style type="text/css">
.RadGrid_Default .rgCommandRow a
{
    color:Black !important;
}
</style>

Thanks,
Princy.
0
Dilip
Top achievements
Rank 1
answered on 02 Aug 2011, 11:13 AM
Hi,
Thanks for your reply.
I tried overriding the default CSS as you have suggested.but no results achievied.

Can you please tell me some other approach?
0
Jayesh Goyani
Top achievements
Rank 2
answered on 02 Aug 2011, 11:18 AM
hello,

.rgCommandRow a {
 
    color: red  !important
    text-decoration: none;
}

Please try above style to set font color and let me know its working or not.

Thanks,
Jayesh Goyani
0
Dilip
Top achievements
Rank 1
answered on 02 Aug 2011, 11:22 AM
Thank you.. It is working :)
Tags
Grid
Asked by
Dilip
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Dilip
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Princy
Top achievements
Rank 2
Jayesh Goyani
Top achievements
Rank 2
Share this question
or