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

How do I change MasterTableViewEditForm background color?

5 Answers 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
donoho
Top achievements
Rank 1
donoho asked on 28 Jul 2009, 08:15 PM
I've done several variations on on forum searches and looked through the help, but I'm not finding the solution I seek (if it exists).

I have a RadGrid whose editform background color I'd like to change (ideally make it transparent), but I can't find the property to do this.

I'm using the Simple skin.  I've gone to the Visual Style Editor to see of this was changeable.  No go. 
I've tried to go through the property builder > Master table > Styles manager > General table style > Back color.  No go.
I've gone in through the properties pane:
MasterTableView > BackColor
MasterTableView > EditFormSettings > FormStyle > BackColor
MasterTableView > EditFormSettings > FormMainTableStyle > BackColor
MasterTableView > EditFormSettings > FormTableStyle > BackColor

I've changed them individually and all together.

Any help / direction?

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Jul 2009, 04:36 AM
Hi,

I was able to set the back color for the autogenerated editform as shown below.

ASPX:
 
 <EditFormSettings> 
     <FormStyle  BackColor="transparent"/> 
  </EditFormSettings> 


If you have set the EditMode to Inplace you may set the BackColor as shown below.

ASPX:
 
 <EditItemStyle BackColor="transparent"/>  

Thanks
Shinu.
0
donoho
Top achievements
Rank 1
answered on 30 Jul 2009, 06:30 PM
Thank you Shinu, unfortunately, this didn't work for me.

Additional Info:

I'm using the Simple skin and EditFormType Template with an auto-generated edit column.

When edit is clicked, the form has a white background, which I'm trying to remove.
0
Shinu
Top achievements
Rank 2
answered on 31 Jul 2009, 06:07 AM
Hi,

I tried with Simple Skin and FormTemplate editform.  I was able to set the back color of the EditForm using the FormStyle-BackColor.

Here is the entire aspx code:
 
   <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" PageSize="5" AutoGenerateEditColumn="true"  Skin="Simple"  AllowMultiRowSelection="true" DataSourceID="SqlDataSource1" GridLines="None" OnPreRender="RadGrid1_PreRender"
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="ProductID"  DataSourceID="SqlDataSource1"
               
                <Columns> 
                    <telerik:GridBoundColumn DataField="ProductID" DataType="System.Int32" HeaderText="ProductID" 
                        ReadOnly="True" SortExpression="ProductID" UniqueName="ProductID"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="SupplierID" DataType="System.Int32" HeaderText="SupplierID" 
                        SortExpression="SupplierID" UniqueName="SupplierID"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" 
                        UniqueName="ProductName"
                    </telerik:GridBoundColumn> 
                    <telerik:GridClientSelectColumn></telerik:GridClientSelectColumn> 
                </Columns> 
              <EditFormSettings EditFormType="Template" FormStyle-BackColor="PaleVioletRed" > 
                            <FormTemplate> 
                                <div>ProductName: <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></div
                                <div>Product ID : <asp:TextBox ID="TextBox2"  runat="server"></asp:TextBox></div
                                <asp:Button ID="Button2" runat="server" CommandName="Update"  Text="Update" /> 
                                <asp:Button ID="Button3" runat="server" CommandName="Cancel"  Text="Cancel" /> 
                            </FormTemplate> 
                        </EditFormSettings> 
            </MasterTableView> 
            <ClientSettings> 
             <Selecting AllowRowSelect="true"  /> 
            </ClientSettings> 
        </telerik:RadGrid> 


Here is the screen shot of my Grid edit form:
EditForm

Thanks
Shinu
0
donoho
Top achievements
Rank 1
answered on 31 Jul 2009, 05:08 PM
Thanks again Shinu,

Here's what worked for me.

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="sqlds" GridLines="None" Skin="Simple" Width="939px" AllowPaging="True" AutoGenerateColumns="False"  
    AutoGenerateEditColumn="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" PageSize="3" BackColor="Transparent"

For whatever reason it did not occur to me to change the BackColor of the Grid itself. :-/
0
Eon
Top achievements
Rank 1
answered on 22 Dec 2015, 08:30 AM
Thanks, your answer worked for my requirements.
Tags
Grid
Asked by
donoho
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
donoho
Top achievements
Rank 1
Eon
Top achievements
Rank 1
Share this question
or