Jump to content

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


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 post
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 post
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 post
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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...