Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
119 views
How can i find the lenght of the file client side.
I am using only radupload not rad progress area and progress manager.

let me know how can i restrict user to not upload file having size 0  by client side script.
i do not want to hit server for this task.
i want to check it client side.
plz suggest me some logic for this
Schlurk
Top achievements
Rank 2
 answered on 02 Sep 2009
6 answers
298 views
Hi,

I'm using the RadDatePicker object for its client side functionality but not interested in the server side. I have it on a page where ViewState is switched off, being created dynamically inside a repeater.

Once a form is submitted successfully, I want the entire form cleared so that another new record can be added. However I am hitting a problem with DatePicker, DateTimePicker, and TimePicker that I cannot seem to resolve.

Here is the code I am using to create the object (there is a placeholder inside a Repeater item and this is being called at Repeater_OnItemDataBound)

private void DoDatePicker(FormColumn column, PlaceHolder ph)
        {
            var picker = new RadDatePicker {ID = column.FieldName};
            
            ph.Controls.AddAt(0, picker);
            picker.Clear();
        }

I've tried putting the picker.Clear() before and after the AddAt statement but regardless of what I set, the date from the previous form is still being displayed. I've also tried picker.SelectedDate = null, that didn't work either.

What do I need to do to clear the previous date, short of hacking into HttpContext.Current.Request and deleting all the form values connected to the Date/TimePicker?

Thanks for any assistance.
Phil
Top achievements
Rank 1
 answered on 02 Sep 2009
18 answers
514 views
Hi.


My RadProgressArea doesn't show.
I have my Radupload Working fine but when i click on the "upload" button, it's just doing a postback.

I work on localhost with a file of 50mb.
The file is updated without problem, but no Progress Bar visible.
Tgaud
Top achievements
Rank 1
 answered on 02 Sep 2009
1 answer
110 views
Hi,

Is it possible to map a single DataTextField to multiple DataFieldParentIDs? I have a MenuItems table that contains MenuItems and a MenuToMenuItemsExtension table which maps MenuItemIDs to ParentItemIds. MenuItems that are the same (same text, same link, etc.) can be mapped to multiple parents, ending the need to duplicate MenuItems in the MenuItems table.

Thanks, -Scott
Atanas Korchev
Telerik team
 answered on 02 Sep 2009
1 answer
55 views
Hi Team,

I have one project using rotator from codebdhind. All work fine in FF, Chrome, Safari but in IE8 my rotator scroll 2 times and no more.

<SCRIPT language=javascript type=text/javascript>var intervalID = setInterval('MasterItemShowing();', 10000);function MasterItemShowing(){$find('Vitrinas_RadRotator1').showNext(Telerik.Web.UI.RotatorScrollDirection.Up);}function ClientItemShowing(slider,args){    $find('Vitrinas_RadRotator2').showNext(slider.get_animationDirection());}</SCRIPT> 

Page

<

 

body style="overflow-x:hidden;">

 

<

 

form runat="server">

 

<

 

asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

 

<

 

div id="global" runat="server">

 

<

 

uc1:rotator id="Vitrinas" runat="server"></uc1:rotator>

 

</

 

div>


UC

 

HtmlGenericControl divrot = new HtmlGenericControl();  
                divrot.ID = "idrot"+i;  
                divrot.Style.Add("float","left");  
                RadRotator Rot = new RadRotator();  
                int nu = i + 1;  
                Rot.ID = "RadRotator" + nu;  
                RotClientID.Add(Rot.ClientID);  
                Rot.Width =Unit.Pixel(rotateWidth);  
                Rot.Height =Unit.Pixel(rotateHeight);  
                Rot.ScrollDirection = RotatorScrollDirection.Left; 
                Rot.WrapFrames = true;  
                Rot.RotatorType = RotatorType.FromCode; 
                Rot.SlideShowAnimation.Type = Telerik.Web.UI.Rotator.AnimationType.Fade;
                Rot.ItemWidth = Unit.Pixel(rotateWidth);  
                Rot.ItemHeight = Unit.Pixel(rotateHeight);  
                Rot.ItemTemplate =new RotatorTemplate();  
                Rot.DataSource = listRotator;//DataSource
Some solution?

regards

Fiko
Telerik team
 answered on 02 Sep 2009
1 answer
116 views
Hello,
Does anyone know if the addressbox on the file explorer can be hidden?

Thanks!
Fiko
Telerik team
 answered on 02 Sep 2009
3 answers
842 views
Hello,

can someone tell me how to Change the cursor when the mouse cursor is on an item? In my application it is possible to click on an item. Unfortunately I cant't figure out how to change the cursor from default do pointer when the Mouse gets over. If its possible I'd like to have the change on the image and the text below as well. Also, I'd like to change something in my CSS or my application instead of changing something in the telerik css files.

Thanks in advance
Fiko
Telerik team
 answered on 02 Sep 2009
