Announcement

Collapse
No announcement yet.

Need Help to Delete Multiple Selected Grid?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need Help to Delete Multiple Selected Grid?

    Hi everyone christmas is coming advance merry christmas everyone..
    I am here again asking little help i how can i delete multiple selected grid at once?
    i can do delete each row but in multiple row at once i cannot make it.. any help from you guys.. thanks

  • #2
    Thanks everyone i got the solutions already...
    Keep safe guys covid is just in a corner...

    Comment


    • #3
      Bonjour telco,
      Merry christmas to you too.
      Can you share your solution or it's a monologue?

      Comment


      • #4
        Hi Alain Merry Christmas, what i did is, i will get the total numbers of a row in a grid, then create an empty table, then create a for loop to get all the Selected cell using Grid.IsSelection action.. if the cell returns True then i will put it in the table i created earlier, after the loop i will create another loop again to delete all the selected cells.

        I dont know if there is other simpler way to make it but that is i got in my mind..

        Hope it helps..

        Comment


        • #5
          Here is the script i have

          yRow = Grid.GetRowCount("Grid1");

          mytbl_delete = {}
          for i=1, yRow do
          tbCellState = Grid.IsCellSelected("Grid1", i, 1);
          if tbCellState then
          Table.Insert(mytbl_delete, 1, i);
          end
          end

          if Table.Count(mytbl_delete) > 1 then

          for k,v in pairs(mytbl_delete) do
          Grid.DeleteRow("Grid1", v, true);
          end

          end

          Comment

          Working...
          X
          😀
          🥰
          🤢
          😎
          😡
          👍
          👎