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

Can't get RadInputManager Skins to work in RadGrid Editform usercontrol

9 Answers 124 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steve Y
Top achievements
Rank 2
Steve Y asked on 15 Dec 2008, 09:32 AM
I have a demo grid I just got working with Vlad's help with the new IBindableControl capability using a UserControl for the Edit Template. I have some asp:Textbox controls in the Usercontrol and I just tried to get validation going using the new RadInputManager. I've set two of the textboxes to be TextBoxes with just an empty message. The empty message displays but the skin formating does not. The Grid has a default skin and I've set the skin for the RadInputManager to be Office2007. If I put the code inside a normal aspx page it works as expected.

<%` Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
 
<asp:TextBox runat="server" ID="FirstName" Text='<%# Bind("FirstName") %>' TabIndex="1" /> 
<asp:TextBox runat="server" ID="LastName" Text='<%# Bind("LastName") %>' TabIndex="2" /> 
                                                 
<div style="text-align: right; clear: both;"
    <asp:Button ID="Button2" Text='<%# ((GridItem)Container).OwnerTableView.IsItemInserted? "Insert" : "Update" %>' 
        CommandName='<%# ((GridItem)Container).OwnerTableView.IsItemInserted? "PerformInsert" : "Update" %>' 
        runat="server" /> 
    <asp:Button ID="Button3" Text="Cancel" CommandName="Cancel" runat="server" /> 
</div> 
 
<telerik:RadInputManager ID="RadInputManager1" runat="server" Skin="Office2007"
    <Telerik:TextBoxSetting EmptyMessage="First Name"
        <TargetControls> 
            <Telerik:TargetInput ControlID="FirstName" /> 
        </TargetControls> 
    </Telerik:TextBoxSetting> 
    <Telerik:TextBoxSetting EmptyMessage="Last Name"
        <TargetControls> 
            <Telerik:TargetInput ControlID="LastName" /> 
        </TargetControls> 
    </Telerik:TextBoxSetting> 
</telerik:RadInputManager> 


Is this a bug or am I doing something wrong?

Thanks, Steve



9 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 15 Dec 2008, 11:26 AM
Hi Steven,

Currently the RadGrid skins define some styles for the EditForm textboxes and these styles have higher specificity than RadInputManager styles. That's why the RadInputManager styles are not applied. We will fix this for our next release.

Greetings,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Steve Y
Top achievements
Rank 2
answered on 15 Dec 2008, 03:19 PM
I tried the RadFormDecorator to see if it would work but I get the same result. Is this something that needs to be resolved too?
0
Accepted
Dimo
Telerik team
answered on 15 Dec 2008, 05:35 PM
Hi Steven,

Yes. What we will most probably do for Q1 2009, is to remove all styling for RadGrid textboxes, which comes from the RadGrid skins and leave developers style textboxes according to their preference (by using RadInputManager, RadFormDecorator, custom CSS, whatever).

Greetings,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
oVan
Top achievements
Rank 2
answered on 17 Mar 2009, 07:29 AM
In the Q1 release I see that other columns in the grid are still styled according to the grid, and controls in template columns are sometimes not styled at all. 

I have a RadFormDecorator set to style Sunset, a RadGrid set to Sunset.

In the EditItemTemplate of a templatecolumn I have a RadComboBox and a RadSlider with no skin defined. Both are rendered using the Default skin? A GridDropDownColumn in the same grid does get the Sunset skin.

I hope this gets fixed too, otherwise I don't see the point in using a RadFormDecorator it if only works partially.

Thanks!
0
Sebastian
Telerik team
answered on 17 Mar 2009, 11:17 AM
Hello oVan,

RadControls which are part of built-in RadGrid elements (columns, column filters, slider pager, etc.) will automatically fetch the skin applied for the grid itself. When you use RadControls inside grid templates, you will need to specify the skins for them explicitly through their Skin property to synchronize with the RadGrid skin setting.

I hope this explanation is helpful.

Kind regards,
Sebastian
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
oVan
Top achievements
Rank 2
answered on 17 Mar 2009, 04:44 PM
Hi Sebastian,

Thank you for your answer, I understand your explanation but I don't see why these controls are not skinned by RadFormDecorator or RadInputManager, just as the original post was mentioning. 

Thanks again for any insight.
0
Sebastian
Telerik team
answered on 20 Mar 2009, 09:36 AM
Hi oVan,

RadFormDecorator styles html elements (checkboxes, buttons, radio buttons, etc.) as shonw in its demos:

http://demos.telerik.com/aspnet-ajax/formdecorator/examples/overview/defaultcs.aspx

RadInputManager can filter the input for regular MS TextBox controls which can be part of RadGrid as well. See this demo for details:

http://demos.telerik.com/aspnet-ajax/input/examples/radinputmanager/dynamicinputfiltersettings/defaultcs.aspx?product=grid

I hope this explanation is helpful.

Regards,
Sebastian
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
oVan
Top achievements
Rank 2
answered on 20 Mar 2009, 09:46 AM
From my point of view: if I set a skin="blabla" on the RadGrid, it should propagate this skin setting automatically to all contained controls, no matter if they are in a template column or in some of its own generated columns. If I want a certain control in a template column to have a different look, I can then specify a different skin on that control.

As it is now, controls in template columns are not rendered with the same skin of the RadGrid. So in this case I expect the RadFormDecorator to take over, since that is what it is made for.

The point is: why doesn't the RadFormDecorator style the buttons and input controls inside the RadGrid control? I know it doesn't work like that currently, but surely that's either a bug in the current implementation or perhaps it is by design. In the latter case there is some serious problem I guess, because the very purpose of this control is to style these elements.
0
Sebastian
Telerik team
answered on 20 Mar 2009, 10:53 AM
Hello oVan,

As explained in my previous reply, RadFormDecorator can style html elements and not Telerik controls no matter whether they are placed inside RadGrid templates or not. Nevertheless, it should style regular buttons/checkboxes inside RadGrid shown on this online demo:

http://demos.telerik.com/aspnet-ajax/formdecorator/examples/formdecoratorandradcontrols/defaultcs.aspx

I will forward your suggestion about default synchronization of skins for RadControls which reside in RadGrid templates to our dev team. If this appears to be a common request and possible enhancement, you may see it included in a future version of the product.

A possible solution currently is to use our RadSkinManager control to apply skins for all controls on the page. You can see it in action on most of the RadGrid demos, for example this one:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx (use the 'Change skin'  dropdown at the top of the page)

Greetings,
Sebastian
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Steve Y
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Steve Y
Top achievements
Rank 2
oVan
Top achievements
Rank 2
Sebastian
Telerik team
Share this question
or