Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
58 views
Hi,

I have the Add New Record link at the bottom of my grid but I would like to automatically call the event and show the new empty record in the grid on page load. Is this possible?

Thanks
Princy
Top achievements
Rank 2
 answered on 20 Feb 2009
2 answers
383 views
Hi, I'm using rad upload to read in 2 files, and I'm using RadProgressManager to inform the user of the progress.  First I'm reading in one file which contains records to add to a database, and I'm updating the progress manager through each iteration.  When the first file is complete, the 2nd file is processed and I do the same thing, update the progress manager through each iteration.  The files are 1MB and 2MB, and the entire operation takes maybe 2 minutes.  The progress manager seems to work just fine throughout most of the process, but when the 2nd file is being processed, I end up getting the following error (it doesn't happen at the same exact time each time it happens):
adUpload Ajax callback error. Source url returned invalid content: 
 
var rawProgressData = {InProgress:true,ProgressCounters:true,CurrentOperationText:'StudentsExcp_200812.txt'
System.InvalidOperationException: Collection was modified; enumeration operation may not execute. 
 
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) 
   at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext() 
   at Telerik.Web.UI.Upload.ProgressData.Serialize(TextWriter writer) 
   at Telerik.Web.UI.RadProgressContext.Serialize(TextWriter writer) 
   at Telerik.Web.UI.RadUploadProgressHandler.ProcessRequest(HttpContext context) 
 
Telerik.RadUploadProgressHandler.ashx?RadUrid=1a569f1e-f1f3-4dea-a8f4-620716f29b64 
 
Did you register the RadUploadProgressHandler in web.config? 
 
Please, see the help for more details: RadUpload for ASP.NET Ajax - Configuration - RadUploadProgressHandler. 

When I run it locally on my machine, I don't get this error, I only get it when I put it on our testing server.  On my machine I'm using Visual Studio 2008, Windows Vista, IIS 7.0.6000.  My test server, is running on Windows Server 2003 R2, with IIS 6.

As far as the progress manager goes, I my code is pretty much the same as the example on the site.  Declared the progress manager in the aspx page:
<telerik:RadProgressManager ID="rpmStudentProgress" runat="server" /> 
    <telerik:RadProgressArea ID="rpaStudentProgress" runat="server"  
        ProgressIndicators="FilesCountBar, FilesCount, FilesCountPercent, SelectedFilesCount, CurrentFileName, TimeElapsed"  
        Skin="Gray"
        <Localization Uploaded="Uploaded"></Localization> 
    </telerik:RadProgressArea> 

In the Page_Load function of the code behind I set the text for Localization.UploadedFiles, Localization.TotalFiles, and Localization.CurrentFileName.  In the upload function, I show the progress manager:
RadProgressContext context = RadProgressContext.Current; 
context.CurrentOperationText = file.GetName(); 
context.SecondaryTotal = arrStudents.Count + " students"; 

Then in my for loop I update the values:
context.SecondaryValue = (i + 1).ToString(); 
context.SecondaryPercent = Convert.ToInt32((i * 1.0 / arrStudents.Count) * 100); 

In the same function, when the first file is finished, I update the progress monitor text:
context.CurrentOperationText = exceptFile.GetName(); 
context.SecondaryTotal = arrExcept.Count + " exceptionalities"; 

Then in my next for loop I update the values like in the first for loop:
context.SecondaryValue = (j + 1).ToString(); 
context.SecondaryPercent = Convert.ToInt32((j * 1.0 / arrExcept.Count) * 100); 

I have Telerik in specified in the httpHandlers section of my config file:
<add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.2.1001.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/> 
<add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI"/> 

Does anyone have any idea what could be causing the error I'm getting?  I tried to provide as much info as possible.  Any suggestions are appreciated.

Thanks











Daniel
Top achievements
Rank 1
 answered on 19 Feb 2009
3 answers
187 views
Hi! I'm using a custom edit form with a web user control. In this web user control 
In this control I have an asp:button and I want to control the events for this control in the ItemCommand event of the radGrid. But when I try to access the button on this custom control I get nothing (this only occurs on RadGrid.InitInsertCommandName or RadGrid.EditCommandName)

Please, can you help me? And the most important thing, can I do what I'm trying to do?

This is the code that I have:

Dim MyUserControl As New UserControl 
 
Select Case e.CommandName 
 
       Case RadGrid.InitInsertCommandName, RadGrid.EditCommandName 'here i want to add a postback controling into the RadAjaxManager of the RadGrid 
      
            MyUserControl = CType(e.Item.FindControl(GridEditFormInsertItem.EditFormUserControlID), UserControl) 
 
            If Not IsDBNull(CType(MyUserControl.FindControl("btnAddDoc"), Button)) Then 
              
               RadAjaxManager1.AjaxSettings.AddAjaxSetting(CType(MyUserControl.FindControl("btnAddDoc"), Button), _
                                                           CType(MyUserControl.FindControl("lstActiveDocs"), ListBox))                            
               RadAjaxManager1.AjaxSettings.AddAjaxSetting(CType(MyUserControl.FindControl("btnAddDoc"), Button), _
                                                           CType(MyUserControl.FindControl("lstRelateDocs"), ListBox)) 
            End If                    
                 
       Case "AddDocs" 'here I want to control the button click event 
 
            MyUserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl) 
 
            'code for button click event 
            '       ... 
            '       ... 
            '       ... 
       
       Case RadGrid.CancelCommandName 'here i want to remove the postback controling into the RadAjaxManager of the RadGrid 
 
            For intX As Integer = 1 To RadAjaxManager1.AjaxSettings.Count - 1                       
                RadAjaxManager1.AjaxSettings.RemoveAt(intX) 
            Next intX 
