Eric
  • Eric
  • Member Topic Starter
2014-12-30T01:29:51Z
Hey Guys I am trying to make iGrid do a very specific thing and I just can't seem to achieve the result I am looking for. I have been playing around for a while and have had no luck. Maybe Someone can give some insight.

First Off, I have an unbound iGrid with records that I have populated from a SQl database. The Row Keys are set as the Record Id from the table, and the Column Keys are the field names from the table. The Column Tag is being set as a "0" or "1" indicating whether the field is string or numeric (for my sql updates later on)

What I would like to happen is this:
1) When you click on a cell it turns red and an ellipsis button appears in that cell (I have this part working already using the request edit event)
2) I would basically like to see the entire rest of the igrid disabled untill either a) the current cell is edited and the ellipsis is clicked to run my update statement,turn the cell green, and remove the ellipsis OR b) the escape button is pressed which will cancel the edit and re-enable the igrid, remove the ellipsis, and turn the cell color back to normal.


I have gotten bits and pieces of this to work but not exactly how I want/need it. What I am having trouble with is disabling and re-enabling column header clicks on the fly, and also identifying any other event(s) (along with the escape button press) that would cause the current cell to lose focus. I am looking for those events on which I could call my cancel sub which would essentially re-enable the igrid, turn any cells in edit mode back to normal and remove any ellipsis. I only want the new value to stay in the cell if the ellipses is clicked (therefore running my sql update).

I hope my intentions are clear. Any insight would be greatly appreciated!

Thanks,

Eric
Igor/10Tec
2014-12-30T16:37:14Z
Originally Posted by: Eric 

What I am having trouble with is disabling and re-enabling column header clicks on the fly



The ColHeaderClick event has the bDoDefault parameter passed by ref; it allows you to disable the column header click on the fly.


Originally Posted by: Eric 

identifying any other event(s) (along with the escape button press) that would cause the current cell to lose focus



I do not see the whole construction you use to edit cells in your grid (obviously, it is enough complicated), so it's hard to tell exactly what event you need. In any case, look at the QuitCustomEdit event that can greatly help you if you need to know the moment when an iGrid cell quits edit mode.
Eric
  • Eric
  • Member Topic Starter
2014-12-30T20:41:28Z
Thanks, I will certainly give that a try.