Jump to content

Grouped DBGrid DblClick event - how to determine that double Click was made on group or on data row?


Nadya

Recommended Posts

Hi!

I have a TUniDBGrid control with Grouping.enabled = True and Grouping.Collapsible = False.

I need to make some actions with record user double clicked on, but I need to do this only with "data" records, not with groups.

How can I do this?

Thanks in advance for help!

Link to comment
Share on other sites

40 minutes ago, Nadya said:

I need to make some actions with record user double clicked on, but I need to do this only with "data" records, not with groups.

Hi,

Which event are you using at the moment?

Link to comment
Share on other sites

+ 1

procedure TFMENU.UniDBTreeGrid1CellClick(Column: TUniDBGridColumn);
var
 W_PGMCODE:string;
begin
    W_PGMCODE     := Trim(tablex.FieldByName('PGMCODE').Asstring) ;
 end;
 

This is the way I use to get the data from the UniDBTreeGrid,  but it returns values with the groups

Link to comment
Share on other sites

14 hours ago, Sherzod said:

Which event are you using at the moment?

I use then OnDblClick event of DBGrid. It contains rows grouped by category. So I need user to select data rows and ignore selecting "category"

 

Link to comment
Share on other sites

48 minutes ago, Nadya said:

I use then OnDblClick event of DBGrid. It contains rows grouped by category. So I need user to select data rows and ignore selecting "category"

Can you please make a simple testcase!?

Link to comment
Share on other sites

1 hour ago, Sherzod said:

Can you please make a simple testcase!?

Sherzod, I'm sorry I can't. I'm very confused but it's kind of mistery happened. :blink2:

Yesterday my grid accepted dblClicks on group row, but today it ignores them.

Yesterday I'd made many changes to grid properties: groups managent, sorting etc. And it seems like I solved my problem but I don't know how exactly.

It was not a hallucination, asapltda's message approves it :unsure2:

I've tried to reproduce it but failed. If I will catch this again I'll update this post

Sorry

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...