Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
177 views
Hi,

I am getting this error randomly on a page which has a lot of Telerik Controls, RadGrid, RadDock, RadToolTip and other.

Error : Sys.ScriptLoadFailedException : The script /Test/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField......... could not be loaded.

The error is not coming all the time and sometime only it comes.

Any suggestion for solving this? 

Thanks.
Jimmy.
Jimmy Vithalani
Top achievements
Rank 1
 answered on 03 Sep 2010
1 answer
111 views
I have a grid with at most 10 rows. Each has a button (buttoncolumn) that will export that row's fields to CSV. I'm unable to export only the row when I click the button. It exports all the rows. I tried hiding the other rows but it didn't work.



protected void rgridAdp_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "Export")
            {
                GridDataItem dataItem = e.Item as GridDataItem;
                int batchId = StringHandlers.GetSafeInteger(dataItem["BatchNumber"].Text);
foreach (GridDataItem item in rgridAdp.MasterTableView.Items)
                    {
                        if (StringHandlers.GetSafeInteger(item["BatchNumber"].Text) == batchId)
                        {
                            item.Visible = true;
                            item.Display = true;
                        }
                        else
                        {
                            item.Display = false;
                            item.Visible = false;
                        }
                    }
                    rgridAdp.ExportSettings.FileName = "ADPExport-" + batchId;
                    rgridAdp.ExportSettings.ExportOnlyData = true;
 
                    rgridAdp.ExportSettings.OpenInNewWindow = true;
                    rgridAdp.MasterTableView.GetColumn("Export").Visible = false; // don't export button
                    rgridAdp.MasterTableView.ExportToCSV();
Daniel
Telerik team
 answered on 03 Sep 2010
1 answer
135 views
Hello, I have a page that has scrolling disabled on the page so that the header stays in place. Instead there is a div on the page below the header that has scrolling enabled. When I put a scheduler in the div, it does not stay within the div. This simple bit of code is enough to demonstrate the issue:

 

<div style="height:300px;width:300px;overflow:scroll;">
    <Telerik:RadScheduler runat="server" OverflowBehavior="Expand"
        DataKeyField="none" DataSubjectField="none" DataStartField="none" DataEndField="none" />
</div>

 

Another option that I have tried is to use the built-in scrolling of the scheduler:

<Telerik:RadScheduler runat="server" OverflowBehavior="Scroll"
    DataKeyField="none" DataSubjectField="none" DataStartField="none" DataEndField="none" />

 
But in this case a height for the scheduler needs to be decided ahead of time. The scheduler will either not fill the available space or it would expand outside of the div. As far as I can tell, the height can't be adjusted to take up all the available space using the client-side API when the window is resized. (I had success doing this with the RadSplitter on other pages.)

Is there a solution that would allow all the available space to be taken up without the scheduler expanding outside of the div, even when the window is resized?

Please let me know if there are other options.

 

Kamen Bundev
Telerik team
 answered on 03 Sep 2010
1 answer
219 views
I got this problem when I tried to upload 2 or more file at 1 time. The uploaded files are corrupted. But if upload just 1 file, the uploaded file will be ok. The files were saved in the session so that can be validate at the next page and then save to a document library. I'm using 2009.3.1314.20 version

Here some of the code:
1st Page
aspx:
<telerik:RadUpload ID="Upload1" runat="server" MaxFileInputsCount="5" Width="600px" InitialFileInputsCount="1" ControlObjectsVisibility="RemoveButtons, AddButton" />
<asp:Button ID="Button1" runat="server" Text="OK" OnClick="Button1_Click" />
Codebehind:
private void SaveFilesToSession()
{
    IList list = new List<UploadedFileInfo>();
    foreach (UploadedFile uploadedFile in UploadDocument.UploadedFiles)
    {
        int fileLength = uploadedFile.ContentLength;
        byte[] buffer = new byte[fileLength];
        uploadedFile.InputStream.Read(buffer, 0, fileLength);
      
        UploadedFileInfo info = new UploadedFileInfo();
        info.Name = uploadedFile.GetName().Trim();
        info.FileInByte = buffer;
        info.ContentLength = uploadedFile.ContentLength;
        list.Add(info);
    }
  
    Session["UploadedFiles"] = list;
}
  
protected void ButtonSubmit_Click(object sender, EventArgs e)
{
    SaveFilesToSession();
    Response.Redirect("Upload2.aspx");
}

Thanks in advanced.
jing
Top achievements
Rank 1
 answered on 03 Sep 2010
0 answers
112 views
hi

I have a picture that is 1024 X 768 and is 88KB in size and 24 in bit depth. When i uploaded the picture the bit depth has become 32bits and the size in KB has become 239KB. This is my code:

  Dim thumbnail As Image = originalimage.GetThumbnailImage(440, 330, thumbnailImageAbortDelegate, IntPtr.Zero)
                    thumbnail.Save(Path.Combine(Server.MapPath(filepath), filename + f.GetExtension))
                    filenameext = filepath + "/" + filename + f.GetExtension


L
Top achievements
Rank 1
 asked on 03 Sep 2010
4 answers
322 views

Hi,

I have a radgrid on popup window having link column and set Target="_blank" but it is not working.
its opening the new page in same window instead of setting Target="_blank" in GridHyperLinkColumn of Grid.
could you please help me how to open the link in new window from popup window having grid bound within it.

please help.
bharat kumar
Top achievements
Rank 1
 answered on 03 Sep 2010
3 answers
107 views
Is it possible to have the ServiceRequest of a RadXmlHttpPanel to load/refresh the data of a RadScheduler?

Or, can the RadScheduler only work via a DataSource and postbacks when using navigation?


What I'm trying to do is eliminate the postbacks when navigating to the previous/next month.

Thanks.
Peter
Telerik team
 answered on 03 Sep 2010
1 answer
105 views
There is a radgrid on my aspx page. I did some sorting and filtering, and selected a different gridpage.
After a while I return to this aspx page, then all the sorting and filtering and current selected gridpage are lost.
Is there a setting or something in the radgrid which can automatically persist all these states without me having to hardcode the logic?
Shinu
Top achievements
Rank 2
 answered on 03 Sep 2010
1 answer
138 views
Hi,

 Is there a working example of how to get the RadMenu to cause an ajax request that occurs when a user mouses over a menu item, pass that item text to the server, then use that name as a key to look up other items to populate another dependent RadMenu? I have tried this using the following code but was unsuccesful.

UserControl.ascx
<div id="CloudDropDown" class="clearfix">
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function ChangeSubMenu(s, e) {
                $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequestWithTarget("<%= mainMenu.UniqueID %>", e.get_selectedItem().get_text()); 
            }
        </script>
   </telerik:RadCodeBlock>
   
       
    <telerik:RadAjaxManagerProxy ID="ajaxManagerProxy" runat="server">
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="mainMenu">
               <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="subMenu" LoadingPanelID="radAjaxLoadingPanel" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
   
    <telerik:RadMenu ID="mainMenu" runat="server" DataSourceID="SitemapDataSource1" Flow="Horizontal" OnClientMouseOver="ChangeSubMenu" MaxDataBindDepth="1" EnableEmbeddedSkins="false" Skin="MedpacRed">
    </telerik:RadMenu>
   
    <telerik:RadMenu ID="subMenu" runat="server" EnableEmbeddedSkins="false" Skin="MedpacRed" Visible="false">
    </telerik:RadMenu>
       
    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" />
</div>

UserControl.ascx.cs
protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
         
        manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(manager_AjaxRequest);
   
           
    }
   
    protected void manager_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        Guid rootGui = Utility.FindPageGuid(e.Argument);
        List<SiteNavigationItem> items = Utility.ConvertCmsPages(Utility.FindChildren(e.Argument), rootGui);
   
           
        subMenu.DataSource = items;
        subMenu.DataTextField = "Text";
        subMenu.DataNavigateUrlField = "Url";
        subMenu.DataFieldID = "ID";
        subMenu.DataFieldParentID = "ParentID";
        subMenu.EnableEmbeddedSkins = false;
        subMenu.DataBind();
        subMenu.Visible = true;
    }

