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

Images not showing in GridDateTimeColumn

30 Answers 404 Views
Grid
This is a migrated thread and some comments may be shown as answers.
newbie
Top achievements
Rank 1
newbie asked on 24 Apr 2008, 07:13 PM
I have a GridDateTimeColumn as :


<

telerik:GridDateTimeColumn DataField="OrderDate" HeaderText="Order Date" SortExpression="OrderDate"

UniqueName="OrderDate" DataFormatString="{0:d}" PickerType="DateTimePicker">

</telerik:GridDateTimeColumn>



The images does not load when the project is running.

30 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 25 Apr 2008, 04:24 AM
Hi Newbie,

When in browser mode, GridDateTimeColumn looks and behaves like a standard GridBoundColumn. When in edit mode, however, it displays a RadDateInput, RadDatePicker, RadTimePicker, or RadDateTimePicker control. Go through the following help document link for more details.
Column types

Thanks
Princy.
0
newbie
Top achievements
Rank 1
answered on 25 Apr 2008, 05:17 PM
yes but I don't understand why the image for my datepicker is not loading in my edit mode.
0
Dimo
Telerik team
answered on 28 Apr 2008, 11:31 AM
Hello Anumeha,

Are you by any chance using a custom RadGrid skin in your scenario? What is the URL of the broken image?

Here is a working example with RadDateTimePicker inside a RadGrid:

http://telerik.com/demos/aspnet/prometheus/Controls/Examples/Integration/GridEditors/DefaultCS.aspx

If you still have problems, please provide more details about how are you using RadGrid and RadDateTimePicker, so that we can give further advice.


All the best,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
newbie
Top achievements
Rank 1
answered on 28 Apr 2008, 03:31 PM
Thanks Dimo,

yes I am using a custom skin for RadGrid. is that what's causing the problem.
Do i need to have custome skin for RadDatePicker too?

what do you mean by the URl of the broken image.The GridDateTimeColumn does not let me specify an image path.

This is how my grid is specified:

<

telerik:RadGrid ID="grdOrderDetails" runat="server" ImagesPath="../RadControls/UTC/Grid"EnableEmbeddedSkins="false" Skin="UTC" OnNeedDataSource="grdOrderDetails_NeedDataSource"AllowPaging="True" AllowSorting="True" GridLines="None" PageSize="10" AutoGenerateColumns="False">
<PagerStyle Mode="NextPrevAndNumeric" />
<MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="RailItemID, CommissionOrderID" HorizontalAlign="NotSet" AutoGenerateColumns="False" EditMode="InPlace">

<Columns>
<telerik:GridDateTimeColumn DataField="OrderDate" HeaderText="Order Date" SortExpression="OrderDate" UniqueName="OrderDate" DataFormatString="{0:d}" PickerType="DatePicker">
</telerik:GridDateTimeColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>

0
Dimo
Telerik team
answered on 29 Apr 2008, 10:54 AM
Hello Anumeha,

Thanks for providing a code snippet.

As of Q1 2008 Service Pack 1 (due in mid-May 2008) you will be able to set Imagespath for a GridDateTimeColumnEditor element and use this element as an editor for a  GridDateTimeColumn.

In the meantime, here is how to set ImagesPath in code-behind as a workaround:

http://www.telerik.com/community/forums/thread/b311D-bcgdtk.aspx

Let us know if you need additional information.

Kind regards,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
newbie
Top achievements
Rank 1
answered on 29 Apr 2008, 06:46 PM
thanks for giving the quick response.

I am using a datePicker in the GridTemplateColumn now and that works properly.

My background image for the calendar still does not show though
0
Dimo
Telerik team
answered on 30 Apr 2008, 07:23 AM
Hi Anumeha,

I suppose your RadCalendar appears without a skin. Do you have a custom skin for RadDateTimePicker and RadCalendar with the same name as the RadGrid's custom skin, registered on the page?

Sincerely yours,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
newbie
Top achievements
Rank 1
answered on 30 Apr 2008, 04:25 PM
I have put a custom skin for RadCalendar but it does not help
My Custom skin for grid is 'Grid.Custom.css' and for calendar is 'Calendar.Custom.css'. I don't see a custom skin for the RadDatePicker in the Telerik Installation folder.Do I need to put one for that too for the Calendar skin to show?
0
Dimo
Telerik team
answered on 06 May 2008, 08:54 AM
Hi Anumeha,

If you already have a Calendar.Custom.css file, please make sure that you have correctly registered it on the web page, similarly to the Grid.Custom.css file.

RadDatePicker does not have a skin of its own - as this control uses RadInput and RadCalendar controls, it uses also their skins. (I did not explain this very well in my previous post, sorry)

Let us know how it goes.

Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
newbie
Top achievements
Rank 1
answered on 06 May 2008, 04:31 PM
I registered the custom skin for calendar again and it works fine now.
I guess it didn't get registered well the last time.

