Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
140 views

i have set the externaldialogpath for my editor but it seems that it is still taking the old dialog code.

i have confirm the path to the dialog is correct

the code is a custom web part for sharepoint 2013

 

<telerik:RadEditor ID="RadEditor1" runat="server" ExternalDialogsPath="/inetpub/wwwroot/wss/VirtualDirectories/siteproject/externalFiles/TelerikEditorDialogs/" DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd"  OnClientLoad="OnClientLoad">
</telerik:RadEditor>

Vessy
Telerik team
 answered on 22 Jul 2016
3 answers
202 views
Hi all,

I am attempting to maintain the position of a RadSplitBar on postback. I am able to maintain -a- position, but am having trouble progressing it further than that.

My understanding is this:

When the RadSplitBar is moved it's related RadPane's are resized. Therefore, I would like to capture the RadPane's resize event. Unfortunately, there is no server side handling of this by default. So, I must capture OnClientResized events. This puts me off into client-side javascripting, though...and writing to Session isn't a simplistic procedure.

Is there a simple way to run some server-side code after capturing the OnClientResized event?

Ideally, it would be something like this:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
    <script type="text/javascript">
        function OnClientResized(pane, arg) {
            pane.SaveState();
         
    </script>
</telerik:RadCodeBlock>

Where SaveState is server-side code I have written to record the pane's height and width to Session. Should I be looking into AJAX for this functionality? 

EDIT: (Disclaimer: This won't be very pretty.) I managed to do this, but it's quite the workaround. If you guys have any better ideas it would be appreciated.

Here's the gist of it:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
    <script type="text/javascript">
 
        function OnClientResized(pane, args) {
            var context = new Object();
            var paneIDandHeight = pane.get_id() + ',' + pane.get_height();
            //Context is just thrown away.
            CallSetDimensions(paneIDandHeight, context);
        }
 
        function CallbackOnSucceeded(result, context) {
        //Logging
        }
 
        function CallbackOnFailed(result, context) {
        //Logging
        }
    </script>
</telerik:RadCodeBlock>


public partial class _Default : System.Web.UI.Page, ICallbackEventHandler
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RegisterCallBackReference();
        }
 
        private void RegisterCallBackReference()
        {
            //Target: The name of a server Control that handles the client callback.
            //Argument: An argument passed from the client script to the server.
            //clientCallback: The name of the client event handler that receives the result of success.
            //context: Client script that is evaluated on the client prior to initating the callback.
            //clientErrorCallback: The name of the client event handler that handles an error.
            //useAsync: True/False asynchronous postback.
 
            String callBack = Page.ClientScript.GetCallbackEventReference(this, "arg", "CallbackOnSucceeded", "context", "CallbackOnFailed", true);
 
            String clientFunction = "function CallSetDimensions(arg, context){ " + callBack + "; }";
 
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Call To Server", clientFunction, true);
        }
 
        #region ICallbackEventHandler Members
        String returnValue;
        string ICallbackEventHandler.GetCallbackResult()
        {
            return returnValue;
        }
 
        void ICallbackEventHandler.RaiseCallbackEvent(string eventArgument)
        {
            bool result = SetDimensions(eventArgument);
 
            if (result)
            {
                returnValue = "Success.";
            }
            else
            {
                returnValue = "Failure.";
            }
        }
        #endregion
 
        private bool SetDimensions(string args)
        {
            bool saveSuccessful = false;
 
            string[] paneIDandHeight = args.Split(',');
            string paneID = paneIDandHeight[0];
            string paneHeight = paneIDandHeight[1];
            RadPane pane = Utilities.FindControlRecursive(Page, paneID) as RadPane;
            int height = 0;
 
            int.TryParse(paneHeight, out height);
 
            if (!object.Equals(pane, null))
            {
                saveSuccessful = true;
                RadPaneSetting paneSetting = RadPaneSetting.GetSettings(pane);
                pane.Height = new Unit(height, UnitType.Pixel);
                SavePane(pane);
            }
 
            return saveSuccessful;
        }
    }

This code won't compile if you just copy/paste it, I'm using a lot of other helper functions, but if you're stuck with this problem this would be a good place to start. From here you'll need to look up the demo example on persisting state in session.

Jorge
Top achievements
Rank 1
 answered on 21 Jul 2016
4 answers
294 views
Hi All,

I am using the radchat on some pages. On development environment it work fine, but on production it is showing "Error loading RadChart image. You may also wish to check the ASP.NET Trace for further details.\Display stack trace"  in alert. If i click Cancel then it show the page with-ought the chart.

First it was showing permission issue on the temp folder, i have assigned full control to everyone on temp folder. Now i am getting this alert. I have set  UseSession=false.

IIS 7.5
ASP.NET 4.0 
Telerik Version:- 2012.1.411.40

Please let me solution ASAP, because it is on production issue.

Thanks
Satish
Top achievements
Rank 1
 answered on 21 Jul 2016
