Gridpanel delete a record with rowcommand

  1. #1

    Gridpanel delete a record with rowcommand

    I am trying to delete a rocrodr from gridpanle and underliyng datastore . IHow can send record id to remove ajax event. My code follows:


    
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="kpi.aspx.cs" Inherits="ANT.Application.Performance.kpi" %>
    
    <!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>
        <script src="Resources/lib.js" type="text/javascript"></script>
        <script type="text/javascript">
            var template = '<span style="color:{0};">{1}</span>';
    
            var change = function (value) {
                return String.format(template, (value > 0) ? 'green' : 'red', value);
            }
    
            var pctChange = function (value) {
                return String.format(template, (value > 0) ? 'green' : 'red', value + '%');
    
            }
    
            var rowcommand = function (command, id) {
                if (command == "Delete") {
                    Ext.Msg.confirm("Sil", "Emin misiniz?");
    
                    Ext.Msg.confirm('Kayıt Sil',
    'Emin misiniz?',
    function (btn) {
        if (btn == 'yes') {
    
            var store = GridPanel1.store;
           store.remove(id);
            //GridPanel1.deleteSelected();
        }
    }, this, { stopEvent: true });
                }
    
    }
    
    var beforedelete = function(ar) {
        var args = arguments;
    
    }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Debug">
        </ext:ScriptManager>
        <div>
            <ext:Store ID="Store1" runat="server">
                <Reader>
                    <ext:JsonReader ReaderID="Id">
                        <Fields>
                            <ext:RecordField Name="Id" />
                            <ext:RecordField Name="Name" />
                        </Fields>                
                    </ext:JsonReader>
                   
                </Reader>
                <AjaxEvents>
                <Remove>
                <EventMask ShowMask="true" /> 
                      
                </Remove>
                </AjaxEvents>
               <Listeners>
                <LoadException Handler="var e = e || {message: response.statusText}; alert('Load failed: ' + e.message);" />
                    <SaveException Handler="alert('save failed');" />
                    <CommitDone Handler="alert('commit success');" />
                    <CommitFailed Handler="alert('Commit failed\nReason: '+msg)" />
                   
               </Listeners>
             
            </ext:Store>
            <ext:Store ID="ProsessModelStore" runat="server">
                <Reader>
                    <ext:JsonReader>
                        <Fields>
                            <ext:RecordField Name="Id" />
                            <ext:RecordField Name="Name" />
                        </Fields>
                    </ext:JsonReader>
                   
                </Reader>
               
            </ext:Store>
            <ext:Panel ID="Panel1" runat="server" Height="500" AutoWidth="true" HideBorders="true">
                <Body>
                    <ext:BorderLayout runat="server">
                        <West>
                            <ext:GridPanel ID="GridPanel1" runat="server" StoreID="Store1" StripeRows="true"
                                Title="Grid" TrackMouseOver="true" Width="500" AutoExpandColumn="Name">
                                <ColumnModel>
                                    <Columns>
                                        <ext:Column ColumnID="Id" Header="Id" Width="160" Sortable="true" DataIndex="Id" />
                                        <ext:Column ColumnID="Name" Header="KPI Adı" Width="160" Sortable="true" DataIndex="Name" />
                                        <ext:CommandColumn Width="60">
                                            <Commands>
                                                <ext:GridCommand Icon="Delete" CommandName="Delete">
                                                    <ToolTip Text="Sil" />
                                                </ext:GridCommand>
                                                <ext:CommandSeparator />
                                                <ext:GridCommand Icon="NoteEdit" CommandName="Edit">
                                                    <ToolTip Text="Düzenle" />
                                                </ext:GridCommand>
                                            </Commands>
                                        </ext:CommandColumn>
                                    </Columns>
                                </ColumnModel>
                                <SelectionModel>
                                    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
                                        <Listeners>
                                            <RowSelect Handler="#{FormPanel1}.getForm().loadRecord(record);" />
                                        </Listeners>
                                    </ext:RowSelectionModel>
                                </SelectionModel>
                                <Listeners>
                            
                                  <Command Handler="rowcommand(command, record);" />
                                   
                                </Listeners>
                                <LoadMask ShowMask="true" />
                            </ext:GridPanel>
                        </West>
                        <Center>
                            <ext:FormPanel ID="FormPanel1" runat="server" BodyStyle="padding:5px;" ButtonAlign="Right"
                                Frame="true" AutoHeight="true" AutoWidth="true" Title="KPI Düzenlemesi" Width="300">
                                <Body>
                                    <ext:FormLayout ID="FormLayout1" runat="server" LabelPad="10">
                                        <ext:Anchor>
                                            <ext:TextField ID="Name" runat="server" FieldLabel="KPI Adı" DataIndex="Name" AllowBlank="false"
                                                BlankText="Lütfen Key Performance Indicator İsmini Giriniz.">
                                            </ext:TextField>
                                        </ext:Anchor>
                                        <ext:Anchor>
                                            <ext:TextArea ID="Desc" runat="server" FieldLabel="Açıklama">
                                            </ext:TextArea>
                                        </ext:Anchor>
                                        <ext:Anchor>
                                            <ext:ComboBox ID="ProsessModel" runat="server" StoreID="ProsessModelStore" BlankText="Bu alan gereklidir."
                                                DisplayField="Name" ValueField="Id" ForceSelection="true" Editable="false" FieldLabel="Hesaplama Modeli"
                                                EmptyText="Seçiniz.." AllowBlank="false">
                                            </ext:ComboBox>
                                        </ext:Anchor>
                                        <ext:Anchor>
                                            <ext:ComboBox ID="Period" runat="server" EmptyText="Seçiniz.." AllowBlank="false"
                                                BlankText="Bu alan gereklidir." ForceSelection="true" Editable="false" TypeAhead="true"
                                                Mode="Local" SelectOnFocus="true" FieldLabel="Hesaplama Periyodu">
                                                <Items>
                                                    <ext:ListItem Text="Günlük" Value="1"></ext:ListItem>
                                                    <ext:ListItem Text="Aylık" Value="30"></ext:ListItem>
                                                </Items>
                                            </ext:ComboBox>
                                        </ext:Anchor>
                                    </ext:FormLayout>
                                </Body>
                                <Buttons>
                                    <ext:Button ID="btnSave" runat="server" Text="Submit" Icon="Disk" CausesValidation="true">
                                        <AjaxEvents>
                                            <Click Before="return DoWork(FormPanel1);" Success="DoWorkHide(FormPanel1);" Failure="DoWorkHideFailed(FormPanel1);">
                                            </Click>
                                        </AjaxEvents>
                                    </ext:Button>
                                </Buttons>
                            </ext:FormPanel>
                        </Center>
                    </ext:BorderLayout>
                </Body>
            </ext:Panel>
        </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 ANT.Application.Performance;
    using System.Collections;
    using Coolite.Ext.Web;
    using ANT.Web.Framework.EntitySchema;
    using System.Data.Objects;
    
    
    namespace ANT.Application.Performance
    {
        public partial class kpi : EditPage<ANT.Web.Framework.EntitySchema.KPI>
        {
          
          
          
            
           public void Remove_Event(object sender, AjaxEventArgs e)
            {
                // delete code comes
            }
            protected void Page_Load(object sender, EventArgs e)
            {
    
                if (!Ext.IsAjaxRequest)
                {
                                  
                    using (PerformanceContainer ctx = new PerformanceContainer())
                    {
                        string eSql = @"SELECT VALUE KPI
                        FROM PerformanceContainer.KPI as kpi
                       ORDER BY kpi.Name";
    
                        ObjectQuery<KPI> productQuery = ctx.CreateQuery<KPI>(eSql);
    
                        using (ObjectResult<KPI> result =
                                 productQuery.Execute(MergeOption.AppendOnly))
                        {
                            List<KPI> products = result.ToList<KPI>();
    
                            this.Store1.DataSource = products;
                            this.Store1.DataBind();
                        }
                    }
    
                 
    
    
    
                    ArrayList list = new ArrayList();
                    list.AddRange(
                        new ANT.Application.Performance.ProsessModel[]
                {
                    new ANT.Application.Performance.ProsessModel 
                    { Id = 1, Name = "Doğru Orantılı" },
                     new ANT.Application.Performance.ProsessModel { Id = 2, Name = "Ters Orantılı" },
                      new ANT.Application.Performance.ProsessModel 
                    { Id = 3, Name = "Parabolik" }               
                }
    
                        );
                    ProsessModelStore.DataSource = list;
                    ProsessModelStore.DataBind();
                }
    
            }
    
    
        }
    
        class ProsessModel
        {
            public int Id { get; set; }
            public string Name { get; set; }
        }
    
    }
  2. #2

    This might help

    I dont know if this would help.I have gone through the code. What i understand is that you want record id in ajax event.

    If you want record id in ajax event then you can use <Extra Parameters> with ajax events and pass your id with it . In the value field of <ExtraParameter> write record.AppointmentID if AppointmentID is your primary key.You can then call your Controller classes and delete the record and rebind store from the codebehind.

    Hope it helps.
  3. #3

    This might help but it for one to many relationship b/w tables

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication4._Default" %>

    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

    <!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>

    <script runat="server">
    private bool cancel;
    private string message;
    private string insertedValue;
    protected void Store2_Refresh(object sender, StoreRefreshDataEventArgs e)
    {
    string id = e.Parameters["OrderID"];
    //this.LinqDataSource2.WhereParameters["supplerid"].DefaultValue = id ?? "-1";
    this.SqlDataSource3.SelectParameters["OrderID"].DefaultValue = id ?? "-1";
    //this.SqlDataSource2.SelectCommand = "select * from Table_1 where supplerid=supplerid";

    this.Store2.DataBind();
    }


    // This handler will be calling for each inserted record



    </script>
    <script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {


    string[] alVar ={ "hyd","amrica","warangal"};
    //this.cbStates.Items.AddRange[new Ext.Net.ListItem(alVar.GetValue)];


    }

    protected void Store1_AfterRecordInserted(object sender, AfterRecordInsertedEventArgs e)
    {
    //The deleted and updated records confirms automatic (depending AffectedRows field)
    //But you can override this in AfterRecordUpdated and AfterRecordDeleted event
    //For insert we should set new id for refresh on client
    //If we don't set new id then old id will be used
    if (e.Confirmation.Confirm && !string.IsNullOrEmpty(insertedValue))
    {
    e.Confirmation.ConfirmRecord(insertedValue);
    insertedValue = "";
    }
    }

    protected void SqlDataSource1_Inserted(object sender, SqlDataSourceStatusEventArgs e)
    {
    //use e.AffectedRows for ensure success action. The store read this value and set predefined Confirm depend on e.AffectedRows
    //The Confirm can be granted or denied in OnRecord....ed event
    insertedValue = e.Command.Parameters["@supplerid"].Value != null
    ? e.Command.Parameters["@supplerid"].Value.ToString()
    : "";
    }

    protected void Store1_AfterDirectEvent(object sender, AfterDirectEventArgs e)
    {
    if (e.Response.Success)
    {
    // set to .Success to false if we want to return a failure
    e.Response.Success = !cancel;
    e.Response.Message = message;
    //if (this.cancel)
    // {
    // GridPanel1.AddScript("alert({0});", JSON.Serialize(this.message));
    //}
    }
    }

    protected void Store1_BeforeDirectEvent(object sender, BeforeDirectEventArgs e)
    {
    string emulError = e.Parameters["EmulateError"];

    if (emulError == "1")
    {
    throw new Exception("Emulating error");
    }
    }

    protected void Store1_RefershData(object sender, StoreRefreshDataEventArgs e)
    {
    this.Store1.DataBind();
    }
    </script>
    </head>
    <body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server">
    </ext:ResourceManager>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
    ConnectionString="<%$ ConnectionStrings:GiftOneConnectionString %>"
    DeleteCommand="DELETE FROM tblOrders WHERE (OrderID = @OrderID)"

    SelectCommand="SELECT * FROM tblOrders"

    UpdateCommand="UPDATE tblOrders SET

    OrderPlacedDate = @OrderPlacedDate,
    OrderAmount=@OrderAmount,
    OrderState=@OrderState,
    OrderProcessedDate=@OrderProcessedDate,
    OrderShippedDate=@OrderShippedDate,
    UserID=@UserID
    WHERE (OrderID = @OrderID)"

    OnInserted="SqlDataSource1_Inserted">

    <DeleteParameters>
    <asp:Parameter Name="OrderID" Type="Int32" />
    </DeleteParameters>

    <UpdateParameters>
    <asp:Parameter Name="OrderID" Type="Int32" />
    <asp:Parameter Name="OrderPlacedDate" Type="DateTime" />
    <asp:Parameter Name="OrderAmount" Type="Decimal" />
    <asp:Parameter Name="OrderState" Type="String" />
    <asp:Parameter Name="OrderProcessedDate" Type="DateTime" />
    <asp:Parameter Name="OrderShippedDate" Type="DateTime" />
    <asp:Parameter Name="UserID" Type="Int32" />

    </UpdateParameters>

    </asp:SqlDataSource>

    <asp:SqlDataSource ID="SqlDataSource3" runat="server"
    ConnectionString="<%$ ConnectionStrings:GiftOneConnectionString2 %>"

    DeleteCommand="DELETE FROM tblOrderItems WHERE (OrderID = @OrderID)"

    SelectCommand="SELECT
    OrderItemID,
    OrderID,
    ProductID,ProductPrice,Quantity,PhotoPath

    FROM tblOrderItems WHERE (OrderID = @OrderID)"

    UpdateCommand="UPDATE tblOrderItems SET

    OrderItemID = @OrderItemID,
    OrderID = @OrderID,
    ProductID=@ProductID,ProductPrice=@ProductPrice,Qu antity=@Quantity,
    PhotoPath=@PhotoPath
    WHERE (OrderItemID = @OrderItemID)"

    >
    <SelectParameters>
    <asp:Parameter Name="OrderID" Type="Int32" />

    </SelectParameters>

    <DeleteParameters>
    <asp:Parameter Name="OrderItemID" Type="Int32" />
    </DeleteParameters>

    <UpdateParameters>
    <asp:Parameter Name="OrderItemID" Type="Int32" />
    <asp:Parameter Name="OrderID" Type="Int32" />
    <asp:Parameter Name="ProductID" Type="Int32" />
    <asp:Parameter Name="ProductPrice" Type="Decimal" />
    <asp:Parameter Name="Quantity" Type="Int32" />
    <asp:Parameter Name="PhotoPath" Type="String"/>


    </UpdateParameters>
    </asp:SqlDataSource>
    <div>
    <ext:Panel
    ID="Panel1"
    runat="server"
    Title="ORDERS"
    Height="200"
    Icon="Basket"
    Layout="Fit">
    <Items>
    <ext:GridPanel
    ID="GridPanel1"
    runat="server"
    AutoExpandColumn="OrderID">
    <Store>
    <ext:Store ID="Store1" runat="server" DataSourceID="SqlDataSource1"
    OnAfterDirectEvent="Store1_AfterDirectEvent"
    OnBeforeDirectEvent="Store1_BeforeDirectEvent"
    UseIdConfirmation="true"
    OnAfterRecordInserted="Store1_AfterRecordInserted"
    OnRefreshData="Store1_RefershData"

    >
    <Reader>
    <ext:JsonReader IDProperty="OrderID">
    <Fields>
    <ext:RecordField Name="OrderID" />
    <ext:RecordField Name="OrderPlacedDate" />
    <ext:RecordField Name="OrderAmount" />
    <ext:RecordField Name="OrderState" />
    <ext:RecordField Name="OrderProcessedDate" />
    <ext:RecordField Name="OrderShippedDate" />
    <ext:RecordField Name="UserID" />
    </Fields>
    </ext:JsonReader>
    </Reader>
    </ext:Store>
    </Store>
    <ColumnModel ID="ColumnModel1" runat="server">
    <Columns>
    <ext:Column DataIndex="OrderID" Header="OrderID" >
    </ext:Column>
    <ext:Column DataIndex="OrderPlacedDate" Header="OrderPlacedDate">
    </ext:Column>
    <ext:Column DataIndex="OrderAmount" Header="OrderAmount">
    </ext:Column>
    <ext:Column DataIndex="OrderState" Header="OrderState">
    <Editor>
    <ext:ComboBox ID="ComboBox1" runat="server">
    <Template ID="ctl75"></Template>
    <Items>
    <ext:ListItem Value="In-Process" Text="In-Process" />
    <ext:ListItem Value="Shipped" Text="Shipped"/>
    <ext:ListItem Value="Delivered" Text="Delivered" />
    <ext:ListItem Value="Cancelled" Text="Cancelled" />
    </Items>
    </ext:ComboBox>
    </Editor>
    </ext:Column>


    <ext:Column DataIndex="OrderProcessedDate" Header="OrderProcessedDate">
    </ext:Column>
    <ext:Column DataIndex="OrderShippedDate" Header="OrderShippedDate">
    </ext:Column>
    <ext:Column DataIndex="UserID" Header="UserID">
    </ext:Column>
    </Columns>
    </ColumnModel>
    <Plugins>
    <ext:GridFilters runat="server" ID="GridFilters1">
    <Filters>
    <ext:NumericFilter DataIndex="OrderID" />
    <ext:DateFilter DataIndex="OrderPlacedDate"/>

    <ext:NumericFilter DataIndex="OrderAmount" />
    <ext:StringFilter DataIndex="OrderState" />
    <ext:DateFilter DataIndex="OrderProcessedDate"/>
    <ext:DateFilter DataIndex="OrderShippedDate"/>
    <ext:DateFilter DataIndex="UserID"/>
    </Filters>
    </ext:GridFilters>
    </Plugins>
    <SelectionModel>
    <ext:RowSelectionModel ID="RowSelectionModel2" runat="server" SingleSelect="true">
    <Listeners>
    <RowSelect Handler="if (#{pnlSouth}.isVisible()) {#{Store2}.reload();}" Buffer="250" />
    </Listeners>
    </ext:RowSelectionModel>
    </SelectionModel>
    <BottomBar>
    <ext:PagingToolbar ID="PagingToolBar1" runat="server" PageSize="10" />
    </BottomBar>
    <SaveMask ShowMask="true" />
    <LoadMask ShowMask="true" />
    </ext:GridPanel>
    </Items>
    <Buttons>
    <ext:Button ID="btnSave" runat="server" Text="Save" Icon="Disk">
    <Listeners>
    <Click Handler="#{GridPanel1}.save();" />
    </Listeners>
    </ext:Button>
    <ext:Button ID="btnDelete" runat="server" Text="Delete selected records" Icon="Delete" >
    <Listeners>
    <Click Handler="#{GridPanel1}.deleteSelected();" />
    </Listeners>
    </ext:Button>
    <ext:Button ID="btnInsert" runat="server" Text="Insert" Icon="Add">
    <Listeners>
    <Click Handler="#{GridPanel1}.insertRecord(0, {});#{GridPanel1}.getView().focusRow(0);#{GridPane l1}.startEditing(0,0);" />
    </Listeners>
    </ext:Button>
    <ext:Button ID="btnRefresh" runat="server" Text="Refresh" Icon="ArrowRefresh">
    <Listeners>
    <Click Handler="#{GridPanel1}.reload();" />
    </Listeners>
    </ext:Button>
    <ext:Button ID="btnEmulError" runat="server" Text="Refresh with Emulated error" Icon="Exclamation">
    <Listeners>
    <Click Handler="#{GridPanel1}.reload({params:{EmulateErro r: 1}});" />
    </Listeners>
    </ext:Button>
    </Buttons>
    </ext:Panel>
    </div>

    <div>

    <%-- panel is the container for the all the iteams like Grid--%>

    <%-- in grid panel we can write 1.srore 2. column model
    1.store:it is used for bind the data to Gridpanel here we have to mention [id,datasourceid]
    in store we have <Reader> & <ext:jsonreader>&<Fields><ext:RecordField> this is the hirarchy.--%>


    <ext:Panel
    ID="pnlSouth"
    runat="server"
    Title="OrderDtails"
    Height="200"
    Icon="Basket"
    Layout="Fit">
    <Items>
    <ext:GridPanel
    ID="GridPanel2"
    runat="server"
    AutoExpandColumn="OrderItemID"
    Border="false">
    <Store>
    <ext:Store ID="Store2" runat="server" DataSourceID="SqlDataSource3" OnRefreshData="Store2_Refresh">
    <Reader>
    <ext:JsonReader IDProperty="OrderItemID">
    <Fields>

    <ext:RecordField Name="OrderItemID" Type="Int" />
    <ext:RecordField Name="OrderID" Type="Int" />
    <ext:RecordField Name="ProductID" Type="Int" />
    <ext:RecordField Name="ProductPrice" Type="Float" />
    <ext:RecordField Name="Quantity" Type="Int" />
    <ext:RecordField Name="PhotoPath" Type="String" />

    </Fields>
    </ext:JsonReader>
    </Reader>
    <BaseParams>
    <ext:Parameter
    Name="OrderID"
    Value="#{GridPanel1}.getSelectionModel().hasSelect ion() ? #{GridPanel1}.getSelectionModel().getSelected().id : -1"
    Mode="Raw"
    />
    </BaseParams>
    <Listeners>
    <LoadException Handler="Ext.Msg.alert('Products - Load failed', e.message || response.statusText);" />
    </Listeners>
    </ext:Store>
    </Store>
    <ColumnModel ID="ColumnModel2" runat="server">
    <Columns>

    <ext:Column DataIndex="OrderItemID" Header="OrderItemID">
    </ext:Column>
    <ext:Column DataIndex="OrderID" Header="OrderID">
    </ext:Column>
    <ext:Column DataIndex="ProductID" Header="ProductID">
    </ext:Column>
    <ext:Column DataIndex="ProductPrice" Header="ProductPrice">
    </ext:Column>
    <ext:Column DataIndex="Quantity" Header="Quantity">
    </ext:Column>
    <%--<ext:ImageCommandColumn DataIndex="src={PhotoPath}" Header="photopath"></ext:ImageCommandColumn>--%>
    <%--<ext:Column DataIndex="<html><div><img url="PhotoPath"/> </div></html>" Header="PhotoPath">
    </ext:Column>--%>
    <ext:Column DataIndex="PhotoPath" Header="PhotoPath">
    </ext:Column>
    </Columns>
    </ColumnModel>
    <LoadMask ShowMask="true" />
    <SelectionModel>
    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true" />
    </SelectionModel>
    </ext:GridPanel>
    </Items>

    <Listeners>
    <Expand Handler="#{Store2}.reload();" />
    </Listeners>
    <Buttons>
    <ext:Button ID="Button1" runat="server" Text="Save" Icon="Disk">
    <Listeners>
    <Click Handler="#{GridPanel2}.save();" />
    </Listeners>
    </ext:Button>
    <ext:Button ID="Button2" runat="server" Text="Delete selected records" Icon="Delete" >
    <Listeners>
    <Click Handler="#{GridPanel2}.deleteSelected();" />
    </Listeners>
    </ext:Button>
    <ext:Button ID="Button3" runat="server" Text="Insert" Icon="Add">
    <Listeners>
    <Click Handler="#{GridPanel2}.insertRecord(0, {});#{GridPanel2}.getView().focusRow(0);#{GridPane l2}.startEditing(0, 0);" />
    </Listeners>
    </ext:Button>
    <ext:Button ID="Button4" runat="server" Text="Refresh" Icon="ArrowRefresh">
    <Listeners>
    <Click Handler="#{GridPanel2}.reload();" />
    </Listeners>
    </ext:Button>
    <ext:Button ID="Button5" runat="server" Text="Refresh with Emulated error" Icon="Exclamation">
    <Listeners>
    <Click Handler="#{GridPanel2}.reload({params:{EmulateErro r: 1}});" />
    </Listeners>
    </ext:Button>
    </Buttons>

    </ext:Panel>


    </div>



    </form>
    </body>
    </html>
  4. #4

    Thannk you

    Problem solved. thank you.

Similar Threads

  1. Replies: 3
    Last Post: Oct 13, 2013, 8:06 AM
  2. how to delete or remove record?
    By richard in forum 2.x Help
    Replies: 0
    Last Post: Jun 08, 2012, 10:12 AM
  3. Delete or remove record from gridpanel
    By lapix in forum 1.x Help
    Replies: 3
    Last Post: Feb 25, 2012, 6:56 PM
  4. Replies: 0
    Last Post: Feb 05, 2012, 1:33 AM
  5. Replies: 13
    Last Post: Jun 09, 2011, 1:36 PM

Tags for this Thread

Posting Permissions