Print Page | Close Window

Problem using GetSelectedRows() after user keydown

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=5141
Printed Date: 24 November 2024 at 2:02am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem using GetSelectedRows() after user keydown
Posted By: nguyena1
Subject: Problem using GetSelectedRows() after user keydown
Date Posted: 25 September 2006 at 12:08pm
Hey all, has anyone had issues trying this? 

I'm trying to have the user be able to hit the delete button on a selected row and have the item go away.  The issue I'm having is using GetSelectedRows().

I'm handling the key down using NM_KEYDOWN and XTP_NM_REPORT_PREVIEWKEYDOWN.  After I call GetSelectedRows(), GetCount or GetFirstSelectedRowPosition, I get 0 when I DO have a item selected.

However, another case im handling is mouse clicks and selection changes using NM_CLICK and XTP_NM_REPORT_SELCHANGED.  In the handling of message for these, GetCount or GetFirstSel... work fine.

Is this because the keystrokes messages are sent before the reportcontrol sets up its CXTPReportSelectedRows?
And I assume the other 2(click and selchanged) are messages sent after?

I have also tried, GetFocusedRow, but this still returns a row even if I dont have a row selected. 

What is a solution that I can get the selected row after a user keydowns?  Help would be much appreciated.

Tony



Replies:
Posted By: nguyena1
Date Posted: 25 September 2006 at 12:11pm
FYI: I am using version 10.1


Posted By: nguyena1
Date Posted: 25 September 2006 at 5:43pm
Never mind!  Sorry, I found out that somewhere else in a timered update, the selected rows were being cleared, which is why i wasn't seeing them on key down.  



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net