Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 27 Apr 2024, 21:07

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: 24 Jan 2014, 15:38 
Offline

Joined: 14 Oct 2013, 08:27
Posts: 32
I use the grid with the filtering combo boxes enabled (see picture) and my users have got used to them very quickly, but some of them are getting filtering errors.
The problem occurs when they want to filter a text column: they start typing the text they want to apply to the filter, the grid shows the name that matches the initial pattern (in blue in the picture) and the user happyly presses Enter. Then they get an Exception saying "Unexpected AND or OR" (English translation is mine).
The problem is that they do not enclose the text with quotes (when I tell them to do so filtering is OK) but... they are users and they do not know anything about SQL sintax. Besides they prefer to type rather than to select the filtering criteria from the combo box.

Is there something that can be done in order to allow the grid to filter text columns without enclosing the filtering text with quotes?

Thank you very much for your help.

P.S. I forgot to mention the DataSource is a MemTableEh and filtering is set to local:
Code:
 
  SortInView= true;  // automatic sorting
  Grid->SortLocal= true;
  Grid->STFilter->Local= true;
  Grid->STFilter->Visible= true;
  Grid->STFilter->Location= stflUnderTitleFilterEh; // stflInTitleFilterEh;


Attachments:
Grid2.png
Grid2.png [ 124.01 KiB | Viewed 4995 times ]
Top
 Profile  
 
PostPosted: 14 Feb 2014, 07:41 
Offline

Joined: 14 Oct 2013, 08:27
Posts: 32
Hello,

Isn't there anything I could do in order to solve this? Or is it something I am doing wrong and does not happen to anyone else?
Do I need to provide more information?

Thank you very much in advance.


Top
 Profile  
 
PostPosted: 26 Feb 2014, 23:51 
Offline

Joined: 09 Feb 2012, 17:05
Posts: 124
Hi Bigun,

This error is caused by the comma in your filter
Some reserved SQL words can't be used as is like "in" "or" "and" "," "like" ... in the filter

I don't know if Dmitry can do something for that, but I can ask him


Top
 Profile  
 
PostPosted: 27 Feb 2014, 07:48 
Offline

Joined: 14 Oct 2013, 08:27
Posts: 32
Thank you for your answer Rico. That explains why it doesn't happen everytime, only with certain values.
I was asking myself if the grid could automatically treat the filtering of text columns the way it already does when the filtering text is selected from the drop down list.

By the way, I didn't realize about filtering text with reserved words (in, like...).
Thanks again for your answer.

Bigun


Top
 Profile  
 
PostPosted: 27 Feb 2014, 12:17 
Offline

Joined: 09 Feb 2012, 17:05
Posts: 124
Hi Bigun,

Dmitry will take this problem in consideration, I sent him an example to reproduce this error

Have you try to add the search panel to your grids ? it should be more easy to use for your customers (to search and filter data's grid) and there are no problem of SQL reserved words
(you must have ehlib 6.x version to have the search panel)


Top
 Profile  
 
PostPosted: 28 Feb 2014, 08:07 
Offline

Joined: 14 Oct 2013, 08:27
Posts: 32
Hello Rico.

I'm not sure what you mean with adding a search panel to my grid. Do you mean to put it in the upper side of the grid or to add an external filter panel?

Would you mind to publish an example screenshot? (if you have one).

Thanks a lot.

Bigun.


Top
 Profile  
 
PostPosted: 28 Feb 2014, 09:23 
Offline

Joined: 09 Feb 2012, 17:05
Posts: 124
Hi Bigun,

The search panel is a new feature available in ehlib6.x
it can be add at top or at bottom of the grid (just set a property)

You can see screeshot here : http://www.ehlib.com/en/screenshots


Top
 Profile  
 
PostPosted: 03 Mar 2014, 08:19 
Offline

Joined: 14 Oct 2013, 08:27
Posts: 32
Hi Rico.
Sorry the misunderstandign. Actually I do use the search panel, located in the bottom left corener of the grid (see the picture I sent). But users tend to use the filtering drop down boxes.
Filtering by column is a very nice and powerful feature and search panel's funtionality is not the same, they are complementary.

Thanks again Rico.


Top
 Profile  
 
PostPosted: 06 Mar 2014, 12:24 
Offline

Joined: 09 Feb 2012, 17:05
Posts: 124
Hi Bigun,

I see now that you use search panel, but I have one question : Why you don't use the Navigator buttons in the extraPanel of the HorzScrollBar ?
Your customers don't like it (too small ?)


Rico


Top
 Profile  
 
PostPosted: 07 Mar 2014, 08:17 
Offline

Joined: 14 Oct 2013, 08:27
Posts: 32
I find it easier to navigate using the keyboard (next page, ctrl+End...) so I leave only the important buttons, the ones needed for searching and filtering. Too many buttons make the form more complicated to use.

Bigun


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 72 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group