Hi all!
I'm currently prototyping a 'Telerik' version of a suite of tools I created for the administration of our application's database. It's ticking all the boxes as far as interactivity on the frontend goes and I want to show that it's a viable option for replacing some of our older vanilla ASP.NET 2.0 tools.
One of the tools in question allows a user to copy a list of values (in some instances GUIDs, others just simple integers) in to a textbox (1 value per line) and send that to the Datasource for filtering on. This is then displayed in a vanilla ASP.NET GridView.
For example, a user may fill in the filter box like this:
IDs
====
1156
785636
72889
...and the system will return entities with those IDs.
I run the contents of those various textboxes through a splitter and sanitizer (essentially a set of RegExs to ensure there's no errors or injection attempts) before submission, but the only way I've been able to get that list to the DB is by using a String.Replace on the SELECT code in the Datasource before it refreshes, which puts the list of values into an IN clause. I hate this because it feels like a hack and stops me using SPROCs for my Datasource, but it does work.
I've read in one Google result that a nice way of doing this is to somehow convert the Textbox contents into a CSV or XML file and submit it that way, but it doesn't seem to help with the overall complexity of the code and it doesn't make use of anything that Telerik provides over and above vanilla ASP.NET.
Does anybody know how I might go about doing this in a more 'proper' fashion using any functionality that Telerik provides? Am I best off trying to perform the same hack, or have any of you managed to make such a filter in a smoother way?
I'm currently prototyping a 'Telerik' version of a suite of tools I created for the administration of our application's database. It's ticking all the boxes as far as interactivity on the frontend goes and I want to show that it's a viable option for replacing some of our older vanilla ASP.NET 2.0 tools.
One of the tools in question allows a user to copy a list of values (in some instances GUIDs, others just simple integers) in to a textbox (1 value per line) and send that to the Datasource for filtering on. This is then displayed in a vanilla ASP.NET GridView.
For example, a user may fill in the filter box like this:
IDs
====
1156
785636
72889
...and the system will return entities with those IDs.
I run the contents of those various textboxes through a splitter and sanitizer (essentially a set of RegExs to ensure there's no errors or injection attempts) before submission, but the only way I've been able to get that list to the DB is by using a String.Replace on the SELECT code in the Datasource before it refreshes, which puts the list of values into an IN clause. I hate this because it feels like a hack and stops me using SPROCs for my Datasource, but it does work.
I've read in one Google result that a nice way of doing this is to somehow convert the Textbox contents into a CSV or XML file and submit it that way, but it doesn't seem to help with the overall complexity of the code and it doesn't make use of anything that Telerik provides over and above vanilla ASP.NET.
Does anybody know how I might go about doing this in a more 'proper' fashion using any functionality that Telerik provides? Am I best off trying to perform the same hack, or have any of you managed to make such a filter in a smoother way?