1 answer
221 views
Hi, I have a radgrid inside a raddock which I am trying to center but it is always left aligned.  I tried with the horizontal-align property set to "center" but it wont work.  Also, everything inside the contenttemplate of the raddock is inside a division which has the text-align property set to centered.  What else can I do to center my grid?? Here is the code if you need it...

Thanx,
Manuel

<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceholder" Runat="Server"
    <style type="text/css"
    td 
    { 
        vertical-align:top; 
    } 
     
    .docContent 
    { 
        text-align:center;  
        font-weight:bold; 
        font-size:larger; 
         
    } 
     
    #rdClearCaches .rdTitlebar 
    { 
        background:#c4f2f9; 
    } 
 
        </style> 
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="MainColumnPlaceholder" Runat="Server"
     
    <h1>System Administrator Utilities</h1> 
    <div style="margin:10px auto 10px; width:1000px;"
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server" Skin="Default"
        <table cellpadding="0" cellspacing="0"
        <tr> 
            <td style="width:350px;"
                <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="100px">                     
                    <telerik:RadDock ID="rdClearCaches" runat="server" Title="CLEAR DB CACHE"  
                        EnableAnimation="True" BackColor="#242424" Width="325px"  
                        ForeColor="#D7D7C2"
                    <ContentTemplate>        
                        <div class="docContent"
                            <br /> 
                             
                            <telerik:RadGrid ID="rgCaches" runat="server"  
                                GridLines="None" Skin="Black" Width="98%" AutoGenerateColumns="False"  
                                AllowSorting="True" Font-Bold="False" Font-Italic="False" Font-Overline="False"  
                                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                                <MasterTableView> 
                                    <RowIndicatorColumn> 
                                        <HeaderStyle Width="20px" /> 
                                    </RowIndicatorColumn> 
                                    <ExpandCollapseColumn> 
                                        <HeaderStyle Width="20px" /> 
                                    </ExpandCollapseColumn> 
                                    <Columns> 
                                        <telerik:GridBoundColumn DataField="Key" HeaderText="KEY" UniqueName="Key"
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridDateTimeColumn DataField="Created" HeaderText="CREATED ON"  
                                            UniqueName="Created"
                                        </telerik:GridDateTimeColumn> 
                                    </Columns> 
                                    <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False"  
                                        Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"  
                                        Wrap="True" /> 
                                </MasterTableView> 
                            </telerik:RadGrid> 
                             
                            <br /> 
                            Press &quot;Clear&quot; to Delete All Cache<br />&nbsp;                             
                            <div>                                 
                                <asp:Button ID="btnClearCache" runat="server" Text="Clear" Width="200px" /> 
                            </div> 
                             
                        </div> 
                    </ContentTemplate> 
                    </telerik:RadDock> 
                </telerik:RadDockZone> 
            </td> 
         
         
         
            <td style="width:350px;"
                <telerik:RadDockZone ID="RadDockZone2" runat="server" MinHeight="100px">                     
                    <telerik:RadDock ID="RadDock1" runat="server" Title="Title2"  
                        EnableAnimation="True" BackColor="Black" ForeColor="White" Width="325px"
                    <ContentTemplate>        
                        <div class="docContent"
                        <br />Text<br /> 
                        <div> 
                            <br /> 
                            <asp:Button ID="Button1" runat="server" Text="Clear" Width="200px" /> 
                        </div> 
                        </div> 
                    </ContentTemplate> 
                    </telerik:RadDock> 
                </telerik:RadDockZone> 
            </td> 
         
         
         
            <td style="width:350px;"
                <telerik:RadDockZone ID="RadDockZone3" runat="server" MinHeight="100px" >                     
                    <telerik:RadDock ID="RadDock2" runat="server" Title="Title3"  
                        EnableAnimation="True" BackColor="White" Width="325px"
                    <ContentTemplate>        
                        <div class="docContent"
                        <br />Text<br /> 
                        <div> 
                            <br /> 
                            <asp:Button ID="Button2" runat="server" Text="Clear" Width="200px" /> 
                        </div> 
                        </div> 
                    </ContentTemplate> 
                    </telerik:RadDock> 
                </telerik:RadDockZone> 
            </td> 
        </tr> 
        </table> 
         
        </telerik:RadDockLayout> 
         
         
    </div> 
    <asp:Panel ID="pnlTimerCacheGrid" runat="server"
        <asp:Timer ID="TimerCacheGrid" runat="server" Interval="10000" OnTick="TimerCacheGrid_Tick" /> 
    </asp:Panel> 
    <telerik:RadAjaxManager runat="server"  
        DefaultLoadingPanelID="RadAjaxLoadingPanel1" EnablePageHeadUpdate="False"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="TimerCacheGrid"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rgCaches" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
             
            <telerik:AjaxSetting AjaxControlID="rgCaches"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rgCaches" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
             
            <telerik:AjaxSetting AjaxControlID="btnClearCache"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rgCaches" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
             
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadAjaxLoadingPanel Runat="server" Skin="Black"  
        ID="RadAjaxLoadingPanel1" InitialDelayTime="100"
    </telerik:RadAjaxLoadingPanel> 
     
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server"  
        DecoratedControls="All" Skin="Default" EnableRoundedCorners="true"  /> 
         
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server"
    </telerik:RadStyleSheetManager> 
