Deana Goeken Posted March 3, 2021 Share Posted March 3, 2021 I have a javascipt datagrid on a maintain form with a left click event. If the user clicks the scroll, the OnLClicked event is triggered. Is there a way to tell the code to ignore the OnLClicked event if the use does not specifically choose a specific cell Link to comment Share on other sites More sharing options...
Mark Derwin 2 Posted March 4, 2021 Share Posted March 4, 2021 We should be able to check the grid column and if its not inside the grid, disregard to click. Please open a case and I will research. Mark Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted March 4, 2021 Share Posted March 4, 2021 Welcome Mark I am glad to see you are out there!!! Link to comment Share on other sites More sharing options...
Deana Goeken Posted March 4, 2021 Author Share Posted March 4, 2021 Welcome Mark, Thank you for your response. I also thought that the column and row would be undefined or less than 0 or something that I would allow me to distinguish between a click on the scroll bar and a click within a specific cell. However, the value for the current column and row are always the column and row number for the current row. I verified this using alert('col: + col + row: + row); as the first statement in the OnLClicked event. I primarily use the left click event to highlight the selected row. In this case, the js just highlights the row again, so it does not create a problem. Occasionally, the user needs to select one or more records, so I have a Select column that gets populated when the grid is clicked. This is when the problem occurs. If the user need to scroll (either up/down or left/right, the Select column is populated. I found this when I was trying to delete selected records. I was trying to delete some records on the bottom of the list and my first record in the table was also delete. Per your request, I will open a case. Thank you, Deana Link to comment Share on other sites More sharing options...
Deana Goeken Posted March 8, 2021 Author Share Posted March 8, 2021 This appears to be a dev studio version issue. Mark shared 2 examples. The first used the left click button on a js grid. In Marks environment, clicking on the scroll bar did not trigger the onLeftClicked event. When I ran this code in my development environment, it did trigger the event. The second example used an HTML table. When I tried to compile this example, I received the following error "Error [FOC03610] in testdatagrids/gridclick2.WINFORMS at or near line 38: LAYERNAME is not a field in (or member of) type IWCCONTROLHTMLTABLE." The work around I implement was to use the OnRightClicked event to populate the Select column in my js grid. Deana Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now