Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
164 views
Dear Telerik Support,

I have a ASPX page with an timer on it. In every 2 minutes it executes a JavaScript function in which it calls the AjaxRequest to the server to do something.

Also in my application, I have a HttpModule to check if the session is timed out and do some other security issues. If session is timed out, it throws an server SecurityException.

Currently, after the session is timed out, when I open an new instance manually of that page, I can see the error message from UI. But if I first open that page when session is not timed out, let the timer on the page run, there is no way for me to catch the the security exception thrown from HttpModule after the session is timed out. The AjaxManager.OnRequestError client event can not catch the error. Even the Page.Error server event can not catch that error.

Is there any way I can catch the server exception caused by AjaxRequest in thrown from the server like the scenario like mine? Thanks.


Chris

Steve
Telerik team
 answered on 10 May 2008
1 answer
139 views
I am in the process of designing an application with an Outlook-style layout.

There are two main "columns", left and right, which correspond to two RadPanes / RadSplitter.

The left column contains a treeview inside a panelbar. This treeview is intended to "control" the content of the right hand column. The content needs to be a series of separate ASPX pages as they contain very different content and functionality.

How can I avoid refreshing (i.e. AJAX-ify) when navigating between the different treeview nodes / ASPX pages? Can I dynamically load in a page to the right RadPane without refreshing?

At the moment I have a masterpage with the RadPanes and Treeview on, with an "empty" default.aspx page, but when navigating between the nodes/pages the whole browser refreshes.
Tsvetie
Telerik team
 answered on 10 May 2008
1 answer
125 views
Hi all,

I wasn't sure where to post this so I decided to do it here.

I have a web page that takes fairly long to load.  I'd like to have some way to inform the user that the page is still loading.  I see lots of examples of using the radProgressManager with the radUpload.  But can this be used without the RadUpload?  If so, how?

Thanks,
Bob
Sebastian
Telerik team
 answered on 10 May 2008
6 answers
187 views
I note that the roadmap for Prometheus says that Q1 release will see it be out of beta and that Tabstrip, Toolbar and Panelbar will be added.

This leaves the Rotator unaccounted for ??

I've got a couple of sites using the rotator, so am interested in its Prometheus future.
Sebastian
Telerik team
 answered on 10 May 2008
0 answers
223 views
I have an AJAXManager on my master page.
I have a textbox where the user enters text and finds records based on that.
I am using RadAjaxManager1,ResponseScripts.Add("radalert('Test');");
to popup an alert window in case the serach text does not return anything.

It gives me an error 'undefined' is null or not an object

I also have a few AJAXManagerProxy on my content pages.
I am using the reference to the AJAXManager on masterpage using RadAjaxManager.GetCurrent() to popup alertbox on the content pages and they behave normally.

I am unable to figure out why its throwing an error on the master page.

Please help
newbie
Top achievements
Rank 1
 asked on 09 May 2008
1 answer
146 views
Hi,  i went to use any of the file managers in the rad editor that were working before but now I get the following error when the dialog comes up.  This is running from the vs 2008 server not IIS.  This editor is in a template column of a radgrid.  I'm setting all of the editor paths fine.  So I can find the radeditor using itemcreated then set the paths.

