Skinning causes some images to disapear

36 posts, 0 answers
  1. Kia
    Kia avatar
    38 posts
    Member since:
    Mar 2008

    Posted 11 Mar 2008 Link to this post

    Hi,

    I'm trying to create a custom skin for the Grid control. I've adapted a skin from one of the existing ones and changed the images, but there are some images that were not in that skin folder(eg, datePickerPopup.gif for any date fields).

    So now my grid looks partially skinned with some missing images. Its looking for the default images in the project's root folder instead of the "ImagesPath" or where ever it used to. Also the popup calendar now looks horrible due to a change in skinning and lost its images.

    Is it possible to have the grid use the default images and settings unless I change them? If not, can I set it up to look in the ImagesPath folder? If not, where can I find a full list of css elements that control all the grid? eg, How can I find which element controls the calendar popup image and so on?


    Thanks,
    Kia
  2. Dimo
    Admin
    Dimo avatar
    8331 posts

    Posted 12 Mar 2008 Link to this post

    Hi Kia,

    Currently if you are using a custom non-embedded skin for RadGrid Prometheus, you can control the picker and Calendar images' URLs from the code-behind. Here is how to do it:

    ASPX:

    <telerik:RadGrid ID="RadGrid1" OnItemCreated="RadGrid1_ItemCreated"  />

    C#:

            protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
            { 
                if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
                {                
                    GridDateTimeColumnEditor gridColumnEditor = ((GridEditableItem)e.Item).EditManager.GetColumnEditor("HireDate"as GridDateTimeColumnEditor; 
                    if (gridColumnEditor != null)  
                    { 
                        RadDateTimePicker picker = gridColumnEditor.PickerControl as RadDateTimePicker; 
                        picker.DatePopupButton.ImageUrl = ".........."
                    } 
                } 
            } 
     

    As long as you have a reference to the picker, you can specify all Calendar images (next month, previous month, etc), for example:

    picker.Calendar.NavigationNextImage = ".......";
    picker.Calendar.NavigationPrevImage = ".......";
    picker.Calendar.FastNavigationNextImage = ".......";
    picker.Calendar.FastNavigationPrevImage = ".......";


    When the Grid has EnableEmbeddedSkins set to "False", it does not look for embedded images in the assembly, but requires the ImagesPath property. Unfortunately, RadGrid child controls such as DateTimePickers currently do not obey this property and you have to set image URLs manually.

    Let us know if you need more information.

    Greetings,
    Dimo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kia
    Kia avatar
    38 posts
    Member since:
    Mar 2008

    Posted 12 Mar 2008 Link to this post

    Thanks Dimo,

    So I'm guessing that I need to do this for every date field in the grid individually?

    Apart from "Imports Telerik.WebControls" what else will I need to import? I seem to be missing something to recognise "GridEditableItem". Are you able to post the sample in VB?

    Also an issue I have is that the site I'm creating is managed by people who will change their minds on layout and look 3 times a day. I'd much rather use a centralised CSS class. So this is not possible?

    thanks,
    Kia
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 13 Mar 2008 Link to this post

    Hello Kia,

    Yes, you will need to do that for every RadDateTimeColumn in the grid by accessing its column editor instance inside the ItemCreated handler. Additionally, with our Prometheus controls the namespace you need to add should be Telerik.Web.UI instead of Telerik.WebControls, namely:

    Using Telerik.Web.UI

    Here is the VB.NET version of the code converted with our free online converter:

    Protected Sub RadGrid1_ItemCreated(ByVal sender As ObjectByVal e As GridItemEventArgs) Handles RadGrid1.ItemCreated  
        If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then 
            Dim gridColumnEditor As GridDateTimeColumnEditor = TryCast((DirectCast(e.Item, GridEditableItem)).EditManager.GetColumnEditor("HireDate"), GridDateTimeColumnEditor)  
            If Not gridColumnEditor Is Nothing Then 
                Dim picker As RadDateTimePicker = TryCast(gridColumnEditor.PickerControl, RadDateTimePicker)  
                picker.DatePopupButton.ImageUrl = ".........." 
            End If 
        End If 
    End Sub 
     

    Unfortunately you can not use centralized css class for the date picker pop-up/navigation images simply because they are not rendered as part of css but rather with img tags. Instead you can set those images in a centralized folder and simply replace them with new ones if necessary.

    Best regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. sl6rp
    sl6rp avatar
    55 posts
    Member since:
    Sep 2012

    Posted 13 Mar 2008 Link to this post

    How would I do this if I use custom skins and one of the columns is a datetime for Filtering?  I allow the grid to generate automatic columns.  The grid is not editable but you can filter.  As it is now, the filter icon has a link to the calendar popup but since I am using a custom skin none of the images are available.

    I am hoping I can do something like this:
    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)  
            {  
                if (e.Item is GridFilteringItem)  
                {  
                      
                    RadDateTimePicker picker = gridColumnEditor.PickerControl as RadDateTimePicker;    
                        picker.DatePopupButton.ImageUrl =  ".....  
     
                }  
     
            } 
     but I am not sure of the correct syntax.  I also don't know the column name since the columns are generated automatically.

    Thanks

    -Brent


  7. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 13 Mar 2008 Link to this post

    Hello sl6rp,

    In order to access the RadDateTimePicker inside the column header (as part of the filtering item), try the following code intercepting the ItemCreated event of RadGrid:

    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)     
    {     
                if (e.Item is GridFilteringItem)     
                {     
                    foreach (GridColumn column in e.Item.OwnerTableView.AutoGeneratedColumns)  
                    {  
                     if (typeof(System.DateTime) == column.DataType)  
                     {  
                      RadDateTimePicker picker = (e.Item as GridFilteringItem)[column.UniqueName].Controls[0] as RadDateTimePicker;       
                      //Change the pop-up image url here
                      picker.DatePopupButton.ImageUrl =  ".....    
                     }   
                    }  
        
                }     
        
    }    
     

    Best regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. sl6rp
    sl6rp avatar
    55 posts
    Member since:
    Sep 2012

    Posted 13 Mar 2008 Link to this post

    Thansk Stephen for the example.  I can't seem to get it to work though.

    This is the error I get:
    {  
    Line 41:                         RadDateTimePicker picker = (e.Item as GridFilteringItem)[column.UniqueName].Controls[0] as RadDateTimePicker;  
    Line 42:                         picker.EnableEmbeddedSkins = false

    The picker: 

    Object reference not set to an instance of an object.

    If I remove 

    AllowFilteringByColumn

    ="true"

    The error goes away but then I can't filter.

    Here is my grid
    <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" Skin="DWDS" EnableEmbeddedSkins="false" ImagesPath="~/Skins/DWDS/Grid/" runat="server" GridLines="None" AllowPaging="true" ShowStatusBar="True"   
            PageSize="10" Width="100%" AllowSorting="True" ShowGroupPanel="True" OnItemCreated="RadGrid1_ItemCreated"    
            ClientSettings-AllowDragToGroup="true" ClientSettings-AllowColumnsReorder="true" ClientSettings-AllowExpandCollapse="true" ClientSettings-AllowGroupExpandCollapse="true" > 
            <PagerStyle Mode="NextPrevNumericAndAdvanced" /> 
            <ExportSettings IgnorePaging="true" FileName="File Export" /> 
            <MasterTableView DataSourceID="SqlDataSource1" AllowFilteringByColumn="true" HorizontalAlign="center" AutoGenerateColumns="True" DataKeyNames="TestDate" ShowFooter="true">  
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="25px" /> 
                </ExpandCollapseColumn> 
            </MasterTableView> 
        </telerik:RadGrid> 

    Here is the codebehind:
    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)  
            {  
                if (e.Item is GridFilteringItem)  
                {  
                    foreach (GridColumn column in e.Item.OwnerTableView.AutoGeneratedColumns)  
                    {  
                        if (typeof(System.DateTime) == column.DataType)  
                        {  
                            RadDateTimePicker picker = (e.Item as GridFilteringItem)[column.UniqueName].Controls[0] as RadDateTimePicker;  
                            picker.EnableEmbeddedSkins = false;  
                            picker.Skin = "DWDS";  
                            picker.DatePopupButton.ImageUrl = "~/Skins/DWDS/Calendar/DatePickerpopup.gif";  
                            picker.DatePopupButton.HoverImageUrl = "~/Skins/DWDS/Calendar/DatePickerpopupHover.gif";  
                            picker.TimePopupButton.ImageUrl = "~/Skins/DWDS/Calendar/Clock.gif";  
                            picker.TimePopupButton.HoverImageUrl = "~/Skins/DWDS/Calendar/ClockHover.gif";  
     
                            picker.Calendar.EnableEmbeddedSkins = false;  
                            picker.Calendar.Skin = "DWDS";  
                            picker.Calendar.NavigationPrevImage = "~/Skins/DWDS/Calendar/ArrowLeft.gif";  
                            picker.Calendar.NavigationNextImage = "~/Skins/DWDS/Calendar/ArrowRight.gif";  
                            picker.Calendar.FastNavigationNextImage = "~/Skins/DWDS/Calendar/fastNavRight.gif";  
                            picker.Calendar.FastNavigationPrevImage = "~/Skins/DWDS/Calendar/fastNavLeft.gif";  
                        }  
                    }  
     
                }  
     
            } 
  9. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 14 Mar 2008 Link to this post

    Hello sl6rp,

    It seems that I made a mistake by passing incorrect index to the Controls collection in my previous reply - excuse me for that.

    Actually you will need to access the second control from the Controls collection of the header cell to get reference to the date picker in it, namely:

    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)        
    {        
                if (e.Item is GridFilteringItem)        
                {        
                    foreach (GridColumn column in e.Item.OwnerTableView.AutoGeneratedColumns)     
                    {     
                     if (typeof(System.DateTime) == column.DataType)     
                     {     
                      RadDateTimePicker picker = (e.Item as GridFilteringItem)[column.UniqueName].Controls[1] as RadDateTimePicker;          
                      //Change the pop-up image url here  
                      picker.DatePopupButton.ImageUrl =  ".....       
                     }      
                    }     
           
                }        
           
    }       
     

    See the ItemCreated handler in this online demo for more info:

    http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/GeneralFeatures/Filtering/DefaultCS.aspx

    Best regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  10. sl6rp
    sl6rp avatar
    55 posts
    Member since:
    Sep 2012

    Posted 14 Mar 2008 Link to this post

    Stephen,

    I checked out the link you sent and changed the index as well.  I still get the same error.

    I modified the code slightly to see what control id was being returned (if any). 
     protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)  
            {  
                if (e.Item is GridFilteringItem)  
                {  
                    foreach (GridColumn column in e.Item.OwnerTableView.AutoGeneratedColumns)  
                    {  
                        if (typeof(System.DateTime) == column.DataType)  
                        {  
                            GridFilteringItem filteringItem2 = e.Item as GridFilteringItem;  
                            Response.Write(filteringItem2[column.UniqueName].Controls[1].ID.ToString() + "<br>");  
                            Response.Write(filteringItem2[column.UniqueName].Controls[1].ClientID + "<br>");  
                            Response.Write(filteringItem2[column.UniqueName].Controls[1].GetType().ToString() + "<br>"); 


    It finds the control to be of type RadDateInput and not a RadDateTimePicker.  While digging around I found that Control[0] was a RadDatePicker.  Once I changed this line:

    RadDatePicker

    picker = (e.Item as GridFilteringItem)[column.UniqueName].Controls[0] as RadDatePicker;

    From a RadDateTimePicker to a RadDatePicker the error went away.  The Grid now shows the correct icons on the DatePopupButtons.  The Calendar still doesn't show the correct images but I understand that is being worked on on your end.

    Thanks for the assistance.  Here is my final code for anyone who is interested:

    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)  
            {  
                if (e.Item is GridFilteringItem)  
                {  
                    foreach (GridColumn column in e.Item.OwnerTableView.AutoGeneratedColumns)  
                    {  
                        if (typeof(System.DateTime) == column.DataType)  
                        {  
                            RadDatePicker picker = (e.Item as GridFilteringItem)[column.UniqueName].Controls[0] as RadDatePicker;  
                            picker.EnableEmbeddedSkins = false;  
                            picker.Skin = "DWDS";  
                            picker.DatePopupButton.ImageUrl = "~/Skins/DWDS/Calendar/DatePickerpopup.gif";  
                            picker.DatePopupButton.HoverImageUrl = "~/Skins/DWDS/Calendar/DatePickerpopupHover.gif";  
     
     
                            //this section still doesn't set the calendar icons yet but hopefully it will on the next prometheus release  
                            picker.Calendar.EnableEmbeddedSkins = false;  
                            picker.Calendar.Skin = "DWDS";  
                            picker.Calendar.NavigationPrevImage = "~/Skins/DWDS/Calendar/ArrowLeft.gif";  
                            picker.Calendar.NavigationNextImage = "~/Skins/DWDS/Calendar/ArrowRight.gif";  
                            picker.Calendar.FastNavigationNextImage = "~/Skins/DWDS/Calendar/fastNavRight.gif";  
                            picker.Calendar.FastNavigationPrevImage = "~/Skins/DWDS/Calendar/fastNavLeft.gif";  
                        }  
                    }  
     
                } 

  11. Kia
    Kia avatar
    38 posts
    Member since:
    Mar 2008

    Posted 16 Mar 2008 Link to this post

    I've done something pretty much the same in VB. Probably would have been stuck for a long time with the RadDatePicker and RadDateTimePicker issue if it wasn't for you. Thanks sl6rp.

    I wonder though, what's the status with the nav images showing up on the calendar control? This is kind of very important to the system I'm working on at the moment and if this issue remains for too long I'll have to search for another solution.

    Incidentally, my calendar is also transparent with no borders, which means that its pretty much not legible. I've tried adding the following lines(VB) which makes no difference at all.
    <><><><><>
    Picker.Calendar.BorderColor = Drawing.Color.Black 
    Picker.Calendar.BorderStyle = BorderStyle.Solid 
    Picker.Calendar.BackColor = Drawing.Color.White 

    thanks,
    Kia
  12. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 17 Mar 2008 Link to this post

    Hello Kia,

    With the current official release of RadControls Prometheus (Q3 2007 SP2) you need to set the urls for the navigation images as explained by my colleague Dimo. For the Q1 2008 release we plan to introduce ImagesPath property for RadCalendar/RadDatePickers with which you will be able to set unified location for the pop-up and fast navigation images (similar to RadGrid Prometheus).

    Regarding the border style and backcolor of the nested picker:
    Can it be that the border styles set for the grid override your custom styles for the picker control? Does specifying CssClass for the Calendar and adding !important at the end of each style definitions from this class makes a difference? Consider inspecting the html of the page using IE developer toolbar to see whether your styles are applied as expected.

    Best regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  13. Kia
    Kia avatar
    38 posts
    Member since:
    Mar 2008

    Posted 17 Mar 2008 Link to this post

    Hi Stephen,

    Thanks for your response. I tried exactly what Dimo advised and with a bit of playing around managed to get only the Calendar popup image to appear on the grid. Here's the code I'm using:
            If (e.Item.IsInEditMode And TypeOf (e.Item) Is GridEditableItem) Or TypeOf (e.Item) Is GridFilteringItem Then 
                For Each column As GridColumn In e.Item.OwnerTableView.Columns 
                    If GetType(DateIs column.DataType Then 
                        Dim Picker As New Telerik.Web.UI.RadDatePicker 
                        Picker = TryCast((TryCast(e.Item, Telerik.Web.UI.GridFilteringItem))(column.UniqueName).Controls(0), Telerik.Web.UI.RadDatePicker) 
                        If Picker.EnableEmbeddedSkins = False Then 
                            Picker.DatePopupButton.ImageUrl = "~/RadControls/Skins/GluckVision/Calendar/DatePickerpopup.gif" 
                            Picker.DatePopupButton.HoverImageUrl = "~/RadControls/Skins/GluckVision/Calendar/DatePickerpopupHover.gif" 
     
                            Picker.Calendar.EnableEmbeddedSkins = False 
                            Picker.Calendar.NavigationPrevImage = "~/RadControls/Skins/GluckVision/Calendar/arrowLeft.gif" 
                            Picker.Calendar.NavigationNextImage = "~/RadControls/Skins/GluckVision/Calendar/arrowRight.gif" 
                            Picker.Calendar.FastNavigationNextImage = "~/RadControls/Skins/GluckVision/Calendar/fastNavRight.gif" 
                            Picker.Calendar.FastNavigationPrevImage = "~/RadControls/Skins/GluckVision/Calendar/fastNavLeft.gif" 
                            Picker.Calendar.BorderColor = Drawing.Color.Black 
                            Picker.Calendar.BorderStyle = BorderStyle.Solid 
                            Picker.Calendar.BackColor = Drawing.Color.White 
                        End If 
                    End If 
                Next 
            End If 
     

    When I right click on the missing image and view properties, I still see that it is pointing to the root folder of the website. The very same issue sl6rp had above.

    Also I'm not sure what exactly you mean in regards to CSS and the calendar borders? Do you mean create a new skin with its own CSS elements for the calendar? I have one CSS for the site which contains modifications for the custom skin. I tried removing those elements from the CSS and removed the call to the skin from the grid's Skin property, but still had the same issue. At that time I had no other CSS elements referring to the Grid OR Calendar. This happens only when I set "EnableEmbeddedSkins" to False.


    Thanks,
    Kia
  14. sl6rp
    sl6rp avatar
    55 posts
    Member since:
    Sep 2012

    Posted 17 Mar 2008 Link to this post

    Stephen, Kia,

    Sorry I ddin't reply sooner but I wanted to make sure I had checked my code before responding. 

    I have not been able to get the images on the calendar to work.  I can get the custom skin (background colors, text sizes, etc) to pull from my style sheet but I can't get the images to show no matter what I have tried.

    This is what Dimo said in another one of my posts (http://www.telerik.com/community/forums/thread/b311D-bcbkcb.aspx) about the skins not showing in a grid scenario:

    ______________________________________________________

    Hi Brent,

    Regarding the RadCalendar images - it seems that currently you can set custom navigation images only if EnableEmbeddedSkins is set to False. This is a bug which we will fix for the next release. Sorry for the inconvenience. Your account has been updated with 500 Telerik points for bringing this issue to our attention.

    <I cut some text out here that didn't apply to this problem - Brent>

    All the best,
    Dimo
    the Telerik team

    ___________________________________________

    I wish I knew when that next release will be (any idea Stephen?).  I have moved all of my applications to the Prometheus controls and this is one of the few items holding me back from releasing them.

    -Brent

  15. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 17 Mar 2008 Link to this post

    Hi guys,

    The ETA for the next release of RadControls Prometheus is in the middle of April. I hope that the timeframe for it will not put your project development on hold. In the meantime please excuse us for the temporary inconvenience.

    Kind regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  16. sl6rp
    sl6rp avatar
    55 posts
    Member since:
    Sep 2012

    Posted 17 Mar 2008 Link to this post

    Stephen,

    Thanks for replying so quickly.  I was hoping to finish up the last of my changes and the QA by the end of this week, maybe next at the lastest.  So, if a hotfix becomes available for the calendar and/or grid before the next release with these items fixed I would be very interested.

    Thanks

    -Brent

    Kia,

    Did you get your stylesheet working?  If not send me an email at brentndavis @ gmail.com and I'll see if there is anything I can help with.

    -Brent
  17. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 17 Mar 2008 Link to this post

    Hello sl6rp,

    We will notify you as soon as we come up with results. We will do our best to include the requested fix for the RadControls Futures release (something like beta version before the official Q1 2008 release), expected at the beginning of the next week.

    Kind regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  18. Kia
    Kia avatar
    38 posts
    Member since:
    Mar 2008

    Posted 17 Mar 2008 Link to this post

    Thanks Stephen and the rest of the Telerik staff. You provide great service and information. I'm log forward to the update.

    Brent, thanks for the offer. I might take you up on that offer. I still have had no progress.

    Kia
  19. sl6rp
    sl6rp avatar
    55 posts
    Member since:
    Sep 2012

    Posted 25 Mar 2008 Link to this post

    Stephen,

    Is there any news on the Futures release for this week?

    Thanks

    -Brent
  20. Richard
    Richard avatar
    60 posts
    Member since:
    Feb 2008

    Posted 25 Mar 2008 Link to this post

    I just installed the Q1-08 Futures release and was *very* disappointed to see that the Date/Time column editor still does not skin properly.  It is still looking for the images in the same folder as the page instead of in the folder specified in ImagesPath for the skin :(
  21. Dimo
    Admin
    Dimo avatar
    8331 posts

    Posted 26 Mar 2008 Link to this post

    Hello,

    Setting custom navigation images for RadCalendar with EnableEmbeddedSkins="true", as well as obeying the ImagesPath property will start working in Q1 2008.

    Kind regards,
    Dimo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  22. Kia
    Kia avatar
    38 posts
    Member since:
    Mar 2008

    Posted 01 Apr 2008 Link to this post

    I find the same problem. I think this is still not fixed in Q1 2008.
  23. Dimo
    Admin
    Dimo avatar
    8331 posts

    Posted 02 Apr 2008 Link to this post

    Hello,

    Actually Q1 2008 has not been released yet :)

    Greetings,
    Dimo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  24. Kia
    Kia avatar
    38 posts
    Member since:
    Mar 2008

    Posted 03 Apr 2008 Link to this post

    My bad. I meant the preview for such a version.
  25. Richard
    Richard avatar
    60 posts
    Member since:
    Feb 2008

    Posted 16 Apr 2008 Link to this post

    Ok, the calendar and datetimepicker now seem to be working, but the Date/TimeColumnEditors are still a problem.  Are there any plans to fix this?  It is very ugly to have to set the image path in code every time I use a Date/Time column!
  26. John
    John avatar
    416 posts
    Member since:
    Oct 2006

    Posted 17 Apr 2008 Link to this post

    hi:)


    You can use the ItemDatatBound event handler


    Here is an example:

        protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
        { 
            if ((e.Item is GridEditFormItem) && e.Item.IsInEditMode) 
            { 
                GridEditFormItem gridEditFormItem = (GridEditFormItem)e.Item; 
     
                RadDatePicker radDatePicker =  
                    (RadDatePicker)gridEditFormItem["Column_0"].Controls[0]; 
     
                radDatePicker.ImagesPath = "~/MyImagesPath/"
                 
            } 
        } 


    Regards...
    <John:Peel />
  27. Richard
    Richard avatar
    60 posts
    Member since:
    Feb 2008

    Posted 17 Apr 2008 Link to this post

    Thanks John, but you kind of missed my point :)

    I already do as you suggest, but that is an ugly solution.  I would like to see a nice clean solution - the pickers obeying the ImagesPath property that I set in my skin without requiring any code behind.

    [Edited for clarity]
  28. Dimo
    Admin
    Dimo avatar
    8331 posts

    Posted 18 Apr 2008 Link to this post

    Hi Richard,

    Currently RadGrid and RadCalendar have some images with the same names. Unfortunately, this means that RadCalendar should not inherit the ImagesPath property from RadGrid, as this will lead to unexpected results.

    We will consider implementing a cleaner solution in the future. This could require some breaking changes for lots of people, so we must be careful. Thank you for understanding.

    Kind regards,
    Dimo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  29. Richard
    Richard avatar
    60 posts
    Member since:
    Feb 2008

    Posted 18 Apr 2008 Link to this post

    Would it not be possible to have the GridDateTimeColumnEditor control expose the ImagesPath property of its picker control?  That way there is no conflict as it would use the images from the Calendar and not from the Grid.
  30. Plamen Peshev
    Admin
    Plamen Peshev avatar
    886 posts

    Posted 21 Apr 2008 Link to this post

    Hello Richard,

    We absolutely agree that the ability to set the GridDateTimeColumnEditor.ImagesPath property is a very convenient addition, so will implement this functionality in the next SP release, expected in the middle of May.

    Greetings,
    Plamen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  31. Guss
    Guss avatar
    48 posts
    Member since:
    Apr 2008

    Posted 24 May 2008 Link to this post

    So for those using the newest SP, and does not use Auto-generated columns, here is the sort version:

        protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
        { 
            if (e.Item is GridFilteringItem) 
            { 
                foreach (GridColumn column in e.Item.OwnerTableView.Columns) 
                { 
                    if (typeof(System.DateTime) == column.DataType) 
                    { 
                        RadDatePicker picker = (e.Item as GridFilteringItem)[column.UniqueName].Controls[0] as RadDatePicker; 
                        picker.ImagesPath = "~/Styles/Calendar/"
                    } 
                } 
            } 
        } 

    Regards
    Guss
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017