Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
412 views
Hi,

I am using Radgrid with inline editing... and on clicking on a button inside edited row, I am opening a popup window.

The Popup window has a textbox and a submit button.

Now when I click on submit button from popup, i want to update the textbox value to parent page (inside radgrid edited row).


For more details please have a look on attached screenshot




Thanks
Mukesh
Diego
Top achievements
Rank 1
 answered on 18 Nov 2014
4 answers
195 views
Hello there,

I have a SharePoint 2013 environment with a site collection running in 2010 mode.
(My project is working in 2010 and 2013 as 2013 mode, I tested it in the same WebApplication and the same AppPool.)

I have a RadPane / RadTreeView / ContextMenu.

When I cause a PostBack by moving the splitter, expanding a pane, opening the context menu or whatever belonging to my custom user control using RadControls a postback is caused, the server is successfully proceeding the ajax request but on callback I get a recursive call of WebForm_InitCallback (_layouts/1031/init.debug.js) and the RadControls disapear:

function DeferWebFormInitCallback()
{ULSA13:;
    if (typeof(WebForm_InitCallback)=='function')
        window['_WebForm_InitCallback']=window['WebForm_InitCallback'];
    window['WebForm_InitCallback']=function ()
    {ULSA13:;
        if (firstCalled)
        {
            firstCalled=false;
            _callbackinitdelayed=true;
            _spBodyOnLoadFunctionNames.push('WebForm_InitCallback');
        }
        else
        {
            _callbackinitdelayed=false;
            if (typeof(window._WebForm_InitCallback)=='function')
                window._WebForm_InitCallback();****
        }
    }
    if (typeof(WebForm_DoCallback)=='function')
        window['_WebForm_DoCallback']=window['WebForm_DoCallback'];
    window['WebForm_DoCallback']=function(eventTarget, eventArgument, eventCallback, context, errorCallback, useAsync)
    {ULSA13:;
        if (_callbackinitdelayed)
        {
            _callbackinitdelayed=false;
            if (_spBodyOnLoadFunctionNames !=null)
            {
                var count=_spBodyOnLoadFunctionNames.length;
                for (var i=0; i<count; i++)
                {
                    if (_spBodyOnLoadFunctionNames[i]=="WebForm_InitCallback")
                    {
                        _spBodyOnLoadFunctionNames.splice(i,1);
                        break;
                    }
                }
            }
            if (typeof(window._WebForm_InitCallback)=='function')
                window._WebForm_InitCallback();
        }
        window._WebForm_DoCallback(eventTarget, eventArgument, eventCallback, context, errorCallback, useAsync);
    }
}

The exception is thrown at the position marked with ****. The error in IE10 (document mode 9) is "Not enough stack space". In IE10 with document mode IE8 the error is "This object doesn't support this property or method."

I'm running Telerik.Web.Design and Telerik.Web.UI version 2013.1.417.35.

Please help me, I'm stuck :(
Suresh
Top achievements
Rank 1
 answered on 17 Nov 2014
3 answers
162 views


below code is working only for first ajax request . in my
page i have multiple(3) calls but i am unable to use the xmlhttprequest
again. is there any way i can make it work? for example i have below 2
calls, only for first one is i am good but the second one requests are
not getting. any thoughts?

loadDiv("dataProcessing", "FileDropReceiver.aspx?id=1&fileName=" +
FilePath[row - 1] + "&client=" + clientCodeAndName.replace('&',
'|'));

loadDiv("dataProcessing",
"FileDropReceiverRags.aspx?setSecurity=yes&postMyGroup=" +
postMyGroup + "&postPermission=" + postPermission);

below is my code

var xhr;
var isNotIE = false;

var uploading = false;
function loadAjax(div) {
try { xhr = new ActiveXObject('Microsoft.XMLHTTP'); }
catch (e) {
try { xhr = new ActiveXObject('Msxml2.XMLHTTP'); }
catch (e2) {
try {
xhr = new XMLHttpRequest();
isNotIE = true;
}
catch (e3) {
xhr = false;
}
}
}
if (!xhr) {
alert("fail!");
}

xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {

var ajaxDisplay = document.getElementById(div);

ajaxDisplay.innerHTML = xhr.responseText;

if (xhr.status == 200) {
xhr.responseText;
}
else {

}
}
};
}
function loadDiv(div, page) {
loadAjax(div);
xhr.open("GET", page, false);
xhr.send(null);
}

