Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
982 views
Hi,
Good evening all,
Below  the java script method is defined that is called on the rad button onClientClicked event.

  function rbReturnToData_Clicked(button, args)
   {                        
   if (window.confirm("You have pending filter changes.  Apply them?"))
          {                        
           button.set_autoPostBack(true);
           }               
     else
        {                             
        button.set_autoPostBack(true);                       
        }
    }

my question is that is there any way to send extra parameter to the server
with 
button.set_autoPostBack(true);. and how it cab be accessed at server side.

 
 

Slav
Telerik team
 answered on 14 Feb 2013
5 answers
770 views
Hi.

I have a radbutton that is hooked up with the OnClientClicking event to a Javascript function. Inside this function, I'm calling radConfirm, and passing it a callback function. Within this callback function, I am evaluating the response, and then calling the .click() method in order to restart the process.

I'm expecting the .click() method to re-call the OnClientClicking event (which has logic to handle the fact that it's being called again and, if necessary suppress the radconfirm). However, it doesn't appear like this is happening.

Am I doing something wrong?

<telerik:RadButton runat="server" ID="btnTest" OnClientClicking="clicking" />
var LastClickedItem = null;
var clickCalledfromConfirm = false;
 
function clicking(sender, args)
{
    if (!clickCalledfromConfirm)
    {
        args.set_cancel(true);
        LastClickedItem = sender;
        radconfirm("Are you sure you want to do this?", confirmCallBack);
    }
    else
    {
        args.set_cancel(false);
    }
}
 
function confirmCallBack(args)
{
    if (args)
    {
        clickCalledFromConfirm = true;
        LastClickedItem.click();
    }
}

Thanks
Fergal
Slav
Telerik team
 answered on 14 Feb 2013
2 answers
324 views
Hello !

I am trying to 'detect' if change is made to my page, containing telerik and asp.net controls.RadTextboxes behave as expected Code beneath the one for DropDownList does not work. I tried to have just a simple alert but though radComboBox does not seem to be playing fair ...

I am using traditional ASP.NET master/content page scenario. And the content page loads up as a radTab of a master page.

RadTextBox ( Works ! )
    ControlExtension.All(this.Controls).OfType<RadTextBox>().ToList().ForEach(radTb => radTb.Attributes.Add("onchange", "noticeChange(" + radTb.ClientID + ");"));
ControlExtension.All(this.Controls).OfType<RadTextBox>().ToList().ForEach(radTb => radTb.Attributes.Add("onkeydown", "noticeChange(" + radTb.ClientID + ");"))

DropDownList
( Works ! )
    ControlExtension.All(this.Controls).OfType<DropDownList>().ToList().ForEach(dd => dd.Attributes.Add("onChange", "noticeChange(" + dd.ClientID + ");"));
ControlExtension.All(this.Controls).OfType<DropDownList>().ToList().ForEach(dd => dd.Attributes.Add("onselectedindexchanged", "noticeChange(" + dd.ClientID + ");"));

RadComboBox ( Doesn't )
    ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.Attributes.Add("onclientselectedindexchanging", "noticeChange(" + radDd.ClientID + ");"));
ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.Attributes.Add("OnClientSelectedIndexChanged", "noticeChange(" + radDd.ClientID + ");"));
ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.Attributes.Add("onclienttextchange", "noticeChange(" + radDd.ClientID + ");"));


Thanks,
-Aarsh

Added

I tried following, just in the case if you're wanting to suggest. It did not worked. The above approach at least added an attirb when I observed in F12 of IE9 but this guy do not seem to be working.

Additionally, it behaves as if it has a JavaScript error

(my radTab do not fill out in the screen upon JavaScript error, if I use the code posted underneath, this happened, so ... )

ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.OnClientSelectedIndexChanged = "noticeChange(" + radDd.ClientID + ")");
ControlExtension.All(this.Controls).OfType<RadComboBox>().ToList().ForEach(radDd => radDd.OnClientTextChange = "noticeChange(" + radDd.ClientID + ");");
Hristo Valyavicharski
Telerik team
 answered on 14 Feb 2013
4 answers
182 views
I've been working through the "MyCustomFilteringColumn" overrides code example, and I've got everything working except I can't seem to get the filter to work, unless I hard code the column name in my query. I'm working with a Data Template Object, and populating the filter dropdown list with Linq query results. But I can't figure out how to evaluate the UniqueName of the passing object (this.UniqueName) as a parameter of my Data Object

