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

Default Skin in GridDateTimeColumn Editor / Grid with Custom Skin

7 Answers 165 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris Castle
Top achievements
Rank 1
Chris Castle asked on 13 Feb 2009, 07:36 AM
I have a grid that uses a custom skin.  It has a column editor that I want to use an embedded skin.

I wrote some code to change the skin in the Item Created, but I get a error.


Code:

 

protected

 

void CancellationsGrid_ItemCreated(object sender, GridItemEventArgs e)

 

{

 

 if (e.Item is GridEditableItem && e.Item.IsInEditMode)

 

 {

 

  RadDatePicker picker = ((e.Item as GridEditableItem)["DateColumn"].Controls[0] as RadDatePicker);

 

 

  if (picker != null)

 

  {

   picker.EnableEmbeddedSkins =

true;

 

   picker.Skin =

"Sunset";

 

  }

 }

}

 

 

 

 

Error:

Message:

 

InvalidOperationException: Telerik.Web.UI.DatePickingInput with ID='dateInput' was unable to find embedded skin with name 'CoffeeShop'. Please, make sure that you spelled the skin name correctly, or if you want to use a custom skin, set EnableEmbeddedSkins=false.

 

Source:

 

   at Telerik.Web.SkinRegistrar.GetEmbeddedSkinAttributes(ISkinnableControl control, Type controlType)

   at Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl _control)

   at Telerik.Web.UI.RadWebControl.RegisterCssReferences()

   at Telerik.Web.UI.RadWebControl.OnPreRender(EventArgs e)

   at Telerik.Web.UI.RadInputControl.OnPreRender(EventArgs e)

   at Telerik.Web.UI.RadDateInput.OnPreRender(EventArgs e)

   at Telerik.Web.UI.DatePickingInput.OnPreRender(EventArgs e)

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Control.PreRenderRecursiveInternal()

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



I tried to also set
picker.DateInput.EnableEmbeddedSKins = true;

It didn't help.  I keep getting the same error.

Is it possible to accomplish this?

7 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Feb 2009, 11:59 AM
Hello Chris,

Try setting EnableEmbeddedSkins to false for the grid and see if ite helps.
aspx:
<telerik:RadGrid ID="RadGrid1" EnableEmbeddedSkins="false" Skin="customSkin" DataSourceID="SqlDataSource1" runat="server"
</telerik:RadGrid> 

Thanks
Princy.
0
Chris Castle
Top achievements
Rank 1
answered on 16 Feb 2009, 05:29 PM
The grid is set to enableembeddedskins=false and the grid is working fine. 

The issue is that I want the Grid to use a custom skin, which it curently does just fine.  And I want the datepicker to use an embedded skin, which it won't do right now.
0
Sebastian
Telerik team
answered on 16 Feb 2009, 05:35 PM
Hello Chris,

Can you please verify that you are using the latest release 2008.3.1314 of RadControls for ASP.NET AJAX in your project? Your code implementation seems correct, therefore if the issue persists please let us know and we will research the matter further and prepare a sample application for you.

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
Chris Castle
Top achievements
Rank 1
answered on 16 Feb 2009, 05:36 PM
I am using the latest release.  Do you need a sample project?
0
Accepted
Sebastian
Telerik team
answered on 19 Feb 2009, 03:55 PM

Hello Chris,

Unfortunately after further investigation we were able to replicate the issue locally. Unfortunately at this point it is not possible to implement a fix for this problem - please excuse us for the inconvenience this might cause you.

The only option you might consider is to take the external Sunset skin for RadDatePicker (residing in the Skins folder of the installation), rename it to CoffeeShop and register it as a custom skin on the page. Thus this artificially made custom skin will be applied to the date picker. I hope this is feasible for you.

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
Chris Castle
Top achievements
Rank 1
answered on 19 Feb 2009, 04:37 PM
Thanks.  Does this count as a Bug Report as far as Telerik Points are concerned?

0
Sebastian
Telerik team
answered on 20 Feb 2009, 09:00 AM
Hello Chris,

I spoke with one of our developers on this subject and found out that this is considered rather as a limitation/not supported scenario than as a bug in the control. I updated your Telerik points for drawing our attention to this detail.

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.
Tags
Grid
Asked by
Chris Castle
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Chris Castle
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or