I am working on using the RadFilter as a type of SQL expression builder for my application. The existing RadFilter functionality gets me most of the way there and I am attempting to fill in the last bits I need which are :
I know these are not really doable with the current RadFilter, but here is my theory:
So, my first question is, does this seem possible with the current RadFilter infrastructure? In particular I am concerned about item 2 above. I am currently working on item 2 and it seems that the editor is initialized prior to the handling of the combo box index change event.
I would also need to make sure the system is able to appropriately handle friendly display to the screen as well as saving and loading the expression.
Thanks.
Tom
- The ability to compare a field to another field (e.g. FieldA >= FieldB)
- The ability to compare date fields to dynamic values (e.g. DateFieldA >= Previous X days)
- The ability to compare a field to a user supplied value at runtime (e.g. FieldA = prompt input)
I know these are not really doable with the current RadFilter, but here is my theory:
- Customize each editor type (datetime, text, numeric and boolean) to include a control that would prompt for the type of comparison whether it is against a fixed value, database field, special date option or a prompt. Mockup image (also attached)
- Wire an AJAX postback on the previous control that would reinitialize the editor with the appropriate supplemental controls. For example, if a datetime field using value comparison, show the datetime pickers. If a field to field comparison, show a combox box of other datetime fields. If a special comparison show a combo box of presets (current month, previous month, etc.). If a user prompt a simple text box for the prompt text.
- Output the values of each custom option in a specific format recognizable on the backend. For example, field to field comparisons could write to the resulting expression as FieldA >= '[Field].[FieldB]', or specials as DateFieldA >= '[Special].[PreviousX]', or prompt as FieldA = '[Prompt].[Inputted prompt text]'.
- Parse the resulting SQL after running through the standard provider for each of these options and handle reformatting the expression through my own secondary SQL provider.
So, my first question is, does this seem possible with the current RadFilter infrastructure? In particular I am concerned about item 2 above. I am currently working on item 2 and it seems that the editor is initialized prior to the handling of the combo box index change event.
I would also need to make sure the system is able to appropriately handle friendly display to the screen as well as saving and loading the expression.
Thanks.
Tom