Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
247 views
Keep getting this error occasionally with v2011.1.315.35

When it happens we need to restart the application so it's pretty serious.  It's being caused by two grids
on the home page of the site that is being monitored by a website uptime service. 

Can't seem to find anything about this error.
NEX
Top achievements
Rank 1
 answered on 24 Sep 2011
4 answers
154 views
On my content page if I remove RadAjaxManagerProxy control then validations for controls on save button click works properly.but if I insert RadAjaxManagerProxy ,save button click does not validate any control.It comes to sever side save button click event.
I read about Page_ClientValidate() or Page_IsValid but it is not working.
Can u plz help me?
Sample code is as below -

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="mvEmployment">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="mvEmployment" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rgPrepaidBenefits">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgPrepaidBenefits" />
                </UpdatedControls>
            </telerik:AjaxSetting>              
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

Control to validate on Save button click -

<asp:TextBox ID="txtEmployer" CausesValidation="true" MaxLength="50" runat="server"
                            Width="200px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvEmployer" runat="server" ControlToValidate="txtEmployer"
                            ErrorMessage="Please Enter The Name" ToolTip="Please Enter The Name" ValidationGroup="Validatetest"
                            Display="Dynamic">*</asp:RequiredFieldValidator>
                        <ajaxtoolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server"
                            TargetControlID="rfvEmployer">
                        </ajaxtoolkit:ValidatorCalloutExtender>
                        <asp:RegularExpressionValidator ID="revEmployer" runat="server" ErrorMessage="Please insert alphabets."
                            ControlToValidate="txtEmployer" ValidationExpression="^[a-zA-Z]+$" ValidationGroup="Validatetest"
                            Display="Dynamic" Text="*"></asp:RegularExpressionValidator>
                        <ajaxtoolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server"
                            TargetControlID="revEmployer">
                        </ajaxtoolkit:ValidatorCalloutExtender>

Save Button -

 <asp:Button ID="rbtnSave" runat="server" CausesValidation="true"
                            Text="Save" ValidationGroup="Validatetest" OnClick="btnSave_Click" />
Sagar
Top achievements
Rank 1
 answered on 24 Sep 2011
0 answers
73 views
Hello,

                I have a aspx page with four ascx controls. In one of the control i have three buttons, one grid and one tree. i have used the radajaxmanagerproxy for ajax operation in that control. In one of the button's clientclick function i called doPostBack function. The entire page is refreshed when i called the doPostBack function, ajax is not working in this situation.  I am using radajaxmanager in my aspx page so i use radajaxmanagerproxy in my control for ajax. Radajaxmanager has only the property ajaxrequest. RadAjaxmanagerproxy  didnt have the property ajaxrequest. so i cant use this property in RadAjaxmanagerproxy  . Please give the solution for this problem.

Thanks,
Velkumar.
Velkumar
Top achievements
Rank 2
 asked on 24 Sep 2011
0 answers
112 views
Do
Hello,

                I have a aspx page with four ascx controls. In one of the control i have three buttons, one grid and one tree. i have used the radajaxmanagerproxy for ajax operation in that control. In one of the button's clientclick function i called doPostBack function. The entire page is refreshed when i called the doPostBack function, ajax is not working in this situation.  I am using radajaxmanager in my aspx page so i use radajaxmanagerproxy in my control for ajax. Radajaxmanager has only the property ajaxrequest. RadAjaxmanagerproxy  didnt have the property ajaxrequest. so i cant use this property in RadAjaxmanagerproxy  . Please give the solution for this problem.

Thanks,
Velkumar.
Velkumar
Top achievements
Rank 2
 asked on 24 Sep 2011
0 answers
108 views
Hello,

                I have a aspx page with four ascx controls. In one of the control i have three buttons, one grid and one tree. i have used the radajaxmanagerproxy for ajax operation in that control. In one of the button's clientclick function i called doPostBack function. The entire page is refreshed when i called the doPostBack function, ajax is not working in this situation.  I am using radajaxmanager in my aspx page so i use radajaxmanagerproxy in my control for ajax. Radajaxmanager has only the property ajaxrequest. RadAjaxmanagerproxy  didnt have the property ajaxrequest. so i cant use this property in RadAjaxmanagerproxy  . Please give the solution for this problem.

Thanks,
Velkumar.
Velkumar
Top achievements
Rank 2
 asked on 24 Sep 2011
5 answers
412 views


Hello Every One,

I'm find radgrid inside radbutton in RadGrid1_NeedDataSource

                GridCommandItem commandItem = RadGrid2.MasterTableView.GetItems(GridItemType.CommandItem)[0] as GridCommandItem;
                RadToolBar toolBar = commandItem.FindControl("RadToolBar2") as RadToolBar;
                RadToolBarItem textItem = toolBar.FindItemByValue("HeaderDisplay");
                RadButton LocationWise = textItem.FindControl("LocationWise") as RadButton;

Error Come Like That Index was outside the bounds of the array.

