Telerik Radgrid filter encrypted database column

2 posts, 0 answers
  1. Jon
    Jon avatar
    12 posts
    Member since:
    Jul 2010

    Posted 15 Nov 2012 Link to this post

    I have a database table containing multiple columns and one column (AppliedName) is encrypted. On my page I have a radgrid which on databound I run a decrypt method so the actual text value shows up in the radgrid instead of the encrypted value. However, when I try to filter that column using "contains" filter function it wants to compare the filter text to the encrypted values in the databse... not the text displayed in the radgrid.  I can see why it would do this, but what I would like to do is decrypt the value before comparing the filter text I've entered into the filter text box to the values in the grid.  This way I can use the "contains" method.  I could probably first encrypt the filter text, but then I don't think I would be able to use contains...

    Is there a way to do this, or is there a way I can do a client side filter that compares the filter text to the actual text that appears in the radgrid... not the database?

    Any help is greatly appreciated!


  2. Daniel
    Daniel avatar
    4949 posts

    Posted 20 Nov 2012 Link to this post

    Hello Jon,

    A possible approach would be to use a temporary datasource which contains the decrypted data. This way all the grid functions like filtering and sorting will be working properly.
    Depending on your scenario, you could use a generic collection of objects or just a simple DataTable.

    Best regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top