End Select 

Thanks,
Liza
Liza
Top achievements
Rank 1
 answered on 19 Feb 2009
4 answers
96 views
I am using a RadGrid with and Ajax Update Panel.

When I place the item in edit mode and my edit template displays the Save and Cancel buttons are visible but are not active.  I say not active because they are not disabled according to the DOM (disabled = false) but do not receive click hits.  Nothing happens.

This is happening only in the Chrome browser, IE does not have the same behavior.

Any suggestions would be welcome.

Thank you
Reid
Top achievements
Rank 2
 answered on 19 Feb 2009
4 answers
150 views

Using an ajaxified RadGrid (latest and greatest version) I have implemented a custom Command Template to facilitate add, edit, insert, update, and cancel actions based on demos here.

            
This works fine but does not work for editing or deleting if you are using a custom <ItemTemplate>.  I say this because as such it relies on a "selected" row or item in the grid. I have the code to select the row on the client side but cannot figure out how to display or enact the selected row when using the custom <ItemTemplate>.

So the questions are:

  1. How does the selected row strategy work with custom ItemTemplates?
  2. As an alternative, are there any examples of showing two small columns side by side with icons only for the AutoGenerated "Edit" and "Delete" columns instead of the default?

Thank you,

P.S.  Try posting a message with a title of "Custom <CommandTemplate> when using a custom <ItemTemplate>".  The server will not accept it.

Reid
Top achievements
Rank 2
 answered on 19 Feb 2009
1 answer
57 views
Hi All,

I am trying to add the custom tool which show the listing of title in the dropdown and onclick paste the content to the editor.   Like Insert Snippet in the editor.

Could you please help me out to do so?

Thanks alot in advance.
Rumen
Telerik team
 answered on 19 Feb 2009
1 answer
174 views
hello i am using EditorDropDown but i kip getting this error "the command InsertEmoticon is not implemented yet.
this is my code please help me