Thanks for the time.
0
Guss
Top achievements
Rank 2
answered on 15 May 2008, 08:33 PM
Hi, I have the same issue.
I use telerik:GridDateTimeColumn
(not the GridDateTimeColumnEditor)

I use a custom skin for my grid and it is correrctly cofigured.
Then I also use a custom skin for the calendar.
The skin DOES load, because all the styling is correct and if I cange something in the stylesheet I see the change.

BUT

the images like:
datePickerPopupHover.gif
fastNavLeft.gif
are not referenced in the css!

It points to the same directory in which the aspx page is in.
I'm referin to the calendar in the filter row of the grid.
0
Dimo
Telerik team
answered on 16 May 2008, 06:03 AM
Hello Guss,

Please find attached a sample web page demonstrating two different ways to set ImagesPath for the DateTimePicker and Calendar.

The first approach is to use a GridDateTimeColumnEditor and set ImagesPath there. The second approach uses RadGrid ItemCreated handler. The first approach requires Q1 2008 Service Pack 1, released yesterday.

Let us know if you need more information.


Regards,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Guss
Top achievements
Rank 2
answered on 16 May 2008, 10:42 AM
Hi Dimo

Its actually NOT in the editform where the problem is.
(Both the solutions works for the edit-form)

It is actually on the filter row of the grid, and the proposed solutions does not have an effect here.

Guss
0
Dimo
Telerik team
answered on 16 May 2008, 11:17 AM
Hello Guss,

The solution for the filtering datepicker is similar:

http://www.telerik.com/community/forums/thread/b311D-bcgdtk.aspx#495153

(Stephen's post from 3/13/2008 11:17:20 AM)


Kind regards,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Chris
Top achievements
Rank 1
answered on 22 Sep 2008, 09:34 PM
Hi,

I am using the most recent version Q2 826.  I am also having the same issue.  I use a custom skin for my Grid.  And I also specify GridDateTimeColumnEditor with the image path correctly set up.  However I still don't get the calendar control to show correctly when it is in the InPlace Edit mode.

When I clicked on the image property, it doesn't show the reference like your sample to http://demos.telerik.com/aspnet/prometheus/WebResource.axd?d=HBVQ1xlTspp...etc but instead it shows the reference to the location of my current ascx file with datePickerPopup.gif append to the end of the location.  eg. Website/myfolder/datePickerPopup.gif which my file locates at Website/myfolder/myascx.ascx

I am attaching my code for your reference.
 
<link href="/RadControls/Grid/Skins/Windows/styles.css" rel="stylesheet" type="text/css" /> 
<link href="/RadControls/Calendar/Skins/myCustomCalendar/styles.css" type="text/css" rel="stylesheet" /> 
 
 
<telerik:GridDateTimeColumnEditor ID="GridDateTimeColumnEditor1" runat="server" ImagesPath="~/RadControls/Grid/Skins/Windows/Img/">  
</telerik:GridDateTimeColumnEditor> 
 
 
<telerik:RadGrid ID="RadGrid1" Skin="Windows" GridLines="None" runat="server" EnableEmbeddedSkins="false" Width="97%" AutoGenerateColumns="False"   
    OnUpdateCommand="RadGrid1_UpdateCommand" OnInsertCommand="RadGrid1_InsertCommand" OnDeleteCommand="RadGrid1_DeleteCommand"   
    OnItemDataBound="RadGrid1_ItemDataBound" ImagesPath="~/RadControls/Grid/Skins/Windows/Img/" OnNeedDataSource="RadGrid1_NeedDataSource">  
    <MasterTableView EditMode="InPlace" ItemStyle-HorizontalAlign="Center" AlternatingItemStyle-HorizontalAlign="center"   
        Width="100%" CommandItemDisplay="Top" HorizontalAlign="NotSet" AutoGenerateColumns="False">  
        <Columns> 
            <telerik:GridDateTimeColumn DataField="Start_date" HeaderText="Start Date" SortExpression="Start_date" UniqueName="Start_date" DataType="System.DateTime" PickerType="DatePicker" ColumnEditorID="GridDateTimeColumnEditor1"></telerik:GridDateTimeColumn> 
            <telerik:GridDateTimeColumn DataField="End_date" HeaderText="End Date" SortExpression="End_date" UniqueName="End_date" DataType="System.DateTime" PickerType="DatePicker" ColumnEditorID="GridDateTimeColumnEditor1"></telerik:GridDateTimeColumn> 
        </Columns> 
    </MasterTableView> 
</telerik:RadGrid> 
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Office2007"></telerik:RadWindowManager> 


Please advise.

Chris
0
Chris
Top achievements
Rank 1
answered on 24 Sep 2008, 01:56 PM
Telerik support,

any help please??

Chris
0
Dimo
Telerik team
answered on 25 Sep 2008, 09:30 PM
Hello Chris,

Thank you for the sample code. I manager to reproduce the problem. Please allow a little time for investigation, we'll get back to you afterwards.

Regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dimo
Telerik team
answered on 01 Oct 2008, 06:43 AM
Hello again,

The bug has been fixed and will be included in the coming Service Pack 2. Chris, I have updated your Telerik points for bringing the issue to our attention. Thanks.

All the best,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Chris
Top achievements
Rank 1
answered on 01 Oct 2008, 01:24 PM
Thanks.  When is the next service pack to be released?

Chris
0
Vlad
Telerik team
answered on 01 Oct 2008, 01:30 PM
Hi Chris,

We will upload our SP later today.

Greetings,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Chris
Top achievements
Rank 1
answered on 01 Oct 2008, 10:07 PM
I just tried it again with your most recent service pack 2 (2008.02.1001.20).  However it is still doesn't work.  And it looks like it's getting worse.  Previous version loads without any error and it just didn't load the image.  Now my ascx module doesn't even load and it gives me the following error.

DotNetNuke.Services.Exceptions.ModuleLoadException: Literal content ('������������') is not allowed within a 'Telerik.Web.UI.GridColumnCollection'. ---> System.Web.HttpParseException: Literal content ('������������') is not allowed within a 'Telerik.Web.UI.GridColumnCollection'. ---> System.Web.HttpParseException: Literal content ('������������') is not allowed within a 'Telerik.Web.UI.GridColumnCollection'. ---> System.Web.HttpException: Literal content ('������������') is not allowed within a 'Telerik.Web.UI.GridColumnCollection'. at System.Web.UI.CollectionBuilder.AppendLiteralString(String s) at System.Web.UI.TemplateParser.ProcessLiteral() --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings)


