[CLOSED] DeleteCommand will not fire

  1. #1

    [CLOSED] DeleteCommand will not fire

    Hi I have a simple gridpanel with a sql data source. Everything works fine "insert command", update command. But the delete command will not fire. I dont know why? Is their maybe a bug or have I forgotten something

    <asp:SqlDataSource ID="SqlDSViewsPerGroup" runat="server" ConnectionString=""
    DeleteCommand="DELETE FROM ViewsPerGroup"></asp:SqlDataSource>
    
    
    //delete Button to the gridpanel
    <ext:Button ID="btnDelete" runat="server"  Text="Delete" Icon="Delete">
        <Listeners>
            <Click Handler="#{gpViewsPerGroup}.deleteSelected();" />
        </Listeners>
    </ext:Button>

    /mikael

  2. #2

    RE: [CLOSED] DeleteCommand will not fire

    Hi Mikael,

    Did you call save after deleteSelected?

     <Click Handler="#{gpViewsPerGroup}.deleteSelected(); #{gpViewsPerGroup}.save();" />

  3. #3

    RE: [CLOSED] DeleteCommand will not fire

    Hehe
    very sorry.
    I did not, now it works :)

    thanks!

    /Mikael
  4. #4

    RE: [CLOSED] DeleteCommand will not fire

    Another thing, does the


    ReaderID="ID"

    Has to be set to be able to delete records?

    /Mikael
  5. #5

    RE: [CLOSED] DeleteCommand will not fire

    The reason I ask is because I have a table that has an uniqe index with 2 columns in it. I need to enter both of these columns in the reader id. but that does not work. What I had to do was to add a column with at autoincrement. Then I set this column as readerid. But I dont like that workaround. I dont want to have extra columns just for that. Is there a way around it?

    /Mkael
  6. #6

    RE: [CLOSED] DeleteCommand will not fire

    Hi Mikael,

    Can you combine the fields on the server and just send out a concactinated id? Maybe add a separator character that you can later split on? The ReaderID will only accept a sigle value.*


    If you also want to display each of the id fields separately you could include them as separate data fields in the Store, and separate fields in the GridPanel when rendering.*


    Hope this helps.


    Geoffrey McGill
    Founder
  7. #7

    RE: [CLOSED] DeleteCommand will not fire

    Hi
    Thanks, then I know.


    /Mikael

Similar Threads

  1. [CLOSED] Can't get State-events to fire
    By Fredrik in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: May 02, 2012, 4:44 PM
  2. [CLOSED] Fire directevent from javascript
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 15, 2011, 5:05 PM
  3. [CLOSED] Renderer doesn't fire
    By sharif in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 08, 2010, 5:40 PM
  4. [CLOSED] CheckboxSelectionModel + BeforeEdit won't fire
    By reinout.mechant@imprss.be in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Oct 29, 2009, 9:57 AM
  5. [CLOSED] The javascript function in not fire?
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Sep 09, 2009, 10:12 AM

Posting Permissions