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

detailtable backcolor and numeric textbox width

2 Answers 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Priya
Top achievements
Rank 1
Priya asked on 19 Jan 2009, 09:43 AM
sir,
I want to set

 

 

 

CommandItemStyle-BackColor="red" 
 

 

 

 

 

 

 of detailtable of radgrid..but its not working..

I also want to set the radnumerictextbox width.For tht i used

 

 

 

 

 

 

<telerik:RadNumericTextBox  style="width:5px;  
 
 

but its also not working.
plz help me...

Thanks

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Jan 2009, 11:15 AM
Hello Priya,

You can work around setting the style of the command row in the ItemCreated event of the grid:
cs:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if ((e.Item is GridCommandItem)) 
        { 
            GridCommandItem commandItem = e.Item as GridCommandItem; 
            if (commandItem.OwnerTableView.Name == "Detail") 
            { 
                commandItem.BackColor = System.Drawing.Color.Purple; 
            } 
        }  
    } 

And you can set the width of RadNumericTextBox as shown below:
aspx:
 <telerik:RadNumericTextBox Width="5px" ID="RadNumericTextBox1" runat="server"
    </telerik:RadNumericTextBox> 

Thanks
Princy.
0
Daniel
Telerik team
answered on 22 Jan 2009, 09:21 AM
Hello Priya,

Alternatively you can set the styles using CSS:
<CommandItemStyle CssClass="myClass" /> 

<style type="text/css"
.myClass 
    backgroundblue none !important; 
</style> 

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Priya
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Daniel
Telerik team
Share this question
or