Custom Provider and Advanced Form

3 posts, 0 answers
  1. Alex
    Alex avatar
    17 posts
    Member since:
    Sep 2005

    Posted 28 Mar 2011 Link to this post

    I have a custom provider that Ive created and its works fine with the default edit form. The issue that Im running into is that once I modify my RadScheduler to use an advanced edit form, none of the drop down controls (all of which are populated via resources in the custom provider) have the selected value in edit mode.
    Ive tried adding binding expressions for each of the controls in the advanced edit and insert templates, but when I do that I get an error saying that that the Appointment object does not have a definition for a property.
    To get around that I can add the CustomAttributes to the radScheduler definition but then the control does not save the data. Also, Im not working with attributes, they are resources.

    Can telerik please provide some guidance on this? and please don't recommend that I read the Advanced Templates Demo. Ive read it a number of times and it has not helped.
  2. Alex
    Alex avatar
    17 posts
    Member since:
    Sep 2005

    Posted 30 Mar 2011 Link to this post

    I figured this out. Turns out I wasn't binding correctly to the resource in my <AdvancedInsertTemplate> and <AdvancedEditTemplate>.
    I had initially setup my scheduler to use resources provided by a SqlDataSource. The text required for that binding was as follows:

    PersonID='<%# Bind("PersonID") %>'
    CategoryID='<%# Bind("CategoryID") %>'

    I subsequently created a custom data provider. After that change, the binding text changed to:

    PersonID='<%# Bind("Person") %>'
    CategoryID='<%# Bind("Category") %>'

    A small change but you'll notice that the binding expression now binds to the name of the resource that I have defined in the custom provider and not the ID as required when binding to a SqlDataSource.
  3. Veronica
    Veronica avatar
    1213 posts

    Posted 30 Mar 2011 Link to this post

    Hello Alex,

    I'm glad that you found the solution on your own.

    Please feel free to ask me if you have further questions.

    Veronica Milcheva
    the Telerik team
Back to Top