Callbacks

2 posts, 0 answers
  1. Jason
    Jason avatar
    1 posts
    Member since:
    Jun 2011

    Posted 15 Jun 2011 Link to this post

    Hi,

    I have the following code, It encrypts the text into my access database but when I reopen the application I get encrypted text on the scheduler (it doesnt decrypt). Is there anything I am missing?
     
    var summarySchedulerMapping = appointmentMappingInfo.FindBySchedulerProperty("Summary");
    summarySchedulerMapping.ConvertToScheduler = new ConvertCallback(ConvertSummaryToScheduler);
    summarySchedulerMapping.ConvertToDataSource = new ConvertCallback(ConvertSummaryToDataSource);

    private object ConvertSummaryToScheduler(object item)
    {
         return Encryption.Decrypt((string)item);
    }

    private object ConvertSummaryToDataSource(object item)
    {
         return (object)Encryption.Encrypt((string)item);
    }


    Cheers
  2. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 20 Jun 2011 Link to this post

    Hi Jason,

    I could not identify any problems with the code you are using. On my end both methods are called properly. The problem might be in the encryption/decryption methods. Have you tried setting breakpoints and debugging the Convert methods? You can check the input parameters' value as well as the values returned by the Encrypt/Decrypt methods. This might help you identify the problem.

    If you think the problem is on our side, then I suggest you to open a new support ticket and send us a sample project which reproduces the issue. This will let us investigate this case in detail and provide you with an appropriate answer.

    Hope this helps. Feel free to ask if you have any further questions.

    Best wishes,
    Ivan Todorov
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top