This is a discussion on Properties of Anthem DataGrid within the ASP and ASP.NET Programming forums, part of the Web Development category; Hi All, Some Properties of Anthem DataGrid CallBackCancelledFunction [get, set] Gets or sets the javascript function to execute on the ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi All, Some Properties of Anthem DataGrid CallBackCancelledFunction [get, set] Gets or sets the javascript function to execute on the client if the callback is cancelled. See PreCallBackFunction. UpdateAfterCallBack [get, set] Gets or sets a value which indicates whether the control should be updated after the current callback. Also see AutoUpdateAfterCallBack. AutoUpdateAfterCallBack [get, set] Gets or sets a value indicating whether the control should be updated after each callback. Also see UpdateAfterCallBack. PostCallBackFunction [get, set] Gets or sets the javascript function to execute on the client after the callback response is received. |
| Sponsored Links |
| |||
| Hi Edit,Delete GridView without postback using anthem <%@ Page Language="C#" MasterPageFile="~/Sample.master" %> <%@ Register Assembly="Anthem" Namespace="Anthem" TagPrefix="anthem" %> <%@ Import Namespace="System.Data" %> <script runat="server"> void resetButton_Click(object sender, EventArgs e) { DataSource.RemoveDataTable(); gridView.DataBind(); gridView.UpdateAfterCallBack = true; } protected void filterButton_Click(object sender, EventArgs e) { gridView.UpdateAfterCallBack = true; } protected void gridView_SelectedIndexChanged(object sender, EventArgs e) { Anthem.GridView gv = sender as Anthem.GridView; string id = gv.SelectedRow.Cells[0].Text; Anthem.Manager.AddScriptForClientSideEval( string.Format( "alert('You selected the record with an ID of {0}!')", id ) ); } protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e) { gridView.DataBind(); } protected void DetailsView1_ItemDeleted(object sender, DetailsViewDeletedEventArgs e) { gridView.DataBind(); } </script> <asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolder"> <script type="text/javascript"> function preDelete() { return confirm('Are you sure?'); } </script> <asp:ObjectDataSource ID="DataSource1" runat="server" TypeName="DataSource" SelectMethod="Select" UpdateMethod="Update" DeleteMethod="Delete" FilterExpression="{0}"> <FilterParameters> <asp:ControlParameter ControlID="filterTextBox" /> </FilterParameters> </asp:ObjectDataSource> <asp:ObjectDataSource ID="DetailSource1" runat="server" TypeName="DetailSource" SelectMethod="Select" UpdateMethod="Update" DeleteMethod="Delete"> <SelectParameters> <asp:ControlParameter ControlID="gridView" Name="id" PropertyName="SelectedValue" Type="int32" /> </SelectParameters> </asp:ObjectDataSource> <anthem:GridView ID="gridView" runat="server" AutoGenerateColumns="False" DataSourceID="DataSource1" DataKeyNames="id" AllowSorting="True" AllowPaging="True" PageSize="5" CellPadding="4" ForeColor="#333333" GridLines="None" OnSelectedIndexChanged="gridView_SelectedIndexChan ged" Width="300px"> <Columns> <asp:BoundField DataField="id" HeaderText="ID" SortExpression="id" ReadOnly="True" /> <asp:BoundField DataField="a" HeaderText="A" SortExpression="a" /> <asp:BoundField DataField="b" HeaderText="B" SortExpression="b" /> <asp:CheckBoxField DataField="c" HeaderText="C" SortExpression="c" /> <asp:TemplateField ShowHeader="False"> <edititemtemplate> <asp:LinkButton runat="server" Text="Update" CommandName="Update" CausesValidation="True" id="LinkButton1" /> <asp:LinkButton runat="server" Text="Cancel" CommandName="Cancel" CausesValidation="False" id="LinkButton2" /> </edititemtemplate> <itemtemplate> <asp:LinkButton runat="server" Text="Edit" CommandName="Edit" CausesValidation="False" id="LinkButton4" /> <anthem:LinkButton runat="server" Text="Delete" CommandName="Delete" CausesValidation="False" id="LinkButton3" PreCallBackFunction="preDelete" /> </itemtemplate> </asp:TemplateField> <asp:CommandField ShowSelectButton="True" /> </Columns> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <RowStyle BackColor="#EFF3FB" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <AlternatingRowStyle BackColor="White" /> <EditRowStyle BackColor="#2461BF" /> </anthem:GridView> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"> <anthem etailsView ID="DetailsView1" runat="server"AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" DataKeyNames="id" DataSourceID="DetailSource1" HeaderText="DetailsView" OnItemUpdated="DetailsView1_ItemUpdated" OnItemDeleted="DetailsView1_ItemDeleted" Width="300px"> <HeaderStyle BackColor="#2461BF" Font-Bold="True" ForeColor="White" /> <CommandRowStyle BackColor="#2461BF" ForeColor="White" /> <FieldHeaderStyle BackColor="#507CD1" /> <RowStyle BackColor="#EFF3FB" /> </anthem etailsView></td> <td valign="top"> <anthem:FormView ID="FormView1" runat="server" DataKeyNames="id" DataSourceID="DetailSource1" HeaderText="FormView" Width="300px"> <RowStyle BackColor="#EFF3FB" /> <ItemTemplate> <table> <tr> <td><b>ID:</b></td> <td><%# Eval("id") %></td> </tr> <tr> <td><b>E:</b></td> <td><%# Eval("e") %></td> </tr> <tr> <td><b>F:</b></td> <td><%# Eval("f") %></td> </tr> </table> </ItemTemplate> <HeaderStyle BackColor="#2461BF" Font-Bold="True" ForeColor="White" /> </anthem:FormView> </td> </tr> </table> <div> <p> Enter an expression to filter the data (something like <code>id <= 5</code> or <code>not c</code>):</p> <asp:TextBox ID="filterTextBox" runat="server" /> <anthem:Button ID="filterButton" runat="server" Text="Filter" OnClick="filterButton_Click" /> </div> <div> <p> Click the Reset button to restore the data after updating/deleting.</p> <anthem:Button ID="resetButton" runat="server" Text="Reset" OnClick="resetButton_Click" /> </div> </asp:Content> |
| |||
| Hi all When i have textbox and dropdownlist to focus the next control we use the tab index to focus the next control but when there is postback the focus starts from first.To focus the next control even after the postback System.Web.UI.ScriptManager.GetCurrent(this).SetFo cus(this.YourControl); |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| List of EXIF metadata properties item name and its proprety ID values | oxygen | C# Programming | 1 | 12-24-2007 02:30 AM |
| How to use the edit delete function without postback in datagrid using anthem | kingmaker | ASP and ASP.NET Programming | 1 | 08-29-2007 11:59 PM |
| How to change the checkBox properties, which is inside nested Repeater/Grid | kingmaker | C# Programming | 2 | 08-10-2007 12:28 AM |
| How we know browser properties? | devarajan.v | PHP Programming | 1 | 07-27-2007 03:36 AM |
| XML parsing properties and Methods in Javascript | Jeyaseelansarc | PHP Programming | 0 | 05-08-2007 03:16 AM |