EditorDropDown InsertEmoticon = new EditorDropDown("InsertEmoticon"); 
                InsertEmoticon.Text = "Dynamic dropdown"
 
                //Set the popup width and height 
                InsertEmoticon.Attributes["width"] = "110px"; 
                InsertEmoticon.Attributes["popupwidth"] = "240px"; 
                InsertEmoticon.Attributes["popupheight"] = "100px"; 
                                
                for (int i = 1; i < 94; i++) 
                { 
                    InsertEmoticon.Items.Add(new EditorDropDownItem("<IMG SRC='pages/emoticons/"+i+".gif' />", "pages/emoticons/"+i+".gif")); 
                    
                } 
                main.Tools.Add(InsertEmoticon); 
                //main.Tools.Add(InsertEmoticon);   
                editor.OnClientCommandExecuted = "OnClientCommandExecuting"
               string script = "function OnClientCommandExecuting(editor, args)" + 
               "{" + 
                   "var name = args.get_name();" + 
               "var val = args.get_value();" + 
               "if (name == 'InsertEmoticon'){" + 
               "editor.pasteHtml('<img src=\"' + val + '\"/>');" + 
               "args.set_cancel(true);" + 
               "}" + 
               "}"; 
 
                Page.ClientScript.RegisterStartupScript(this.GetType(), "InsertEmoticon", script, true); 

Rumen
Telerik team
 answered on 19 Feb 2009
1 answer
44 views
I am trying to use spell check in Rad Editor Control and when trying to add a word it is asking to login , how to stop this login window.
Rumen
Telerik team
 answered on 19 Feb 2009
6 answers
145 views
I have a RadAjaxManager that I'm trying to setup to AJAXify.  After I click the Button_SearchForCustomer button I get this error:

Sys.InvalidOperationException:  Could not find UpdatePanel with ID 'Label_CustomerNamePanel'.  If it is being updated dynamically then it must be inside another UpdatePanel.

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="Button_SearchForCustomer"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Label_Error" /> 
                    <telerik:AjaxUpdatedControl ControlID="Hidden_InitialSliderValue" /> 
                    <telerik:AjaxUpdatedControl ControlID="Label_CustomerName" /> 
                    <telerik:AjaxUpdatedControl ControlID="Button_SaveStatus" /> 
                    <telerik:AjaxUpdatedControl ControlID="Placeholder" /> 
                    <telerik:AjaxUpdatedControl ControlID="Div_Results" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="Button_SaveStatus"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Label_Error" /> 
                    <telerik:AjaxUpdatedControl ControlID="Button_SaveStatus" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

 <div> 
        <asp:Label runat="server" AssociatedControlID="RadTextBox_Customer_ID" Text="TMS Customer ID:"></asp:Label> 
        <telerik:RadTextbox runat="server" 
            id="RadTextBox_Customer_ID"  
            EmptyMessage="tms id" 
            LabelCssClass="radLabelCss_Telerik" Skin="Telerik"  
            Width="125px"></telerik:RadTextbox> 
        <asp:Button runat="server" ID="Button_SearchForCustomer" Text="Lookup Customer" /> 
 
        <br /><br /> 
        <asp:Label runat="server" ID="Label_Error" CssClass="Error" /> 
 
        <div runat="server" id="Div_Results" style="padding-top:10px;"
            <asp:Label runat="server" ID="Label_CustomerName" CssClass="CustomerName" /> 
            <table> 
                <tbody> 
                    <tr> 
                        <td colspan="2" align="center"
                            <asp:Button runat="server" ID="Button_SaveStatus" Text="Save Credit Change" /> 
                        </td> 
                    </tr> 
                </tbody> 
            </table> 
        </div>        
 
        <br /> 
        <asp:PlaceHolder runat="server" ID="Placeholder" /> 
         

Bob
Top achievements
Rank 1
 answered on 19 Feb 2009
1 answer
287 views

We have a rad upload control for browsing and uploading files from the client. It so happened that the file resided in the client deep inside several layers of folder. The file name was also long. We found that the if the name of the selection is of length more than 255 characters then the file is not uploaded and nothing is selected in the control after browsing the file. Is there any way to bypass this and allow file selections of unlimited name/path length? I am using IE 6
Genady Sergeev
Telerik team
 answered on 19 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?