Here's what I have in my code:
private void list_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
        {
            ((RadComboBox)o).DataTextField = this.DataField;
            ((RadComboBox)o).DataValueField = this.DataField;
 
            var employees = from emp in EmployeeBL.GetAllEmployees()
                            where emp.FullName.ToLower().Contains(e.Text.ToLower())
                            select emp;
            ((RadComboBox)o).DataSource = employees;
 
            ((RadComboBox)o).DataBind();
        }

I've hardcoded "FullName" which is a property of EmployeeDTO (GetAllEmployees() returns a List<EmployeDTO>), but what I'd like to do is have this.UniqueName evaluate to "FullName" or whatever column is requesting the list.

Thanks,
Gabe
Gabe
Top achievements
Rank 1
 answered on 14 Feb 2013
3 answers
78 views
hello,

when i open this link:
http://demos.telerik.com/aspnet-ajax/splitter/examples/righttoleft/defaultcs.aspx
in explorer 9 it shows the title on the RadSlidingPane
but when i open it on chrome it doesn't show the title.
is there something i can do to fix it?
are you planning on fixing it in the near time future?

Thank you
Vessy
Telerik team
 answered on 14 Feb 2013
3 answers
193 views
Hi there:

Currently using Telerik richtext edit (RadEditor) and upgrade .net web application to support IE8.
We have disabled html paste function on the RadEditor,only allow paste as plain text.
However when user use IE8 browser paste button on the browser menu, it still paste as html format.
The issue doesn't happen on IE6.

Thanks

jim
Rumen
Telerik team
 answered on 14 Feb 2013
5 answers
179 views
One of our customers has reported a problem with the editor that is also reproducible on the Telerik demo page:

http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx

If you switch to HTML view on the demo page, you'll see this markup for the "RadEditor" logo image:

<img style="margin-top: 25px; float: left; margin-right: 15px;" alt="product logo" src="../../Img/editor.jpg" />

Now switch back to Design view and drag & drop the image to another spot in the editor.

Switch back to HTML view and you'll see the src attribute on the img tag has been changed:

<img style="margin-top: 25px; float: left; margin-right: 15px;" alt="product logo" src="http://demos.telerik.com/aspnet-ajax/editor/Img/editor.jpg" />

Can you provide a fix or other solution to this problem? 

Thanks,
Trevor.
Rumen
Telerik team
 answered on 14 Feb 2013
5 answers
193 views
Hi,

I am using a rad editor with custom dialogs based on your demo: http://demos.telerik.com/aspnet-ajax/editor/examples/customdialogs/defaultcs.aspx

I am calling: showExternalDialog() and I give showStatusbar = false,
but I still get the status bar in my radwindow.

here is my code:

    Telerik.Web.UI.Editor.CommandList["LinkManager"] = function(commandName, editor, args) {
        var elem = editor.getSelectedElement(); //returns the selected element.

        if (elem.tagName == "A") {
            editor.selectElement(elem);
            argument = elem;
        }
        else {
            //remove links if present from the current selection - because of JS error thrown in IE
            editor.fire("Unlink");

            //remove Unlink command from the undo/redo list
            var commandsManager = editor.get_commandsManager();
            var commandIndex = commandsManager.getCommandsToUndo().length - 1;
            commandsManager.removeCommandAt(commandIndex);

            var content = editor.getSelectionHtml();

            var link = editor.get_document().createElement("A");

            link.innerHTML = content;
            argument = link;
        }

        var myCallbackFunction = function(sender, args) {
            editor.pasteHtml(String.format("<a href={0}>{1}</a> ", args.href, args.name))
        }

        editor.showExternalDialog(
            'InsertLink.aspx',
            argument,
            400,
            220,
            myCallbackFunction,
            null,
            'Insert Link',
            true,
            Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
            false,
            true);
    };

Do you have any idea why?
Is there any workaround to prevent the status bar from showing?

Thanks.

Rumen
Telerik team
 answered on 14 Feb 2013
3 answers
202 views

I want to save changes pro grammatically
don't.want that tool dilog(save image).
MasterChiefMasterChef
Top achievements
Rank 2
 answered on 14 Feb 2013
3 answers
131 views
Hi,

We are about to buy telerik controls for our project, in those we are mainly concentrating on Radscheduler. Before purchasing your controls we want to make sure that radscheduler works for multiple users using objectdatasource . If yes please send me an working sample code. All the examples that I found are using sqldatasource in aspx page. But I want an example using objectdatasource for multiple users.
We are using the following versions
Asp.net Version 4.5
C#.net
Sql server as backend.

Thank you,
Sravya.
Plamen
Telerik team
 answered on 14 Feb 2013
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?