function
Escape()
{
var esc=window.event.keyCode;
if(esc==27)
{
var oWindow = window.radWindow || window.frameElement.radWindow;oWindow.close();
}
}
and calling this function in the body onkeypress
<
body onkeypress="Escape();">
It is working fine in IE browsers but not working in Mozilla.
Could you please get the solution please.
Thank you.
Regards,
Sai
function OnClientTabSelecting(sender, args)
{
var newTabIndex = sender.get_selectedTab().get_value();
| foreach (GridDataItem item in RadGrid1.Items) |
| { |
| int PrincipalID = Convert.ToInt32(item["PrincipalID"].Text); |
| TextBox box = item.FindControl("txtShare") as TextBox; |
| Share = Convert.ToDecimal(((TextBox)box).Text); |
| InsertShareIntoDB(PrincipalID, Share); |
| } |
Adding new rows and updating Share column works fine. What I can't figure out is deleting rows. I am using GridClientDeleteColumn, so when I click on it, the row disappears, as it should. Now on postback, I want to insert into the database only visible (not deleted) rows, but the code above goes through all the rows, even the ones deleted. How can I check on the server-side if a row was deleted?
Thanks,
Julia
RadDatePicker
dp = this.RadScheduler1.FindControl("SelectedDatePicker") as RadDatePicker;
dp.ClientEvents.OnDateSelected = "SchedulerSelectedDatePicker_OnDateSelected";
function SchedulerSelectedDatePicker_OnDateSelected(sender, eventArgs)
{
var date = eventArgs.get_renderDay().get_date();
int offset = date.getTimezoneOffset();
}
My first problem is that for some reason the event is not firing. What could be the problem here.
Once I have sorted that and got it firing I want to pass the value of offset that I calculate in the function back to the server with the partial postback. What's my best way of doing this? Stick the value in a hidden field or is there another way?
Cheers
Gary
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default9.aspx.cs" Inherits="Default9" %> |
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title></title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <script type="text/javascript"> |
| function nodeClicking(sender, args) |
| { |
| var comboBox = $find("<%=RadComboBox1.ClientID%>"); |
| var node = args.get_node() |
| comboBox.set_text(node.get_text()); |
| comboBox.set_value(node.get_value()); |
| comboBox.hideDropDown(); |
| } |
| </script> |
| <div> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| </telerik:RadAjaxManager> |
| <telerik:RadScriptManager ID="RadScriptManager1" Runat="server"> |
| </telerik:RadScriptManager> |
| <telerik:RadComboBox ID="RadComboBox1" ShowToggleImage="True" OnItemsRequested="ItemsRequested" Runat="server"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| <ItemTemplate> |
| <telerik:RadTreeView ID="RadTreeView1" |
| OnClientNodeClicking="nodeClicking" Runat="server"> |
| </telerik:RadTreeView> |
| </ItemTemplate> |
| <Items> |
| <telerik:RadComboBoxItem Selected="True"></telerik:RadComboBoxItem> |
| </Items> |
| </telerik:RadComboBox> |
| </div> |
| </form> |
| </body> |
| </html> |
| using System; |
| using System.Collections.Generic; |
| using System.Linq; |
| using System.Web; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| using Telerik.Web.UI; |
| using System.Xml.Linq; |
| public partial class Default9 : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!IsPostBack && !RadAjaxManager1.IsAjaxRequest) |
| { |
| Populate(); |
| } |
| } |
| private void Populate() |
| { |
| if (RadComboBox1.Items.Count == 0) |
| { |
| RadComboBox1.Items.Add(new RadComboBoxItem()); |
| } |
| RadTreeView ParenTreeView = (RadTreeView)RadComboBox1.Items[0].FindControl("RadTreeView1"); |
| ParenTreeView.LoadContentFile("TreeView.xml"); |
| } |
| protected void ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e) |
| { |
| Populate(); |
| } |
| } |
| <?xml version="1.0" encoding="utf-8" ?> |
| <Tree> |
| <Node Text="Books" Expanded="True"> |
| <Node Text="Arts" /> |
| <Node Text="Biographies" /> |
| <Node Text="Children's Books" /> |
| <Node Text="Computers &amp; Internet" /> |
| <Node Text="Cooking" /> |
| <Node Text="History" /> |
| <Node Text="Fiction" /> |
| <Node Text="Mystery" /> |
| <Node Text="Nonfiction" /> |
| <Node Text="Romance" /> |
| <Node Text="Science Fiction " /> |
| <Node Text="Travel" /> |
| </Node> |
| <Node Text="Music"> |
| <Node Text="Alternative" /> |
| <Node Text="Blues" /> |
| <Node Text="Children's Music" /> |
| <Node Text="Classical" /> |
| <Node Text="Country" /> |
| <Node Text="Dance" /> |
| <Node Text="Folk " /> |
| <Node Text="Hard Rock" /> |
| <Node Text="Jazz" /> |
| <Node Text="R&amp;B" /> |
| <Node Text="Soundtracks" /> |
| </Node> |
| <Node Text="Movies"> |
| <Node Text="Action" /> |
| <Node Text="Animation" /> |
| <Node Text="Classics" /> |
| <Node Text="Comedy" /> |
| <Node Text="Documentary" /> |
| <Node Text="Drama" /> |
| <Node Text="Horror" /> |
| <Node Text="Musicals" /> |
| <Node Text="Mystery" /> |
| <Node Text="Westerns" /> |
| </Node> |
| <Node Text="Software"> |
| <Node Text="Business &amp; Office" /> |
| <Node Text="Database" /> |
| <Node Text="Networking" /> |
| <Node Text="Presentation" /> |
| <Node Text="Project Management" /> |
| <Node Text="Reports" /> |
| <Node Text="Spreadsheet" /> |
| <Node Text="Word Processing" /> |
| </Node> |
| </Tree> |