Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
Delete Row from Ultrawebgrid
posted

I figured out how to do the auto postback doing an edit but I cannot get the DeleteRow process to work without requiring another rowselection.  I have added the code from the Samples:

function removeRow() {
var activeRow = igtbl_getGridById(_clientGridID).getActiveRow();
if (activeRow != null)
{
activeRow.deleteRow();
activeRow.endEditRow();
}
}

And then added the necessary items to my code-behind.  I initialize my UpdateRow event and then add the necessary code to update the database.  The problem is the event does not get fired until I select another row.  With the update all I had to do was call the activeRow.processUpdateRow() from javascript and it would fire immediately.  I read othe posts about this and the person talks about just using the UpdateRow process.  That means I will have to have a Delete mechanism in my RowEditTemplate which I don't want.  Either that or I am missing the one piece that will have that statement make sense.

 

What am I missing?

Parents
  • 280
    posted

    음...  I don't missing code ^^;

     but my source code show you.

     function SelectDeleteRow()
     {   
         igtbl_getGridById("UltraWebGrid1").AllowDelete=1;

         //set the activerow
         //Row variable would be the row number
         var row = igtbl_getActiveRow("UltraWebGrid1").Element.id;   // id 선택
         
         igtbl_setActiveRow("UltraWebGrid1",igtbl_getElementById(igtbl_getActiveRow("UltraWebGrid1").Element.id) );
         //also select the activerow in the grid
         igtbl_selectRow("UltraWebGrid1", row, true);
         //select row delete!
        igtbl_deleteSelRows("UltraWebGrid1");
     }
     
     
Reply Children