Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
108 views
Hi:

I am getting:
  Microsoft JScript runtime error: 'onLoadAmount' is undefined
error. 
<telerik:RadNumericTextBox ID="overAmountTextBox" Runat="server" MaxLength="13"
    MaxValue="999999.999999" MinValue="-999999.999999" Text='<%# Bind("overAmount") %>'
    TabIndex="7">
    <ClientEvents OnLoad="onLoadAmount" />
    <FocusedStyle HorizontalAlign="Right" />
    <EnabledStyle HorizontalAlign="Right" />
    <NumberFormat DecimalDigits="4" />
</telerik:RadNumericTextBox>
 
<script type="text/javascript">
    //<![CDATA[
    //
    function onLoadAmount(sender, args) {
        alert('Amount');
    }
    //]]>
</script>
The RadNumericTextBox is in a FormView control, when I get the error.  If I extract the code and place it on a simple page it finds the on load event.

Phil
Phil
Top achievements
Rank 2
 asked on 21 Jul 2011
9 answers
141 views

Hi,

Is there a way to detect a double-click on the title icon on the left side? Our users are expecting to close the window by double clicking on it as they would do in a Windows application.

 Thanks.

LeBear
Top achievements
Rank 1
 answered on 21 Jul 2011
3 answers
329 views
Dear,
I create header template and footer template(contain table inside)
Then I set AllowScroll = true
If I set UseStaticHeader = false .All Column align ok
But if I set UseStaticHeader = true.It align wrong .Width of Item larger width if header.
Problem just occur when I set UseStaticHeader =true .
Because All width of columns sum is very large.I must be use scroll and Use Static Header
This problem just in IE. FireFox work well
Please give me a solution.Thanks
Regard,
Lam
Support
Top achievements
Rank 1
 answered on 21 Jul 2011
1 answer
105 views
Hello,
Thanks in advance for replying.
I am using a radgrid and I use a GridClientSelectColumn in it. Now, I want user to click on the check box of this column to select the rows and clicking on any other part of the row should not make him select that row. Can this be done?

Why I am asking this is, when the user clicks on any other part of the row, only that row gets selected and all the previously selected rows get de-selected. I want to prevent this. Please let me know.

regards
Yash
Yash
Top achievements
Rank 1
 answered on 21 Jul 2011
2 answers
75 views
Hi,

I have a dock with an update panel inside of it. This update panel contains an ASP.NET Microsoft Chart Control. The Chart Control has a Click event handler. I would like to execute code from the dock level after the Chart's Click event handler has finished.

Currently, I have a 'brute force' method of iterating through all docks on the page in Save Dock Layout and ensuring the state that I want. I would prefer to handle it on a dock-by-dock basis during this parent event handler.

Is this possible?

Thanks

Sean
Sean
Top achievements
Rank 2
 answered on 21 Jul 2011
2 answers
258 views
Hi Telerik,

Is it possible to have a RadDock class which implements IPostBackEventHandler's RaisePostBackEvent method and also utilize the cleanliness of RadDock_Command?

Currently, I have this setup:

/// <summary>
/// Parses custom/default commands of RadDock.
/// </summary>
public void RadDock_Command(object sender, DockCommandEventArgs e)
{
    Logger.InfoFormat("Command {0} detected for {1} ", e.Command.Name, ID);
 
    switch (e.Command.Name)
    {
        case "Close":
            Close();
            break;
        case "Refresh":
            RefreshContent(ForceCacheRefresh.True);
            break;
        case "Toggle Legend":
            ToggleLegend();
            break;
        case "Undo Drill Down":
            UndoDrillDown();
            break;
        default:
            Logger.ErrorFormat("Unhandled command name: {0}", e.Command.Name);
            break;
    }
}

public void RaisePostBackEvent(string eventArgument)
{
 
    HandleDialogClose(eventArgument);
}
 
private void HandleDialogClose(string json)
{
    if (json.Contains("HistoricalLocalSettingsJSON"))
    {
        UpdateSettings(JsonConvert.DeserializeObject<HistoricalLocalSettingsJSON>(json));
    }
    else if (json.Contains("CustomLocalSettingsJSON"))
    {
        UpdateSettings(JsonConvert.DeserializeObject<CustomLocalSettingsJSON>(json));
    }
    else
    {
        Logger.ErrorFormat("Unable to handle JSON: {0}", json);
    }
}

My RadDock has a custom command which opens a dialog window. This window visualizes some of the RadDock's settings. After closing, those changes must be persisted and reflected on the RadDock.

