Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
213 views
I am using RadAjaxManager...it works when I run the web app on my localhost but throws the following errors when I try to run it on our development server. 
I've tried reinstalling the AJAX framework thinking maybe that was the problem, but it didn't fix the problem.
Any help on this would be greatly appreciated.

Method not found: 'Void System.Web.UI.ScriptManager.RegisterStartupScript(System.Web.UI.Page, System.Type, System.String, System.String, Boolean)'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MissingMethodException: Method not found: 'Void System.Web.UI.ScriptManager.RegisterStartupScript(System.Web.UI.Page, System.Type, System.String, System.String, Boolean)'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[MissingMethodException: Method not found: 'Void System.Web.UI.ScriptManager.RegisterStartupScript(System.Web.UI.Page, System.Type, System.String, System.String, Boolean)'.]
   Telerik.Web.UI.RadAjaxControl.PerformRender() +0
   Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page) +1222
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +33
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +2113547
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
   System.Web.UI.Page.Render(HtmlTextWriter writer) +26
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1896


Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
Sebastian
Telerik team
 answered on 08 May 2008
3 answers
311 views

I want to attach a right context menu to a RadGrid .  I followed the instruction in the article:

http://www.telerik.com/demos/aspnet/controls/Examples/Integration/GridAndMenu/DefaultCS.aspx?product=grid

 

As my data source is a collection, I have to handle the RadGrid1_InsertCommand to insert the new record into database.

But after update database, how can I turn off the grid insert mode? I put

RadGrid1.MasterTableView.IsItemInserted = false; in the RadGrid1_InsertCommand, but I received a exception:

Insert item is available only when grid is in insert mode.

 

 

protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)

{

GridEditableItem editedItem = e.Item as GridEditableItem;           

      

      // get sort order

      RadNumericTextBox txtSortOrder =

      editedItem.FindControl("RadNumericTextBox_SortOrder") as RadNumericTextBox;

      int sortOrder = -1;

      Int32.TryParse(txtSortOrder.ValidationText, out sortOrder);

 

      // InsertIntoDatabase()

      …

     

 

      //exception: Insert item is available only when grid is in insert mode.

      RadGrid1.MasterTableView.IsItemInserted = false; 

        

}

 

 

protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)

{

   GridEditableItem editedItem = e.Item as GridEditableItem;

 

   // get category Id

   Label lblId = editedItem.FindControl("lblId") as Label;           

   int categoryId = 0;

   Int32.TryParse(lblId.Text, out categoryId);

   if (0 == categoryId) return;

        

   // update database

…

 

     

   //works fine

    RadGrid_Categories.EditIndexes.Clear();

  

   

}

 

 

 

protected void RadContectMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)

{

           

int iClickedRowIndex;

      bool convertResult = Int32.TryParse(Request.Params["ClickedRowIndex"], out iClickedRowIndex);

      if (!convertResult) return;

      string clickedCommand = e.Item.Text;

 

       switch (clickedCommand)

       {

                case "Insert":

                    RadGrid1.MasterTableView.IsItemInserted = true;

                    RadGrid_Categories.Rebind();

                    break;

                case "Edit":

                    RadGrid1.Items[iClickedRowIndex].Edit = true;

                    RadGrid_Categories.Rebind();

                    break;

                                 

                    

        }

 

           

}

 

 

protected void RadGrid1_PreRender(object sender, EventArgs e)

{

   GridColumn col = (GridColumn)RadGrid1.MasterTableView.GetColumn("EditCommandColumn");

   if (RadGrid_Categories.EditIndexes.Count > 0 || RadGrid_Categories.MasterTableView.IsItemInserted )

   {

       col.Visible = true;

   }

   else

   {

       col.Visible = false;

   }

  

}

 

 

Princy
Top achievements
Rank 2
 answered on 08 May 2008
1 answer
99 views
hello, can i get the .net framework 1.1 telerik ASP.NET GRID control?

where?
Shinu
Top achievements
Rank 2
 answered on 08 May 2008
1 answer
112 views
Is there any way to attach my own javascript function call to the sort buttons in a RadGrid?  I need to execute javascript code when the sort button is clicked, but before the postback occurs.

I need to suppress an exit confirmation message ("Are you sure you want to leave this page? You have unsaved data etc.") for all links and buttons that keep the user on the same page.  All of the buttons I figured out except for the sort buttons.  In Firefox it doesn't show the exit confirmation at all (maybe because of the AJAX call) but in IE it does, regardless of the value I set for EnableAJAX in the grid.

The sort buttons don't seem to be server controls, so I'm not sure how to get to them in the codebehind.