Please advise.

Chris
0
Vlad
Telerik team
answered on 02 Oct 2008, 06:28 AM
Hello Chris,

Can you verify if all tags are closet properly?

Best wishes,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Chris
Top achievements
Rank 1
answered on 02 Oct 2008, 01:41 PM
Yes,  it's all closed accordingly.  I am just using the same code which i sent you earlier.
0
Vlad
Telerik team
answered on 02 Oct 2008, 02:17 PM
Hello Chris,

Something is causing the page parser to fail. Can you try to format your code in source view using Visual Studio?

Kind regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Chris
Top achievements
Rank 1
answered on 02 Oct 2008, 03:17 PM
Thanks.  All the white spaces are becoming unreadable characters somehow.  I have to manually erase all the white space and type it again.

I am able to load the calendar image right next to the text box.  However, when I click on the image, it does open up the calendar but all of its styles are gone and background is even transparents.  Any advise?
(notes: I even tried to make the image path to point to telerik default calendar image folder, it displays as stated above as well)

Chris
0
Dimo
Telerik team
answered on 02 Oct 2008, 03:25 PM
Hi Chris,

The Calendar skin used for edit form date pickers must have the same name as the RadGrid skin. It looks as if you are trying to use different skin names at the moment (Windows and myCustomCalendar).

Greetings,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Chris
Top achievements
Rank 1
answered on 02 Oct 2008, 03:32 PM
So you mean I need to have my calendar skin named "Windows" as well, am I right?  Also do I need to place the whole calendar "Windows" skin inside the grid "Window" skin folder?

Currently I have
Calendar "Window" folder in different directory
~\RadControls\Calendar\Skins\Windows\
Grid "Window"
~\RadControls\Grid\Skins\Windows\

Would this work? or do i need to copy the css content from calendar to the grid css?
0
Dimo
Telerik team
answered on 02 Oct 2008, 03:39 PM
Hello Chris,

By default all child Telerik controls created inside a Telerik control have the same skin name. You could set a different skin name programmatically, depending on the scenario.

There are no requirements about the location of different custom skins for different controls. Since you are registering the custom skin CSS files manually, you can place them anywhere you find it convenient.

Regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Chris
Top achievements
Rank 1
answered on 02 Oct 2008, 03:48 PM
Hi,

I tried to create a new folder named "Window" under calendar folder and apparently it still doesn't work.

However, when I copy the content from calendar window style.css into my grid window style.css.  Everything started to work and show correctly.

For some reason, even I give it the same name for my calendar skin with my grid name, it seems it doesn't know how to pick it up unless i explicitly copy the content to the same css file from my calendar to grid.  Perhaps your approach doesn't really apply to my case.

But thanks for helping me out with all the issues.

Chris
0
Dimo
Telerik team
answered on 02 Oct 2008, 04:22 PM
Hello Chris,

The fact that the new Calendar Window skin works if you copy the CSS to another file means that the Calendar CSS file is not registered properly, please check.


Regards,
Dimo
the Telerik team

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