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
340
comand name null and DeleteButton_Click not get fired
posted

i am trying to take help from below code
i have 2 problems
1) although i have given command name of my delete  button (" delete ") in properties ( f4 )
but when i checked command name like this 
  if (e.InnerCommandEventArgs.CommandName == "delete")
{}
its not working  its null
2)  DeleteButton_Click event is  not being fired
althoug i have created event . its goes for post back but not fire click event
how to resolve these 2 issues
  1. protected void DeleteButton_Click(object sender, EventArgs e)
  2. {
  3.    var a = 5;
  4.    CellItem item = (sender as Control).Parent as CellItem;
  5.    UltraGridRow row = item.Cell.Row;
  6.    //delete row from datasource and rebind the grid...
  7. }
  8. protected void UltraWebGrid1_ItemCommand(object sender, UltraWebGridCommandEventArgs e)
  9. {
  10.     if (e.InnerCommandEventArgs.CommandName == "delete")
  11.     {
  12.         CellItem item = (e.CommandSource as Control).Parent as CellItem;
  13.         UltraGridRow row = item.Cell.Row;
  14.         //delete row from datasource and rebind the grid
  15.     }
  16. }

Parents Reply Children
No Data