I noticed, however, that after implemented IPostBackEventHandler, that RadDock's commands are getting eaten by this RaisePostBackEvent instead of filtering into RadDock_Command.

Is it possible to achieve this?
Sean
Top achievements
Rank 2
 answered on 21 Jul 2011
2 answers
64 views
HELP, this is driving me mad!

I am setting security for controls on an asp.net page from the names in a database. This has worked for eveything so far.....

For example for Radcontextmenus I use :

Dim currentitem As Telerik.Web.UI.RadContextMenu = thisform.FindControl(reader("objectname"))
currentitem.Items(reader("objectindex")).Enabled = reader("permissionvalue")
currentitem.Items(reader("objectindex")).Visible = reader("visiblevalue")

For each element in a Context menu.

However, whenever I reference a RadSchedulerContextMenu the object can never be found. Despite being able to reference it directly through vb.net.

I have :
Dim currentitem As Telerik.Web.UI.RadSchedulerContextMenu = thisform.FindControl(reader("objectname"))
currentitem.Items(reader("objectindex")).Enabled = reader("permissionvalue")
currentitem.Items(reader("objectindex")).Visible = reader("visiblevalue")

The same but it doesn't find the object. Whereas if I specifically use the objectname in vb eg. radschedulercontextmenu1.items(0).enabled = false it works.

Why does the radschedulercontextmenu differ from the radcontextmenu and how should I reference it correctly? Do I need to do so from the radscheduler container?

Any help much appreciated. Its been a long long day :)

Toxic
Top achievements
Rank 1
 answered on 21 Jul 2011
1 answer
141 views
Greetings,

I have an .aspx page that is loaded inside a radwindow. The content for the page is dynamic and of variable height.

In the Page_Load event, I want to detect if the vertical scrollbars for the window are visible, and if they appear, I want to restyle another div on the page. How do I detect if the scrollbars are visible in C# code-behind?


Thanks
Kevin
Top achievements
Rank 2
 answered on 21 Jul 2011
1 answer
101 views
The iframe module appears to have issues when you try to delete a file input at a given index through script (rather than having the user click on the 'x' button).

Scenario #1 (size validation):
-----------------------------------------
1) subscribe to OnClientValidationFailed client event (implementation below)
        a)  alert("The file you have chosen is too large or is of a type that is not allowed.");
             sender.deleteFileInputAt(sender.getUploadedFiles().length);
             sender.updateClientState(); // (optional?)
2) user selects file that is 'too large'
3) event fires and works as expected...we get the alert message and the desired input disappears
4) user selects same or other file that is 'too large'
5) event fires, but does not work as expected this time
    a) The desired input disappears, but now the select button won't bring up the file chooser and the select button's hover effect is lost.

Scenario #2 (duplicate file validation):
-------------------------------------------------
1) subscribe to OnClientFileSelected client event (implementation below)
         a) this.isDuplicateFile = this.IsDuplicateFile(args.get_fileName()); // do we already have this file?
2) subscribe to OnClientFileUploaded client event (implementation below)
         a) if (this.isDuplicateFile) {
                 this.ShowDuplicateFileMessage();
                 sender.deleteFileInputAt(sender.getUploadedFiles().length - 1);
                 sender.updateClientState(); // (optional?)
                 this.isDuplicateFile = false;
             }
3) user selects file 'a'...everything works as expected...file added to list successfully
4) user selects file 'a'...everything works as expected...we get the duplicate warning message and duplicate is removed from list
5) user selects file 'a'....doesn't work as expected...duplicate is removed from list ok, but 'select' button no longer brings up file chooser and select button has lost its hover effect.

* Both of these scenarios work if I use the Silverlight module and the same source code.
* I have tried unsuccessfully on IE 8 compat/non-compat modes and Firefox 5
* I am using the latest Telerik release 2011.1.519.40
* I have a pretty minimalistic sample if you would like to take a look at it. I don't know where/how to send it though.
Peter Filipov
Telerik team
 answered on 21 Jul 2011
3 answers
465 views
Hi i'm trying to set the default skin for all controls in my project. I've done some searching, but the answers i've encountered don't seem to have done the job.

At the moment i've added this into my web config

  <appSettings>
    <add key="Telerik.WebControls.Skin" value="Windows7" />
  </appSettings>

I've just updated to the latest version of the controls FYI, but prior to this I couldn't get it to work either.

At the moment i've got a pretty simple page, with two telerik controls: radstrip & pageview, but neither are being applied the win7 skin.


Regards,

Alan
Alan T
Top achievements
Rank 1
 answered on 21 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?