david_navigator Posted June 14, 2018 Share Posted June 14, 2018 I need to find out which string grid cell the user clicked in. With the VCL there's the MouseToCell method which can be used with the Grid OnMouseDown event, but that doesn't exists for the UniStringGrid. I tried adding an ExtEvent for cellmousedown, hoping that would give me the correct info function cellmousedown(sender, td, cellIndex, record, tr, rowIndex, e, eOpts) { ajaxRequest(sender, '_cellmousedown', ['CellIndex='+cellIndex,'RowIndex='+rowIndex]); } But the OnAjaxEvent doesn't get called with that EventName.So how can I find out which cell the user just clicked in (The OnSelectCell is no use for me as I want to count the number of clicks in a cell and OnSelectCell only gets called when the cell changes). Thanks David Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 14, 2018 Share Posted June 14, 2018 ajaxRequest(sender, '_cellmousedown', ['CellIndex='+cellIndex,'RowIndex='+rowIndex]); ajaxRequest(this, '_cellmousedown', ['CellIndex='+cellIndex,'RowIndex='+rowIndex]); Quote Link to comment Share on other sites More sharing options...
david_navigator Posted June 14, 2018 Author Share Posted June 14, 2018 Many thanks. Obviously I have a lot to learn about javaScript What's the difference between "this" & "sender" ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.