Delete rows depending on value with button

Page 2 of 2 FirstFirst 12
  1. #11
    Do you use an <ext:TaskManager> control?

    Please try:
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!X.IsAjaxRequest) 
        {
            ShowBatch();
        }
    }
  2. #12
    No, I don't have a taskmanager.

    But what is that supposed to do your snippet, because now when I open my page it's just empty.

    Click image for larger version. 

Name:	empty.png 
Views:	24 
Size:	8.2 KB 
ID:	3886
  3. #13
    How is the Store configured?
  4. #14
    Eh.. I only got this in store: <ext:Store ID="Store1" runat="server" WarningOnDirty="false">

        
    <body>
        <ext:XScript ID="XScript1" runat="server">
        </ext:XScript>
        <form id="batchGUI" runat="server">
        <br />
    <ext:Panel runat="server" ID="panel" Height="0">
            <TopBar>
                <ext:Toolbar runat="server">
                    <Items>
                        <ext:Button ID="btnHaalBatch" runat="server" Text="GBA synchroniseren" OnDirectClick="btnHaalBatch_Clicked" Icon="Add"</ext:Button>
                        <ext:Button ID="btnVerwerkNAW" runat="server" Text="Verwerk" OnDirectClick="btnVerwerkNAW_Clicked" Icon="Tick">
                        </ext:Button>
                        
                        <ext:Button ID="btnClearSelection" runat="server" Text="Mutatie(s) legen" Icon="Delete" OnDirectClick="btnClearSelection_Clicked">
                            <Listeners>
                                <Click Handler="MutatieLegen(#{grid});" />
                            </Listeners>
                        </ext:Button>
                    </Items>
                </ext:Toolbar>
            </TopBar>
        </ext:Panel>
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <!-- Simple Array Grid -->
        <ext:GridPanel ID="grid" runat="server" Title="Wijzigingen" AutoWidth="true" AutoHeight="true" Padding="4" StripeRows="true" Draggable="false" Selectable="true" Icon="Application">
            <Store>
                <ext:Store ID="Store1" runat="server" WarningOnDirty="false">
                    <Reader>
                        <ext:ArrayReader>
                            <Fields>
                                <ext:RecordField Name="persoonID" Mapping="PersoonsId" />
                                <ext:RecordField Name="anummer" Mapping="Anummer" />
                                <ext:RecordField Name="bSNpersoon" Mapping="BSNpersoon" />
                                <ext:RecordField Name="type" Mapping="TypeWijziging" />
                                <ext:RecordField Name="datum" Mapping="DatumBinnenhalen" />
                                <ext:RecordField Name="omschrijving" Mapping="Omschrijving" />
                                <ext:RecordField Name="foutmelding" Mapping="Foutmelding" />
                            </Fields>
                        </ext:ArrayReader>
                    </Reader>
                </ext:Store>
            </Store>
            <ColumnModel ID="ColumnModel1" runat="server">
                <Columns>
                    <ext:RowNumbererColumn />
                    <ext:Column DataIndex="persoonID" Header="Relatie nr." Width="100">
                    </ext:Column>
                    <ext:Column DataIndex="anummer" Header="A-nummer" Width="150">
                    </ext:Column>
                    <ext:Column DataIndex="bSNpersoon" Header="BSN" Width="150">
                    </ext:Column>
                    <ext:Column DataIndex="type" Header="Type wijziging" Width="150">
                    </ext:Column>
                    <ext:Column DataIndex="datum" Header="Datum synchroniseren" Width="200">
                    </ext:Column>
                    <ext:Column ColumnID="columnStatus" DataIndex="omschrijving" Header="Status" Width="130">
                        <Renderer Handler="return imgRenderer(value);" />
                    </ext:Column>
                    <ext:Column DataIndex="foutmelding" Header="Reden" Width="350">
                    </ext:Column>
                </Columns>
            </ColumnModel>
            <SelectionModel>
                <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="false" />
            </SelectionModel>
        </ext:GridPanel>
     </form>
    </body>
  5. #15
    EDIT: not sure if this helpfull, but I left a tab open with my store and rows (first picture), I clicked delete and it doesnt rollback anymore.
    However when I run the program again and page loads, no batch are shown.
  6. #16
    Unfortunately, I have no idea what might be wrong. Please provide a sample to reproduce.
  7. #17
    I think I fixed the problem, I deleted the reload and everyhting is steady now.

    public void ShowBatch()
           {
               DataTable showBatch = DAL.ShowBatch();
               Store1.DataSource = showBatch;
               Store1.DataBind();
               grid.Reload();   <-- deleted
           }
  8. #18
    Good point. I've just missed that.
Page 2 of 2 FirstFirst 12

Similar Threads

  1. [CLOSED] Edit and Delete Grid Rows with Permissions
    By pint in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 25, 2012, 10:24 AM
  2. Replies: 0
    Last Post: Apr 10, 2011, 7:57 PM
  3. Replies: 0
    Last Post: Mar 24, 2011, 1:23 PM
  4. [CLOSED] How to resize a panel depending of radio button BoxLabels length?
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 09, 2010, 1:59 PM
  5. Replies: 0
    Last Post: Jul 23, 2010, 6:35 AM

Tags for this Thread

Posting Permissions