GridButtonColumn buttonColumn = new GridButtonColumn();
buttonColumn.ButtonType =
GridButtonColumnType.ImageButton;
buttonColumn.ImageUrl =
"~/images/delete.png";
buttonColumn.CommandName =
"Delete";
buttonColumn.UniqueName =
"deleteColumn";
buttonColumn.HeaderStyle.Width = 16;
buttonColumn.ConfirmText = (
"Confirm Delete");
buttonColumn.ConfirmTitle =
"Delete Item";
RadGrid1.Columns.Add(buttonColumn);
....
and then added
...
RadGrid1.DeleteCommand += new GridCommandEventHandler(RadGrid1_DeleteCommand);
...
I have the setup the event as follows...
protected void RadGrid1_DeleteCommand(object source, GridCommandEventArgs e)
{
Code here...
}
However, when I run up the application and click on the delete button in the grid, it never reaches the DeleteCommand event, it just does a postback. Please can someone help with this.
Many thanks
Dave
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
switch (e.CommandName)
{
case "PerformInsert":
// Code to save to database
// How to reopen record in edit mode
break;
}
}
<
telerik:RadNumericTextBox ID="CCNum" runat="server" MaxLength="16" EmptyMessage="Enter Card Number" NumberFormat-AllowRounding="False" NumberFormat-DecimalDigits="0" MinValue="0" MaxValue="9999999999999999" NumberFormat-GroupSeparator=" " NumberFormat-GroupSizes="4"></telerik:RadNumericTextBox>
The only issue I have is that after postback the number is displayed in a scientific format, e.g. 1.234567890123456E+15. When I set focus to the field and unfocus it the number is back to the proper format: 1234 5678 9012 3456.| <%@ Master Language="C#" AutoEventWireup="true" CodeFile="master.master.cs" Inherits="contents_master" %> |
| <%@ 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 id="Head1" runat="server"> |
| <title>Master</title> |
| <link href="../css/main.css" rel="stylesheet" type="text/css" /> |
| <asp:ContentPlaceHolder id="head" runat="server"> |
| </asp:ContentPlaceHolder> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <table style="width: 100%"> |
| <tr> |
| <td valign="top"><div id="mastheadVersionText">SalocSoft PBS v1.0 Beta<telerik:RadScriptManager |
| ID="RadScriptManager1" Runat="server"> |
| </telerik:RadScriptManager> |
| </div></td> |
| <td valign="top" align="right"> |
| <div id="logininfo"> |
| <asp:Button runat="server" Text="Logga ut" id="btnLogout" onclick="btnLogout_Click" Font-Size="X-Small"></asp:Button> |
| </div> |
| </td> |
| </tr> |
| <tr><td valign="top"> |
| <div id="top_nav"> |
| <asp:SiteMapPath id="SiteMapPath1" runat="server" Font-Names="Verdana" Font-Size="0.8em" PathSeparator=" > "> |
| <PathSeparatorStyle Font-Bold="True" ForeColor="Black" /> |
| <CurrentNodeStyle ForeColor="Black" /> |
| <NodeStyle Font-Bold="True" ForeColor="#666666" /> |
| <RootNodeStyle Font-Bold="True" ForeColor="#1C5E55" /> |
| </asp:SiteMapPath> </div> |
| </td><td></td></tr> |
| </table> |
| <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%"> |
| <telerik:RadPane ID="RadPane1" runat="server" Width="22px"> |
| <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server"> |
| <telerik:RadSlidingPane ID="RadSlidingPane1" runat="server"> |
| <asp:HyperLink ID="hlTest1" runat="server" |
| NavigateUrl="workerapplications/view_w_applications.aspx" |
| Text="Test"> |
| </asp:HyperLink> |
| </telerik:RadSlidingPane> |
| <telerik:RadSlidingPane ID="RadSlidingPane2" runat="server"> |
| </telerik:RadSlidingPane> |
| </telerik:RadSlidingZone> |
| </telerik:RadPane> |
| <telerik:RadSplitBar ID="RadSplitBar1" runat="server" /> |
| <telerik:RadPane ID="RadPane2" runat="server" Width="100%"> |
| <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"></asp:ContentPlaceHolder> |
| </telerik:RadPane> |
| </telerik:RadSplitter> |
| </form> |
| </body> |
| </html> |
| <%@ Page Language="C#" MasterPageFile="~/contents/master.master" AutoEventWireup="true" CodeFile="view_w_applications.aspx.cs" Inherits="contents_workerapplications_view_w_applications" Title="Untitled Page" %> |
| <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> |
| </asp:Content> |
| <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> |
| </asp:Content> |
| if (!IsPostBack && Profile.UseOrderWizard) |
| { |
| ClientScript.RegisterStartupScript(this.GetType(), "NewOrderWizard", "<script type='text/javascript'>ShowOrderWizard();</script>"); |
| } |
| <script type="text/javascript"> |
| function ShowOrderWizard() { |
| window.radopen("NewOrderWizard.aspx", "NewOrderWizard"); |
| return false; |
| } |
| </script> |
| <telerik:RadWindowManager ID="rwmNewOrder" runat="server" Behaviors="Reload,Close" Skin="Vista" Modal="true" |
| VisibleStatusbar="false" ReloadOnShow="true" ShowContentDuringLoad="false"> |
| <Windows> |
| <telerik:RadWindow ID="NewOrderWizard" runat="server" Width="700" Height="460" /> |
| </Windows> |
| </telerik:RadWindowManager> |