Source language: Translate to:

Resize input fields with DBPro grid

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Resize input fields with DBPro grid

Postby ebear » Sun Jan 05, 2014 12:26 pm

Hello All,

I have above my DBPro grid (see images) for each column a search field after the user makes a search input in one or more input fields and presses "Enter"
a T-SQL script starts and returns the records found. This all is working fine.

Now when I have in the Grid properties "Allow Column resize" I like to have also the input fields resized in the same width as the grid columns.
Has anyone an Idea to do this in a smooth way?

Thanks a lot for your reactions.


Before resizing:

After resizing:

Image - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: Resize input fields with DBPro grid

Postby mishem » Sun Jan 05, 2014 1:20 pm


Posts: 581
Joined: Mon Oct 08, 2012 1:51 pm

Re: Resize input fields with DBPro grid

Postby Gaev » Sun Jan 05, 2014 1:35 pm


You can use dbpGetColumnWidths (and a bit of parsing of the returned values) to get the column widths of the desired fields.

However, there is no event trigger in response to a user making a column width adjustment ... so ...

- one option would be to run a Timer object that compares the two widths and makes the necessary adjustments to the input fields

- or give the user the ability to request the same ... either via a separate Button or (if you are not using it for other purposes) via a double click anywhere in the Grid
User avatar
Posts: 3757
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest