Jump to content


Photo

NxButtonColumn work example


  • Please log in to reply
22 replies to this topic

#1 leonidus

leonidus
  • Members
  • 29 posts

Posted 03 February 2013 - 09:59 PM

Hello.

Can you show demo how to use this column type? I can`t find it in the help.

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 04 February 2013 - 05:12 PM

Hello,

All you need is to set OnButtonclick event and then decide what you will do after click.

MyColumn.Editor.AsString := 'somestring';

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 leonidus

leonidus
  • Members
  • 29 posts

Posted 04 February 2013 - 05:31 PM

So, I do follow

for i:=1 to 20 do
begin
NextGrid1.AddRow();
NextGrid1.Cell[1,NextGrid1.RowCount-1].AsString:=inttostr(i);
NextGrid1.Cell[9,NextGrid1.RowCount-1].AsString:='button'+inttostr(i);
end;

9th column is NxButtonColumn1.

In result I see only simple text in each line, not button...

And one more queston. I can set only one event OnButtonclick for all rows. How can I understand what button was click?

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 04 February 2013 - 05:37 PM

Hello,

This column act like text column, with attached button on right side when cell is editing (check TNxButtonEdit control).

For your needs, you probably need something like link column. Simply place some text it cell, and then inside OnCellClick detect on which cell user have clicked.

If you want, you may draw own button:
http://dn.bergsoft.n...in-nextgrid.htm
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 leonidus

leonidus
  • Members
  • 29 posts

Posted 04 February 2013 - 06:22 PM

Boki, text column with attach button on right side - this I searching! But why I can`t see this button and see only text? And what about TNxButtonEdit ? What is it?

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 05 February 2013 - 12:06 PM

Hi,

This button is only shown when you start editing (setting coEditing in Options property of Column).

TNxButtonEdit is a editor used for this column.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#7 leonidus

leonidus
  • Members
  • 29 posts

Posted 05 February 2013 - 04:11 PM

Ok. Please look to screenshots:

Settings in Object Inspector
http://files.mail.ru...64D5E79954F?t=1

NextGrid in my program
http://files.mail.ru...98516648CC4?t=1

I select cell but can`t edit it and can`t see a button...

#8 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 05 February 2013 - 11:53 PM

Hi,

It should work. Do you maybe have set ReadOnly or Enabled to False?

If you want, you may send me dfm of this form to I check it.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#9 leonidus

leonidus
  • Members
  • 29 posts

Posted 06 February 2013 - 09:25 AM

Please see archive http://depositfiles....files/fxmwk0w1n

#10 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 06 February 2013 - 04:15 PM

Can't figure what is wrong. Your demo don't work, but when I try mine all work fine. I will need to go one by one property to see where is difference.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#11 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 06 February 2013 - 04:21 PM

Update: I am able to click on column and edit. All work fine (I was clicking on wrong column).

Can you please tell me which version you are using?
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#12 leonidus

leonidus
  • Members
  • 29 posts

Posted 06 February 2013 - 04:52 PM

I have version 5.6.

Can you see screenshot with editing column?

#13 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 06 February 2013 - 05:47 PM

Hello,

Maybe you are, like I, click on wrong column? There is a one more column at the right side of grid (you will need to scroll). It have no Caption set.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#14 leonidus

leonidus
  • Members
  • 29 posts

Posted 06 February 2013 - 11:05 PM

Ou yes!!! Boki thank you!!

But :) I set OnButtonclick to procedure NxButtonColumn1Buttonclick. But how can I understand in the NxButtonColumn1Buttonclick number of clicked row?

#15 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 07 February 2013 - 12:18 AM

Hi,

You may read SelectedRow property.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#16 leonidus

leonidus
  • Members
  • 29 posts

Posted 08 February 2013 - 05:08 PM

And more one question )

How can I do follow. I need showing in cells (in column of NxButtonColumn type) some information and user can`t change this information but can click on the button? Is it possible?

#17 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 08 February 2013 - 06:05 PM

Hello,

You may include epDisableTyping in EditOptions property of Column
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#18 leonidus

leonidus
  • Members
  • 29 posts

Posted 11 February 2013 - 12:16 AM

Thanks!!

#19 leonidus

leonidus
  • Members
  • 29 posts

Posted 24 February 2013 - 08:07 PM

Boki, hello.

So, now I see button in NxButtonColumn and this is very good! I need showing in cells (in column of NxButtonColumn type) some information and user can`t change this information but can click on the button. epDisableTyping=True and user can`t enter in the cell but cursor is blink! Can disable it?

#20 leonidus

leonidus
  • Members
  • 29 posts

Posted 26 February 2013 - 02:23 PM

Boki, please help!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users