So I tried to attach my function call with javascript like below ... this works for the first two postbacks but doesn't work after that.  I even tried putting this code in the grid footer in an attempt to make it execute again when the grid is refreshed (but it didn't).   I am out of ideas and would really appreciate some help with this. Thanks!

                            <script language="javascript"> 
                                //the purpose of this script is to suppress the Exit confirmation message in IE 
                                //for the sort links.  problem appears in IE only. appears in footer so that it 
                                //will execute again when a postback occurs in the grid 
                                var links = document.getElementsByTagName("a"); 
                                alert("found links"); 
                                for (var i=(links.length-1); i>=0; i--) 
                                { 
                                    if (links[i].getAttribute("title") == "Click here to sort") 
                                    { 
                                        alert("found a sort button"); 
                                        var cmd = links[i].getAttribute("href").replace("javascript:", ""); 
                                        links[i].onclick = function () { 
                                            suppressConfirmation(); 
                                            eval(cmd); 
                                            return false; 
                                        } 
                                    } 
                                } 
                            </script> 
 
 

Yavor
Telerik team
 answered on 08 May 2008
1 answer
157 views
I have a radgrid on my page and it takes about 40 secs to load. Can you tell me what timer control do you have that will show loading... message to the users while my grid is loading and how do I implement it.
Princy
Top achievements
Rank 2
 answered on 08 May 2008
1 answer
164 views
Hi guys,

I try to create a new appointment in my scheduler, but it seems like there is no default template that is used to create my appointment.  I see the check mark and the cross (buttons to insert or cancel the appointment creation), but no skin is applied on it.

My code looks like this:

<telerik:RadScheduler ID="AvailScheduler" runat="server" EnableEmbeddedSkins="true" Skin="WebBlue" Width="100%" Height="100%" DataKeyField="uniqueId"
                    DataSubjectField="subject" DataStartField="start" DataEndField="end" DayEndTime="21:00:00" SelectedView="WeekView"
                    OnNavigationCommand="AvailScheduler_NavigationCommandClicked" TimelineView-UserSelectable="false" ShowAllDayRow="False" ShowFooter="False"
                    OnAppointmentClick="AvailScheduler_AppointmentClicked" OnAppointmentCommand="AvailScheduler_AppointmentCommand"
                    OnAppointmentInsert="AvailScheduler_AppointmentInserted" OnAppointmentCreated="AvailScheduler_AppointmentCreated" WeekHeaderDateFormat="dd.MM" >
                <AppointmentTemplate>
                    <div style="width: 800px;" >
                        <div><%# Eval("Subject") %></div>
                    </div>
                </AppointmentTemplate>
                <TimelineView UserSelectable="False" />
            </telerik:RadScheduler>


In AvailScheduler_AppointmentCreated, I only update my update panel.  Am I supposed to always create a custom template??  I see many examples that has comething similar to what I use and it works.  I include the WebBlue/Scheduler.WebBlue.css file cause it is the skin I use.  Should I include something else??


Thx
T. Tsonev
Telerik team
 answered on 08 May 2008
1 answer
180 views
I really like the new image editor in the image manager.  Is there a way to use this independent of the radedit control?  I have lots of places where it would be ideal to check the dimensions of an uploaded image and then push them to the image editor if it is not the proper porportions.   Maybe this is really simple and I'm missing something, but it seems like this is currently embedded into the editor where it would be great to use with the upload also.

Thoughts
Shaun Peet
Top achievements
Rank 2
 answered on 08 May 2008
0 answers
120 views
Hi

I am using RadEditor  in a sharepoint site as  a list column .

It was working fine before .But  suddenly control started throwing an exception when i tried to upload a image using  image manager of the control

 

Server Error in '/' Application.

Invalid path. Could not get SPFolder.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Invalid path. Could not get SPFolder.

Source Error:

An unhandled exception was generated during

Thanks in advance
veda
Top achievements
Rank 1
 asked on 07 May 2008
1 answer
133 views
I am trying to prohibit users from entering letters in the date picker. What is the preferred way of going about this without a javascript workaround?

Thank you.
Todd Anglin
Top achievements
Rank 2
 answered on 07 May 2008
5 answers
1.1K+ views
What is the proper technique to cancel a button clicked on the RadToolBar.

Simplistically, I'd like to do something like the following in code behind:

Me.RadToolBar1.Items(1).Attributes.Add("onclick", "if(!confirm('Are you sure you want to delete this item?')) return false;") 

But this JavaScript does not cancel the call back to the server.

Any ideas?

Thanks.

--David
Roberto
Top achievements
Rank 1
 answered on 07 May 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?