</asp:Content> 

Dimo
Telerik team
 answered on 02 Sep 2009
1 answer
126 views
Hi,

I am observing some unexpected behavior when using RadComboBox - I set SelectedIndex to some value, say 2,  in code behind, but then if I type something in the input  and trigger a postback (say, via an asp:Button), the selected item is not changed , and the Text property doesn't get updated - everything stays the same.

I would expect that every time I set SelectedIndex to some item index, the Text and input contents get updated, no matter what is there already.

Is this a bug?

Thanks,
Tom
Casey
Top achievements
Rank 1
 answered on 02 Sep 2009
4 answers
208 views
Hi,

I am implemting a custom FileBrowserContentProvider for the ImageManager of the RadEditor. The purpose of this customer provider is to ensure the images inserted in the content of RadEditor can only we read if the user has logged on to the website and has sufficiant rights. Having that wish just a browsable virutal directory is not an option since the users are also located outside the domain.

During Implementation I found a very nasty problem which I can't solve.. I' am implemting the Telerik.Web.UI.Widgets.FileBrowserContentProvider interface. My problem is.. I build up all the stuff needed (see code below). But when using the ImageManager the tree on the left side is displayed perfectly. The content of the folders is also visible. But when clicking on a image in the content view of the folder only the content of the top image is displayed. 

For example I have the folder :

Windows Images 
    - Koala.jpg
    - Desert.jpg
    - Flower.jpg

When I click on Koala and Insert, the Koala picture is shown, and inserted in the RadEditor. When I click on Desert, the Koala picture is shown and inserted in the RadEditor. When I click on Flower the Koala picture is shown and inserted.

What is going on here? The generated urls for the Images are 100% correct and shown correctly when I invoke the url of the image directly. When I consult the debugger the content of the FIleItem aray is also correct. Please Help me!

Martijn,

PS. Keep up the good work!

 
        public override DirectoryItem ResolveDirectory(string path)  
        {  
            // First get the base path  
            string strBasePath = ConfigurationManager.AppSettings["MediaManagerPath"];  
 
            DirectoryInfo Directory = new DirectoryInfo(strBasePath + path);  
            FileInfo[] Info = Directory.GetFiles();  
            FileItem[] Files = new FileItem[Info.Length];  
            List<DirectoryItem> Subs = new List<DirectoryItem>();  
              
            for(int Index = 0; Index < Info.Length; Index++)  
            {  
                string ImageUrl = Security.GetWebsiteRootUrl(Context.Request) + "Gui/ContentManagement/File.aspx?Path=" + HttpUtility.UrlEncode(Info[Index].FullName.Replace(strBasePath, string.Empty));  
                string ImageThumbUrl = Security.GetWebsiteRootUrl(Context.Request) + "Gui/ContentManagement/File.aspx?Size=thumb&Path=" + HttpUtility.UrlEncode(Info[Index].FullName.Replace(strBasePath, string.Empty));  
                  
                Files[Index] = new FileItem(Info[Index].Name, Info[Index].Extension, Info[Index].Length, path, ImageUrl,string.Empty, PathPermissions.Delete | PathPermissions.Read | PathPermissions.Upload);  
            }  
                        
            // Ensure we replace the base path so it can not be used for reading the entire file system  
            return new DirectoryItem(Directory.Name, Directory.FullName.Replace(strBasePath, string.Empty), Directory.FullName.Replace(strBasePath, string.Empty), string.Empty , PathPermissions.Delete | PathPermissions.Read | PathPermissions.Upload, Files, Subs.ToArray());  
        }  
 
        public override DirectoryItem ResolveRootDirectoryAsTree(string path)  
        {  
            // First get the base path  
            string strBasePath = ConfigurationManager.AppSettings["MediaManagerPath"];  
 
            // Define all the variables   
            DirectoryInfo Directory = new DirectoryInfo(strBasePath + path);  
            FileItem[] Files = { };  
            DirectoryItem[] SubDirs = {};  
 
            DirectoryInfo[] SubDirectories = Directory.GetDirectories();  
            List<DirectoryItem> Subs = new List<DirectoryItem>();  
 
            foreach (DirectoryInfo Info in SubDirectories)  
            {  
                Subs.Add(ResolveDirectory(Info.FullName.Replace(strBasePath, string.Empty)));                      
            }  
 
            // Ensure we replace the base path so it can not be used for reading the entire file system  
            return new DirectoryItem(Directory.Name, Directory.FullName.Replace(strBasePath, string.Empty), Directory.FullName.Replace(strBasePath, string.Empty), string.Empty, PathPermissions.Delete | PathPermissions.Read | PathPermissions.Upload, Files, Subs.ToArray());  
        } 


 
Fiko
Telerik team
 answered on 02 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?