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

I'm trying to set the value of progressbar in the label but sometimes work and sometimes not! I simple copy the code that's in the documentation but sometimes the label appears once and sometimes appers twice.

<telerik:RadProgressBar runat="server" ID="RadProgressBar1"  BarType="Percent" MaxValue="100" Value="33" Width="250" Orientation="Horizontal" ShowLabel="true" Skin="Silk"></telerik:RadProgressBar>

I've attatched a sample image that shows what I'm trying to explain.

I'm using the progress bar inside a template column of a grid.

What's missing me ?

Thanks in advanced.
Luís Maurício
Slav
Telerik team
 answered on 18 Nov 2014
5 answers
232 views
hi
which find control for example, button, in RadListView1_ItemEditing

i try below code,but give error.



  protected void RadListView1_ItemEditing(object sender, RadListViewCommandEventArgs e)
    {
RadListViewEditableItem editedItem = (RadListViewEditableItem)e.ListViewItem;

 RadTextBox txtSubject =(RadTextBox)editedItem.FindControl("txtSubject");

txtSubject .Text="hi";

}
please help me.
thanks
Konstantin Dikov
Telerik team
 answered on 18 Nov 2014
11 answers
663 views
Hi
I have a question regarding radgrid header. I want to make 4 headers  in the grid redirect to a  different page and display as a link. How can i capture the click event of the header as i have to  loop through the radgrid and get the values of that column (header clicked column) to update the table.

Thanks,
Rajeswari Raman
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Nov 2014
6 answers
420 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
202 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
170 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
623 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
156 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
141 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
255 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?