Solved TD-21531: Grid: SAM_SetFocus behavior

Report TD 5.x and 6.x bugs and possible workarounds.
aeintveld
Netherlands
Posts: 65
Joined: 22 Mar 2017, 16:03
Location: The Netherlands

TD-21531: Grid: SAM_SetFocus behavior

Post by aeintveld » 27 Nov 2014, 00:33

Hi all,

I have found another strange Grid behavior. This time in SAM_SetFocus:
- Although it is an undocumented feature, lParam in SAM_SetFocus in a Grid column no longer contains the current row.
- When a column in the grid you click on is en- or disabled, SalTblQueryContext will return the row that has lost the focus rather than the one getting the focus.

I could be that the wrong value returned by SalTblQueryContext is reflected by the extra SAM_RowSetContext.

I provided a testapp:
- in both child table as grid clicking on the top row will disable the second column, clicking in another row will enabled it.
- In the child table in SAM_SetFocus both SalTblQueryContext as lParam return the correct row.
- In the grid lParam is always zero, and when the column is en or disabled the wrong row is returned by SalTblQueryContext
- this is a regression in TD62.? (TD5.2 en TD6.1 still have the wrong value for lParam but the SalTblQueryContext is correct)

Any chance there will be a SP where all the Grid issues are addressed and a proper test is done?

We have postponed our release with Grid iso Child Tables over and over. Going back to child tables is not an option....

Kind regards,

Alexander in 't Veld
You do not have the required permissions to view the files attached to this post.
Last edited by Anonymous on 18 Dec 2014, 21:39, edited 1 time in total.

Jan Bouma
Netherlands
Posts: 24
Joined: 21 Mar 2017, 14:04
Location: The Netherlands

Re: TD-21531: Grid: SAM_SetFocus behavior

Post by Jan Bouma » 15 Dec 2014, 09:33

We depend heavily on SalTblQueryContext.
It is a must that this functions is working correctly
we also use SAM_SetFocus and the lParam

Mike Vandine

Re: TD-21531: Grid: SAM_SetFocus behavior

Post by Mike Vandine » 05 Jan 2015, 07:46

Hi Alexander,

I've seen some issues that were already brought up to Development on these differences.

Basically, we depend on ProfUI to handle the messaging. This software fills the lparam for a table but doesn't do so for a grid. There really isn't anything that we can do to override this setting.

Sorry!

Best regards,

aeintveld
Netherlands
Posts: 65
Joined: 22 Mar 2017, 16:03
Location: The Netherlands

Re: TD-21531: Grid: SAM_SetFocus behavior

Post by aeintveld » 06 Jan 2015, 14:18

So lParam won't be filled, but SalTblQueryContext should return the correct row!

So please log a defect for this.

Kind regards,

Alexander

Mike Vandine

Re: TD-21531: Grid: SAM_SetFocus behavior

Post by Mike Vandine » 13 Jan 2015, 06:48

Hi Alexander,

When I tested this, clicking into the Value column for each row, whether it be the grid or the table returned the row number of the grid or table, but it looks to be zero-based. For example, when I clicked on the 1 in the top table, what was returned was a 0. Clicking on the 3 value showed 2. This was consistent for both table and grid. The only difference was the lparam value.

Best regards,

aeintveld
Netherlands
Posts: 65
Joined: 22 Mar 2017, 16:03
Location: The Netherlands

Re: TD-21531: Grid: SAM_SetFocus behavior

Post by aeintveld » 13 Jan 2015, 09:54

Hi Mike,

The problem is a little less straightforward.
To see the problem you need to click on the column that is en- or disabled.
So in the sample:
Click on the first row in column 'text' (column is disabled in SAM_Click) and then in the second row in column Value: SalTblQueryContext returns row 0
Click on the second row in column 'text' (column is enabled in SAM_Click) and then in the first row in column Value: SalTblQueryContext returns row 1

Hope this clarifies the issue!

Kind regards,

Alexander

Mike Vandine

Re: TD-21531: Grid: SAM_SetFocus behavior

Post by Mike Vandine » 14 Jan 2015, 03:48

Hi Alexander,

Thanks for the clarification on how to reproduce this.

Yes, I can see that:

Table: Test as you describe - 1,1 then 0,0
Grid: Test as you describe - 0,0 then 1,0

Interestingly, if in a grid you then click on the second column value, it shows correctly 1,0 and clicking on the first now shows correctly 0,0. So it looks like it's only the first time, then seems to recover. I will log a defect.

Best regards,

Mike

Mike Vandine

Re: TD-21531: Grid: SAM_SetFocus behavior

Post by Mike Vandine » 14 Jan 2015, 05:55

Hi Alexander,

I have created defect TD-21531 for this issue.

Best regards,

aeintveld
Netherlands
Posts: 65
Joined: 22 Mar 2017, 16:03
Location: The Netherlands

Re: TD-21531: Grid: SAM_SetFocus behavior

Post by aeintveld » 23 Jun 2015, 08:26

Hi all,

Tested this in TD62SP4 and it works as expected now.
Good news is that lParam in SAM_SetFocus in a Grid column now contains the current row!
So ProfUI does handle this correctly after all :)
Maybe make this a documented feature?

Regard,

Alexander

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 4 guests