[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.Hosting.VirtualPathProvider.CombineVirtualPaths(VirtualPath basePath, VirtualPath relativePath) +11
System.Web.Hosting.VirtualPathProvider.CombineVirtualPathsInternal(VirtualPath basePath, VirtualPath relativePath) +26
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +85
System.Web.UI.Page.get_Master() +48
System.Web.UI.Page.ApplyMasterPage() +18
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +685
at the same time I get the model dialog that says the web.config registration is missing.

Ive added it manually,  added it with the registration link in the rad editor but still I get the same message.  both with and without version numbers.  Everything else works in the editor.

Thoughts?
Thanks
-Keith
SonicImaging
Top achievements
Rank 1
 answered on 09 May 2008
2 answers
238 views

How do you set a two-state button as "checked" in program code?  For example, in the following Telerik example how do you set as checked the button having ImageUrl="~/Images/J.gif" ?

<telerik:RadToolBar ID="RadToolBar1" runat="server" Skin="Hay" >
 
<Items>
   
<telerik:RadToolBarButton
     
runat="server"
     
ImageUrl="~/Images/bold.gif"
     
AllowSelfUnCheck="True"
     
CheckOnClick="True" />
   
<telerik:RadToolBarButton
     
runat="server"
     
ImageUrl="~/Images/Italic.gif"
     
AllowSelfUnCheck="True"
     
CheckOnClick="True" />
   
<telerik:RadToolBarButton
     
runat="server"
     
ImageUrl="~/Images/underline.gif"
     
AllowSelfUnCheck="True"
     
CheckOnClick="True" />
   
<telerik:RadToolBarButton
     
runat="server"
     
Enabled="False"
     
Text="|" />
   
<telerik:RadToolBarButton
     
runat="server"
     
Checked="True"
     
CheckOnClick="True"
     
Group="Justify"
     
ImageUrl="~/Images/LJ.gif" />
   
<telerik:RadToolBarButton
     
runat="server"
     
CheckOnClick="True"
     
Group="Justify"
     
ImageUrl="~/Images/J.gif" />
   
<telerik:RadToolBarButton
     
runat="server"
     
CheckOnClick="True"
     
ImageUrl="~/Images/RJ.gif" />
 
</Items>
</
telerik:RadToolBar>
John Davis
Top achievements
Rank 2
 answered on 09 May 2008
1 answer
70 views
I have a project that used Q1 2007. We have Q1 2008 version.

I have this line of code:

protected void tsTabs_TabClick(object sender, TabStripEventArgs e)

{

mpContent.SelectedIndex = e.Tab.Index;

}

And TabStripEventArgs is giving me an error. What should I replace it with?

Thanks

Kelley
Top achievements
Rank 1
 answered on 09 May 2008
2 answers
116 views
I have a RadGrid control that presents about 12 pages of data by default.  The user can custom filter the data that they wish to see through other controls on the form--a datatable is constructed and passed to the grid via NeedDataSource.

If the user moves the page selection to something other than the first page, for instance, and then filters the data such that only one page worth of data is returned, that data does not appear.  If the user ensures that the grid page displayed is the first page, then the rows returned after performing the custom filter operation are displayed in the grid.

Question: How do I tell a RadGrid to display--or change back to--the first page via the code behind?

Thank You,

David Nowak.
wedrown
Top achievements
Rank 1
 answered on 09 May 2008
1 answer
157 views
I experienced a problem migrating from RadControls for ASP.NET Q3 2007 with Hotfix to ASP.NET  for AJAX  Q1 2008.
 
The following code is responsible for registering a new client java script block, which works.  It also hooks the client side events.  m_Instance is a RadGrid in this case.

                ClientScriptManager cs = m_Instance.Page.ClientScript; 
                string pb = String.Empty; 
                if (!cs.IsClientScriptBlockRegistered(this.GetType(), "ProcessSelectedItemsBatch")) 
                { 
                    pb = cs.GetPostBackEventReference(this, "***"); 
 
                    StringBuilder cstext = new StringBuilder(); 
                    cstext.Append("<script type=\"text/javascript\">"); 
                    cstext.Append("function ProcessSelectedItemsBatch(sender)"); 
                    cstext.Append("{"); 
                    cstext.Append(pb.Replace("'***'", "sender")); 
                    cstext.Append("}"); 
                    cstext.AppendLine("</script>"); 
                    cs.RegisterClientScriptBlock(this.GetType(), "ProcessSelectedItemsBatch", cstext.ToString(), false); 
                } 
 
 
                String call = String.Format("ProcessSelectedItemsBatch('{0}')", m_ScreenPart.GID.ToString()); 
                this.m_Instance.Attributes.Add("onblur", call); 
                this.m_Instance.MasterTableView.Attributes.Add("onblur", call); 
                this.m_Instance.ClientSettings.ClientEvents.OnRowSelected = call; 
                this.m_Instance.ClientSettings.ClientEvents.OnRowDeselected = call; 
 

The problem going from the Telerik RadControls Q32007 Hotfix version to the ASP.NET AJAX Q1 2008 release involves the rendered client page and the ProcessSelectedItemsBatch function not being defined.

The resulted rendered page contains:
<script type="text/javascript">function ProcessSelectedItemsBatch(sender){__doPostBack('ctl00$CPBody$_se$ctl12',sender)}</script>  

defined towards the top of the page

and

Sys.Application.add_init(function() { 
    $create(Telerik.Web.UI.RadGrid, {"AllowMultiRowSelection":true,"ClientID":"ctl00_CPBody__se_screen__04e3347b33fa41e68b37a936cef7eee6","ClientSettings":{"PostBackFunction":"__doPostBack(\u0027{0}\u0027,\u0027{1}\u0027)","AllowDragToGroup":true,"AllowExpandCollapse":true,"AllowGroupExpandCollapse":true,"ColumnsReorderMethod":0,"ShouldCreateRows":true,"Selecting":{"AllowRowSelect":true,"EnableDragToSelectRows":true},"Scrolling":{"SaveScrollPosition":true,"ScrollHeight":"300px"},"Resizing":{"ClipCellContentOnResize":true},"ClientMessages":{"DragToGroupOrReorder":"Drag to group or reorder","DragToResize":"Drag to resize","DropHereToReorder":"Drop here to reorder","PagerTooltipFormatString":"Page: \u003cb\u003e{0}\u003c/b\u003e out of \u003cb\u003e{1}\u003c/b\u003e pages"}},"ShowGroupPanel":true,"Skin":"Default","UniqueID":"ctl00$CPBody$_se$screen__04e3347b33fa41e68b37a936cef7eee6","_activeRowData":"","_clientKeyValues":{},"_currentPageIndex":0,"_gridTableViewsData":"[{\"ClientID\":\"ctl00_CPBody__se_screen__04e3347b33fa41e68b37a936cef7eee6_ctl00\",\"UniqueID\":\"ctl00$CPBody$_se$screen__04e3347b33fa41e68b37a936cef7eee6$ctl00\",\"PageSize\":10,\"PageCount\":1,\"CurrentPageIndex\":0,\"Name\":\"\",\"IsItemInserted\":false,\"clientDataKeyNames\":[],\"_selectedItemStyle\":\"\",\"_selectedItemStyleClass\":\"SelectedRow_Default\",\"_renderActiveItemStyle\":\"\",\"_renderActiveItemStyleClass\":\"ActiveRow_Default\",\"_columnsData\":[{\"UniqueName\":\"GID\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"Display\":false},{\"UniqueName\":\"TaxID\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"Display\":true},{\"UniqueName\":\"GivenName\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"Display\":true},{\"UniqueName\":\"Surname\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"Display\":true},{\"UniqueName\":\"DateOfBirth\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"Display\":true},{\"UniqueName\":\"GenderID\",\"Resizable\":true,\"Reorderable\":true,\"Groupable\":true,\"Display\":true}]}]","_groupPanelClientID":"ctl00_CPBody__se_screen__04e3347b33fa41e68b37a936cef7eee6_GroupPanel_TB","_groupPanelItems":"[]","_loadingText":"Loading...","_masterClientID":"ctl00_CPBody__se_screen__04e3347b33fa41e68b37a936cef7eee6_ctl00","_popUpIds":"[]","_readyText":"Ready","_statusLabelID":"","clientStateFieldID":"ctl00_CPBody__se_screen__04e3347b33fa41e68b37a936cef7eee6_ClientState"}, {"rowDeselected":ProcessSelectedItemsBatch('04e3347b-33fa-41e6-8b37-a936cef7eee6'),"rowSelected":ProcessSelectedItemsBatch('04e3347b-33fa-41e6-8b37-a936cef7eee6')}, null, $get("ctl00_CPBody__se_screen__04e3347b33fa41e68b37a936cef7eee6")); 
 

towards the bottom of the page.

the $create method's events array contains two items, but the value containing the function is undefined for both items.

I am using a RadScriptManager which is serving up the javascript properly, I think.

But I figure that despite the function being defined within the apparent scope, I am doing something incorrectly and minimally will need to change how I am registering the client script.

Do I need to use a RadScriptBlock instead of or in addition to the ClientScriptManager?  Or something else?

I would appreciate any guidance.

Thanks,
Kyle

Kyle
Top achievements
Rank 1
 answered on 09 May 2008
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?