Here is my master page that houses my user control.

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Base.master.cs" Inherits="App_Master_Base" %> 
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    
<head id="Head1" runat="server"
    <title></title
    <asp:ContentPlaceHolder id="head" runat="server"
    </asp:ContentPlaceHolder
</head
<body class="outthere"
    <form id="form1" runat="server"
        <telerik:RadScriptManager ID="scriptManager" runat="server" /> 
        <telerik:RadAjaxManager ID="ajaxManager" runat="server" /> 
        <!-- The skin should be set, else the loading panel is not shown -->
        <telerik:RadAjaxLoadingPanel ID="radAjaxLoadingPanel" runat="server" BackgroundPosition="Center" Skin="Default" /> 
    
        <div id="pageWrapper"
            <div id="page"
                <!-- start header -->
                <div id="header" class="clearfix"
                    <div id="medpacBanner" class="clearfix"
                        <div id="logo"
                            <img id="medpaclog" runat="server" src="~/App_Themes/MedpacRed/images/medpacLogo.gif" /> 
                        </div
                        <div id="menu" class="clearfix"
                            <asp:ContentPlaceHolder ID="contentMenu" runat="server"/> 
                        </div
                        <div id="genericBanner"
                            <img id="Img1" runat="server" src="~/App_Themes/MedpacRed/images/PinTek_MedPak_WebsiteBanner.png" alt="banner" width="1000" /> 
                        </div
                    </div
                </div
                <!-- end header -->
            
                <div id="contentWrapper" class="clearfix"
                    <!-- start content -->
                    <div id="content" class="clearfix"
                        <div id="baseMainContentWrapper"
                            <asp:ContentPlaceHolder ID="baseContent" runat="server"/> 
                        </div
    
                        <!-- start footer -->
                        <div id="footer"
                            <asp:ContentPlaceHolder ID="contentFooter" runat="server"/> 
                        </div
                        <!-- end footer -->
                    </div
                    <!-- end content -->
                </div
            </div
            <!-- end page -->
        </div
    </form
</body
</html>


Can this be accomplished or am I doing something wrong?

Thanks for you help,
Bobby
Yana
Telerik team
 answered on 03 Sep 2010
1 answer
172 views
I have a requirement to have the upload control completely hide the textbox. Essentially I only want to show the "browse" button to the user.

Previously I was able to achieve this by setting: ControlObjectsVisibility="None"
and then using the CSS:
            .ruFakeInput
            {
                display: none;
            }

After upgrading the Telerik controls (Q2 2010) I have noticed that in IE8/7 that the textbox now displays.
I found this: http://www.telerik.com/help/aspnet-ajax/upload-how-to-hide-input-textbox.html

Which uses slightly different CSS but this does not help either.

Any ideas?

Cheers
Aaron
Yana
Telerik team
 answered on 03 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?