Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Publish Filter Expression in FilterDialog

 Post Reply Post Reply
Author
Francisco A Alvarado View Drop Down
New Member
New Member
Avatar

Joined: 02 May 2015
Posts: 38
Post Options Post Options   Quote Francisco A Alvarado Quote  Post ReplyReply Direct Link To This Post Topic: Publish Filter Expression in FilterDialog
    Posted: 15 May 2015 at 11:52pm
I'm using custom sorting in DBAdvGrids. A query must concatenate three elements:
"SELECT * FROM DBTable" following by a filter condition "WHERE xColumn = 'ABC' " and a order clause "ORDER BY yColumn"
The second element is now obtained from Scalabium's SMDBFilterDialog component. It has a property -Expression- that contains the filter built in the dialog. So the task is easy: SELECT * FROM DBTable ' + ' WHERE ' + SMDBFilterDialog1.Expression + OrderClause.
The Order Clause is from OnCanSort event from the DBAdvGrids1.
I hope I explained the usefulness of publishing Filter Expression in your component.
Best Regards
Francisco Alvarado
  
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 7925
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2015 at 8:03pm
The event DBAdvGrid.OnSetQueryOrder is triggered that passed this expression as event parameter.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down