2 answers
641 views

I have an ASP.Net page that uses the ProgressBar when user clicks on EXPORT button to export data to an Excel (.xlsx) file.  It works great.

Now the question is that is there a way to use that ProgressBar or the ProgressArea when executing a long running SQL statement?

When the user clicks on the EXPORT button, the VB code-behind looks at the RadRadioButtonList to determine which was selected and run the appropriate Export process.  The RadRadioButtonList has EXCEL, PDF, and TABLE.  When EXCEL is selected, the ProgressBar is used to show progress of exporting data to an Excel file.  Exporting to PDF does not use the ProgressBar.  I would like to have a way to show the ProgressBar or use the ProgressArea when exporting to a TABLE which basically means it using the SQL INSERT statement to insert records from a SELECT statement into another table.

Please help!

Thanks!

Sincerely,

Keith Jackson

Keith
Top achievements
Rank 1
 answered on 21 Jul 2016
1 answer
253 views
I apologize for cross posting but couldn't decide what made the most sense :(

I need to run a couple of discrete stored proc when I do my update from a grid.  I need to check if the combobox selection indicates a change to one field and if so execute etc.
I can't for the life of me figure out how to get that value, I tried an selectedindexchanged event and that doesn't seem to work either. I'd be very grateful for a nudge in the right direction as I'm veryyyyyyyyyy rusty :(

Here's what I tried most recently:

protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)
{

if (e.CommandName == "Update")
{


GridEditableItem item = (GridEditableItem)e.Item;
RadComboBox combo =(RadComboBox)item.FindControl("updateComboBox");
var status = (string)item.GetDataKeyValue("status");
if (combo.SelectedItem.Text!= status)
{
 // Do my update...
}
Peter Milchev
Telerik team
 answered on 21 Jul 2016
1 answer
300 views

i received the error about Telerik dialog require http handlers in web.config.

i have added the following to my web config

previously i was developing as a asp.net web application and i did not have this issue.

after integrating the ascx file which contain the Editor control into Sharepoint 2013 as a custom web part, i encounter this issue

01.<system.web>
02.    <httpHandlers>
03.      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
04.      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
05.      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
06.    </httpHandlers>
07.</system.web>
08.  <system.webServer>
09.<handlers>
10.<remove name="Telerik_Web_UI_WebResource_axd" />
11.      <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
12.      <remove name="Telerik_Web_UI_DialogHandler_aspx" />
13.      <remove name="Telerik_RadUploadProgressHandler_ashx" />
14.<remove name="ChartImage_axd" />
15.      <!-- This is the primary handler used to fetch most of the needed resources -->
16.      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
17.      <!-- Only needed for RadSpell and RadEditor's spell checking -->
18.      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
19.      <!-- Only needed for controls that have complex dialogs like RadEditor, RadImageEditor -->
20.      <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" />
21.      <!-- Only needed if RadAsyncUpload, RadProgressArea/RadProgressManager or the obsolete RadUpload are used -->
22.      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
23.      <!-- Only needed if the obsolete RadChart control is used -->
24.      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
25.</handlers>
26.  </system.webServer>

Vessy
Telerik team
 answered on 21 Jul 2016
5 answers
284 views
Hi,

In a scheduler
I want to scroll dynamically to an appointment which is the starting one in week and day view. Please help me.


Thanks.
Veselin Tsvetanov
Telerik team
 answered on 21 Jul 2016
2 answers
111 views

I am using the GridAttachmentColumn with batch editing. The files are upload fine and I'm using the following code to get the uploaded files. 

Directcast(grdTemplates.MasterTableView.GetBatchEditorContainer("RequestAttachments").Controls(0), RadAsyncUpload).UploadedFiles

However, I cannot tell which file each file belongs to which row. I thought using the AttachmentKeyFields would work, but that doesn't seem to be the answer. Any help would be much appreciated. 

 

Sam
Top achievements
Rank 1
 answered on 21 Jul 2016
1 answer
340 views

Hi all...

 

I need to run a couple of discrete stored proc when I do my update from a grid.  I need to check if the combobox selection indicates a change to one field and if so execute etc.

I can't for the life of me figure out how to get that value, I tried an selectedindexchanged event and that doesn't seem to work either. I'd be very grateful for a nudge in the right direction as I'm veryyyyyyyyyy rusty :(

 

Here's what I tried most recently:

protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)
{

if (e.CommandName == "Update")
{


GridEditableItem item = (GridEditableItem)e.Item;
RadComboBox combo =(RadComboBox)item.FindControl("updateComboBox");
var status = (string)item.GetDataKeyValue("status");
if (combo.SelectedItem.Text!= status)
{

 // Do my update...
}

Viktor Tachev
Telerik team
 answered on 21 Jul 2016
1 answer
381 views
Is it possible to add a button control to the list box item?  I was able to add images to each item, but i want to make these images to button icons. 
Ivan Danchev
Telerik team
 answered on 21 Jul 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?