Source language: Translate to:

NeoBookDBPro - dbpSetGridProperties - On Double Click

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

NeoBookDBPro - dbpSetGridProperties - On Double Click

Postby Skarabäus » Sun Feb 03, 2008 4:24 am

Dear neobokers,
dear Gaev,

under following topic:

http://www.neosoftware.com/forum/viewtopic.php?t=15778

you have given us a very good code solution double clicking on the grid presented in a rectangle.

I tested this in a pub sample with some users. Some of them didn't realised that they must click twice (double click) on the selected record.

Is there a way to refine your offered code solution for this?

Many thanks,

Skarabäus
Skarabäus
User avatar
Skarabäus
 
Posts: 37
Joined: Mon May 15, 2006 4:31 am
Location: Germany, Ostfildern

Postby Gaev » Sun Feb 03, 2008 6:05 am

Skarabäus:
Is there a way to refine your offered code solution for this?
The post contains two (alternate) suggestions ... for two different requirements ... I don't know which one you want to use ... perhaps you can define your own situation and requirements in detail ...

- database Table Fields being displayed
- is the displayed Table ReadOnly or Updatable
- what do you want to happen when a user (single) clicks in a cell (i.e. row x and column y)
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Skarabäus » Sun Feb 03, 2008 6:43 am

Gaev:

Following situation:
1.
I have a .mdb database with different fields (Name, Street, Post code, ...)
2.
I have a rectangle.
In this rectangle i only show the grid with the field "Name"
3.
Around the rectangle i placed disabled text fields where the other fields of database are shown.
4.
Beside the rectangle (grid) i placed the typical navigation buttons (next record, previous record, ...)

I had stated the following now.
If I clicked on a name within the Grids, the details did not change in the text fields.
These changed only about the navigation buttons.

I know that people will click also on the Grid and, if they notice that it does not work, they are confused.
So I have searched after a solution and found these under the "pick list" Topic where you gave a solution code for this.
With a double-click on the grid i can actualize my text fields around of the current data set shown on the Grid.

But i also have stated, that people usually click only once on the selected data row in the grid and wait what happens. So they do not immediately double-click on it.

Now i ask, if there is a solution to click on the grid only once?
Skarabäus
User avatar
Skarabäus
 
Posts: 37
Joined: Mon May 15, 2006 4:31 am
Location: Germany, Ostfildern

Postby Gaev » Sun Feb 03, 2008 7:17 am

Skarabäus:
3. Around the rectangle i placed disabled text fields where the other fields of database are shown.
What do you mean by "disabled text fields" ... is this a TextBox with content like [databseID.TableName.Street] etc. ?
With a double-click on the grid i can actualize my text fields around of the current data set shown on the Grid.
What do you mean by "actualize my text fields" ... update their content to match the record currently selected in the grid ?

Due to language barrier, it is best to use NeoBook terms ... and post NeoBook commands ... when describing your environment.
Now i ask, if there is a solution to click on the grid only once?
a) In your dbpOpenTable command you can request to have a named subroutine be invoked whenever the record in the Table is updated or the current record changes ... from the Help file ...
Code: Select all
Syntax: dbpOpenTable "database id" "table" "subroutine"

database id - The name assigned to the database containing the table you want to open.

table - The name of the table you wish to open.

subroutine - The name of a subroutine from your publication's Subroutine Action. The subroutine specified here will be automatically executed whenever the table is updated or the current record number changes. This can be useful if you want to activity to take place whenever the reader displays a different record. Subroutines are entered from the Actions page of NeoBook's Book Properties screen.
... so this subroutine could be used to refresh the data in the the other boxes.

b) If you database Table is not too big (like multiple thousand records) ... Why use the Grid as a navigation tool ... a ListBox (better than a ComboBox) will give you the same result ... you load its contents using the afore mentioned ...

dbpFieldToVar "database id" "table" "field" "variable" "properties"

... command ... and use the Slection Changed section of the ListBox to refresh the data in the other boxes.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby phenix37 » Sun Feb 03, 2008 7:20 am

Skarabäus


I do not see well what you mean.
I propose that we look at this publication.
It is a program with the Belgian postal codes.
http://tavier.free.fr/serveur/neobook/codepost.zip
On page 2, there is a rectangle with the name of Citys and outside of it in the fields of the database.

Maybe this will help.
phenix37
 
Posts: 107
Joined: Thu Apr 20, 2006 6:31 pm

Postby Skarabäus » Sun Feb 03, 2008 7:42 am

Gaev:
Geo:

I found following solution with the grid:

Book properties/Subroutines

:OnDoubleClick=subroutine
dbpFieldToVar "AddrBook" "firmen" "NAME" "[myCurrentValues]" "Delimiter=,;SkipBlanks=Yes;NoDuplicates=Yes"

Thank you Gaev,
and thank you Geo for the sample pub.

Skarabäus
Skarabäus
User avatar
Skarabäus
 
Posts: 37
Joined: Mon May 15, 2006 4:31 am
Location: Germany, Ostfildern


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 3 guests