let me know how to reuse the xmlhttprequest again and again?

Rags
Top achievements
Rank 1
 answered on 17 Nov 2014
5 answers
610 views
Hi,

Is it possible to invoke radgrid batcheditcommand from code behind.

I saw a mthod to call it from javascript but i want to do it in Vb.net
Mitch
Top achievements
Rank 1
 answered on 17 Nov 2014
3 answers
149 views
Hello, I am using VS.net 2010, .Net 4, telerik version 2013.2.611.40, and I am having trouble to open up RadWindow in FF, Chrome and even IE9 (IE8 is working), during debugging, related code is in below:

parent page (I think 'var oWnd = radopen("Categories.aspx""RadWindow1");' didn't work as it didn't popup the rad window (Firefox & Chrome))):
function openWin() {
        var oWnd = radopen("Categories.aspx", "RadWindow1");
    }
 
    function OnClientClose(oWnd, args) {
        //get the transferred arguments
        var arg = args.get_argument();
        if (arg) {
            //var cityName = arg.cityName;
            var selCategory = arg.selCategory;
            var selCategoryId = arg.selCategoryId;
            //$get("order").innerHTML = "You chose to fly to  on <strong>" + seldate + "</strong>";
            document.getElementById("<%=selectCategory.ClientID%>").value = selCategory;
            document.getElementById("<%=selectCategoryId.ClientID%>").value = selCategoryId;
        }
    }


rad window page (I think line 'oWnd.close(oArg);' didn't work as it didn't close rad window in IE9 (in FireFox & Chrome radwindow didn't even popup) ):

function returnToParentDC(sId, sectionTitle) {
                  //create the argument that will be returned to the parent page
                  var oArg = new Object();
 
                  oArg.selCategory = sectionTitle;
 
                  oArg.selCategoryId = sId;
 
                  //get a reference to the current RadWindow
                  var oWnd = GetRadWindow();
 
                  //Close the RadWindow and send the argument to the parent page
                  if (oArg.selCategory && oArg.selCategoryId) {
                      alert("test before closing"); //This line is actually executed
                      oWnd.close(oArg); 
                  }
                  else {
                      alert("Please fill both fields");
                  }
              }


Many thanks!!!
Marin Bratanov
Telerik team
 answered on 17 Nov 2014
1 answer
140 views
Hi All,

I have a radgrid with paging enabled. It has 2 template columns with textboxes.
Whenever i enter some values in these textboxes and go to next page , and come back on first page then the text that i typed earlier is lost.
I am maintaining this data in session. Please help .I need urgent help on this.

Thanks,
SK
 SAMPLE Code below-

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadGrid ID="grChecklist1" runat="server"  AutoGenerateColumns="false"
            onneeddatasource="grChecklist1_NeedDataSource" 
        onpageindexchanged="grChecklist1_PageIndexChanged" >
   <MasterTableView  AllowPaging="true" AutoGenerateColumns="false"  PageSize="5"> 
    <Columns>
    <telerik:GridTemplateColumn DataField="Number" HeaderText="Number" Visible="true">
    <ItemTemplate>
         <asp:TextBox ID="txtNumber" runat="server" Text='<%#Bind("Number")%>'/>
    </ItemTemplate>
   </telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn DataField="TaskDescription" HeaderText="TaskDescription" Visible="true">
    <ItemTemplate>
         <asp:TextBox ID="txtTaskDescription" runat="server" Text='<%#Bind("TaskDescription")%>' />
    </ItemTemplate>
   </telerik:GridTemplateColumn>
   </Columns>

</MasterTableView>
</telerik:RadGrid>


-------------------------------cs file code-------------------------

 protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadDetails();
            }
        }

        private void LoadDetails()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("Number",typeof(string));
            dt.Columns.Add("TaskDescription", typeof(string));
            dt.Rows.Add("1", "task1");
            dt.Rows.Add("2", "task2");
            dt.Rows.Add("3", "task3");
            dt.Rows.Add("4", "task4");
            dt.Rows.Add("5", "task5");
            dt.Rows.Add("6", "task6");
            dt.Rows.Add("7", "task7");
            //grChecklist.DataSource = dt;
           // grChecklist.DataBind();
            Session["dt"] = dt;

        }

        private void RefreshSessionState()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("Number", typeof(string));
            dt.Columns.Add("TaskDescription", typeof(string));
            
            foreach (GridDataItem item in grChecklist1.Items)
            {
              string number=(item.FindControl("txtNumber") as TextBox).Text;
              string task = (item.FindControl("txtTaskDescription") as TextBox).Text;
              dt.Rows.Add(number,task);
            }
            if (Session["dt"] != null)
                Session.Remove("dt");
            Session["dt"] = dt;
        }

       

        protected void grChecklist1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
           // RefreshSessionState();
            grChecklist1.DataSource = (DataTable)Session["dt"];

        }

        protected void grChecklist1_PageIndexChanged(object sender, GridPageChangedEventArgs e)
        {
            grChecklist1.AllowPaging = false;
            grChecklist1.Rebind();
           // RefreshSessionState();
           
            grChecklist1.CurrentPageIndex = e.NewPageIndex;
            grChecklist1.AllowPaging = true;
            grChecklist1.Rebind();
        }
    }
   
