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
Clicking on Delete Button under UltrWinGrid Control

Hi All,

   We have an Windows based application developed in .Net Infragistics7.3.
In this application I am facing the following problem:

I need to delete the rows eaither by clicking on delete button for each row OR I can select the
requried row and press delete key.

 I am trying with the following code's:

But Rows are getting deleted only from the memory when we close the application and re-launch the rows
Rows are not deleted

Method1: Using ultraWinGird methods and properties:
Code 1:
 SwfWindow("xyz").SwfTable("Grid").ActivateCell "0","UCButtonDelete"
SwfWindow("xyz").SwfTable("Grid").SelectCell "0","UCButtonDelete"
SwfWindow("xyz").SwfTable("Grid").DblClick x,y,micLeftBtn
SwfWindow("xyz").SwfTable("Grid").ClickCellButton "0","UCButtonDelete"

Method 2: By send the delete keys
Code 1:
With this method it is just selecting the row but not deleting the row
    set WshShell = CreateObject("WScript.Shell") 
   WshShell.SendKeys "DEL"    
Code 2:
 wait 1
Set dr = CreateObject("Mercury.DeviceReplay")
del = "127"
dr.Presskey  del

Give us some suggestions , Thanks in Advice

No Data
  • 7695
    Offline posted

         By the looks of it, each method that you tried is deleting the rows, and should work, and it sounds like it is, for the grid, but not for your datasource behind the grid.  What you need to talk to your developer and determine what the trigger is that causes your grid to send it's updates to your datasource. It may be that you just need to activate the next row, perhaps it only happens on a specific button click, or when the window closes a specific way.    Unfortunately, until we know what the trigger is that causes the update, we are only grasping at straws. When you perform the task manually, do the rows stay deleted? What exact steps do you perform that cause it? If you do all your actions with the mouse and it works, does it also work if you do them all with the keyboard? Likely either it doesn't work when you do it manually or the trigger that causes the update is being missed during replay.

No Data