I am looking to use the filter control as a tool to let my clients easily generate there own SQL where conditions. Please realize though that I am using this control alone and do not have/want it tied to a grid or any other control. However I have some conditions that at the moment doesn't seem to work to well with the control.
1) I already store in a SQL table all the Fields and Operators a client can select upon. However the radFilter does not appear to let you define the operators for a specific field on the server side. So for example I would be adding all my fields on PageLoad or PreInit and maybe I don't want a specific field like "Last Name" to have "IsNull" as a filter option but another field may allow it.
* Doing this only in the client side like all suggestions seem to direct you is really a hack and leads to unclean code especially when your not blanket-ally removing an operator across all fields.
2) I would like to make my own field but am wondering if the filter control can handle it. Say for example someone wanted to query for "Transaction Amount" > 100 and "Transaction Date" between 1/1/2012 and 3/3/2012. To handle this properly you would have to make a unique operator(s) that would let you set the fields shown. You may also want to do something like "Transaction Amount" between 100 and 1000 and "Transaction Date" between 1/1/2012 and 3/3/2012. Then there would be possibility of 4 values and 2 operator conditions.
* Please realize that what I am saying is different then 2 different filter items. Because I am specifically saying i want to find people with a transaction amount greater then 100 between the specific dates. If you used what the Sqlprovider gives you actually end up with people who have some transaction > 100 unrelated to the provided supplied date range. I realize that this requires parsing on my part and wouldn't rely on the SqlProvider for anything.
3) There appears to be no built in method to get a simple representation of the filters other then radFilter.RootGroup.Expressions but you have to parse all the fields out yourself?
* Has telerik given any thought to a XmlProvider so that you can get a representation of the filter fields, operators, and values as XML? This would allow others to take that XML and interpret it how they choose.
4) Similar to number 3 the Save/Load functionality should support an xml string versus base64 encoded string. This would allow you to interpret the xml how you choose and possibly review created selects directly in sql.
1) I already store in a SQL table all the Fields and Operators a client can select upon. However the radFilter does not appear to let you define the operators for a specific field on the server side. So for example I would be adding all my fields on PageLoad or PreInit and maybe I don't want a specific field like "Last Name" to have "IsNull" as a filter option but another field may allow it.
* Doing this only in the client side like all suggestions seem to direct you is really a hack and leads to unclean code especially when your not blanket-ally removing an operator across all fields.
2) I would like to make my own field but am wondering if the filter control can handle it. Say for example someone wanted to query for "Transaction Amount" > 100 and "Transaction Date" between 1/1/2012 and 3/3/2012. To handle this properly you would have to make a unique operator(s) that would let you set the fields shown. You may also want to do something like "Transaction Amount" between 100 and 1000 and "Transaction Date" between 1/1/2012 and 3/3/2012. Then there would be possibility of 4 values and 2 operator conditions.
* Please realize that what I am saying is different then 2 different filter items. Because I am specifically saying i want to find people with a transaction amount greater then 100 between the specific dates. If you used what the Sqlprovider gives you actually end up with people who have some transaction > 100 unrelated to the provided supplied date range. I realize that this requires parsing on my part and wouldn't rely on the SqlProvider for anything.
3) There appears to be no built in method to get a simple representation of the filters other then radFilter.RootGroup.Expressions but you have to parse all the fields out yourself?
* Has telerik given any thought to a XmlProvider so that you can get a representation of the filter fields, operators, and values as XML? This would allow others to take that XML and interpret it how they choose.
4) Similar to number 3 the Save/Load functionality should support an xml string versus base64 encoded string. This would allow you to interpret the xml how you choose and possibly review created selects directly in sql.