Pavlina
Telerik team
 answered on 17 Nov 2014
3 answers
247 views
Hi,

I am using radgrid for my application. In my application, I have changed the column position by drag-drop in runtime.

After refreshing the page or radgrid, the column was changed to its old position.

How to maintain its state?.

Please give any suggestions.

Thanks in advance.

Regards
Mahali
Pavlina
Telerik team
 answered on 17 Nov 2014
1 answer
95 views
Hi Guys,
            I am designing a page, and using a radwindow. I need to update  a session and display the some updated values in parent page. Can i achieve this functionality with out post back.

Thank you & Regards,
Prasad.
Marin Bratanov
Telerik team
 answered on 17 Nov 2014
1 answer
89 views
hello ,

I want a new tab also in the hyperlink manager dialog box just like initially we have a option of "anchor Tab", "hyperlink Tab" , "Email tab" so I also want a "telephone tab" link also in the dialog box so please help me from where i do that customization in that .
Ianko
Telerik team
 answered on 17 Nov 2014
1 answer
134 views
I ran into an issue where an FTP user could not access files uploaded from a radasyncupload control.  The user had permissions to the target directory.  Files added to the directory inherited the permissions of the directory when except when uploaded asynchronously. 

Here’s what I found.  In a part of my application I’m Telerik RadFileUpload instead of the standard asp file upload control. 

Because Telerik RadFileupload is asynchronous, it first uploads the file to a temporary directory (/RadUploadTemp).  Once fully
uploaded, it then automatically moves it to the target directory (/TargetDirectory/…)
 
Here is the problem.  As the file is being moved it takes the permissions associated the temporary directory with it. Since the fpt account had no permissions in the RadUploadTemp directory, it assigns no permissions to the file when moved to the TargetDirectory .

In order to resolve this, I gave read permissions the ftp account in the RadUploadTemp directory and now it copies the files with the permissions.

While the link below does not address the rad control specifically, it lead me to the answer.  In my case, I had to apply permissions to the temp directory.

http://stackoverflow.com/questions/23136723/why-are-permissions-wonky-when-my-iis-worker-saves-a-file-in-asp-net

Is this something Tererik could fix in a way similarly stated in the article?:

"I suspect the problem is with the use of Path.GetTempFileName followed by File.Move. When the uploaded file is saved to tempFilename, the temporary file gets whatever permissions are assigned to the temporary folder. Moving the file preserves those permissions as is instead of recalculating the inheritable permissions based on the destination.Instead of File.Move, try using File.Copy"

Hope this helps somebody else. 



Hristo Valyavicharski
Telerik team
 answered on 17 Nov 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?