Thanks,
Mohamed
mohamed
Top achievements
Rank 1
 answered on 24 Sep 2011
2 answers
310 views
Hi guys,

I'm trying to resize an EditableImage on the server side.

// Resize image to the required resolution
EditableImage image = new EditableImage(currentImage);
image.Resize(imageWidth, imageHeight);

Using this code the image is simply cropped to the given resolution. Is this behaviour intended?
I was hoping for the whole image to become bigger or smaller depending on it's original size. 
softwarea
Top achievements
Rank 1
 answered on 24 Sep 2011
0 answers
99 views
Dear All
I hope to find the solution of my first problem post it at this nice forum .
I am developing ASP.Net 3.5 application
using IDE Visual Studio 2008 SP1
Fire Fox 6 web browser

I developed a web user control to work properly I need to disable and enable controls on certain condition on the client side , my user control has an updated panel .And so , I shall use the method
ScriptManager.RegisterStartupScript
Now this method works fine in context of ASP.NET controls , but when try to use it with telerik controls I found two problems

Problem : when try to disable the RadComboBox at page load I git script error that variable to handle RadComboBox is null let us see the below code , Also I got the same problem when put same code in different location were suppose the asp.net loaded successfully .for example, at button click event handler

' Try to execute below code at web user control page load or another location at
' the vb.net asp.net 3.5 code
' I encounter the script error combo is null
 
' str1 of type StringBuilder
str1.Append("var combo = $find('" & RadComboBox1.ClientID & "');")
 
str1.Append("combo.disable();")
 
ScriptManager.RegisterStartupScript(Me.Page, Me.Page.GetType(), "key1", str1.ToString(), True)


Second : sometimes I got the below script error in the Error Console in the Fire Fox , when trying to execute code like the above code mentioned ealier

Error: uncaught exception: [Exception... "Cannot modify properties of a WrappedNative"  nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)"  location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblpopuphiding :: line 854"  data: no]
Omar
Top achievements
Rank 1
 asked on 23 Sep 2011
1 answer
122 views
Hi All,

I am trying to fetch the images from database, if no images are available from the data base it is showing "DBNull' Error.

If I write the following code snippet with in the binding value '<%#Eval(Picture):null?Null:Eval("Picture")%> then all the images which even have the content are not getting displayed as required. Please do help me out of this problem.

Thanks,
Syed Danish
Jayesh Goyani
Top achievements
Rank 2
 answered on 23 Sep 2011
1 answer
135 views

Posted 1 minute ago (permalink)

Hi,
   I have been stuck on this problem for a couple of days and even with trying everything havnt been able to resolve this. I am using a Masterpage and content pages with RadGrid. I have read its better to put a RadAjaxManager on the main page and use RadAjaxmanagerproxy on each page. I have some common functions like the Show/Hide filters functionality as shown in the demos. Instead of having these and other Grid client side events I want to put  these common client side event in the Masterpage or preferably in an external js file but when i take them out and put them in the Masterpage it just does not let me access the Grid client side events like .get_MasterTableView() . Can someone from Telerik please show with an example how to access the grid and the grids clientside events in the Masterpage? Also can I call the functions  (showFilterItem() /hideFilterItem()) like showFilterItem(gridID)  and pass the GridClient ID to the masterpage somehow? I have these filter options on every page and dont want to repeat these and other client side events on every page or hard code the GridID (GridProducts, GridOrders etc) in the function like i am doing below, can someone show me by code example please how to pass in the Grid ID on every page to the master page to access the grid from there?

Note*: I did var grid = $('[id$=GridProducts]')[0];   in the Masterpage javscript since Masterpages changes the ID of the grid and it becomes something like ct100_Masterpagecontent_productGrid.

Please give an example in code on how to do this since im sure having common client side functionality is a common request and would hopefully others as well. Thanks in advance!


ON MASTER PAGE JAVASCRIPT:  
    
 <script type="text/javascript"> 
    
        function showFilterItem(grid) { 
                    
                //This finds the grid object but I cannot access  get_masterTableView() functions  
                var grid = $('[id$=GridProducts]')[0]; 
                    
              //Throws error Object reference not found??? 
                grid.get_masterTableView().showFilterItem(); 
            } 
    
            function hideFilterItem(grid) { 
                                           //Throws error cant find get_masterTableView() ??
                       grid.get_masterTableView().hideFilterItem();   
            } 
    
    </script> 
    
    
    
CONTENT PAGE HTML  
    
 <div style="text-align:center"> 
          <br /> 
            
             Show Filters:<input id="rad1" type="radio" name="showHideGroup" checked="checked" onclick="showFilterItem()" /><label for="rad1">Yes</label> 
                          <input id="rad2" type="radio" name="showHideGroup"  onclick="hideFilterItem()" /><label for="rad2">No</label> 
    
         </div>
Jayesh Goyani
Top achievements
Rank 2
 answered on 23 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?