Problem with Validating Resources

6 posts, 0 answers
  1. Kevin
    Kevin avatar
    24 posts
    Member since:
    Jul 2011

    Posted 01 Sep 2011 Link to this post

    Hi,

     How can i validate resource of Type Dropdown so that it should not apply the 0 index value for insertion. i have a resource Task whose values are shown in dropdown box for insertion or updation. it shows value at top with '-' or blank value. i need to validate that value so that it should be selected or there is any other way like blank value never shows up at the top. i am sending screen shot or resource  for better understanding,



    Thanks 
  2. Dan Lehmann
    Dan Lehmann avatar
    103 posts
    Member since:
    May 2011

    Posted 01 Sep 2011 Link to this post

    If you are handling AppointmentInsert in the codebehind, set e.Cancel = True to abort the insert if validation fails.

    Dan
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kevin
    Kevin avatar
    24 posts
    Member since:
    Jul 2011

    Posted 02 Sep 2011 Link to this post

    Thanks for the Reply Dan...... But can't we validate it on the client side or we can just remove the zero index item and directly Display the first key item in dropdown. it will be good if we can validate on client side or there some other option.
    pls reply if any one can help with this....


    Thanks
  5. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 03 Sep 2011 Link to this post

    Hello Kevin,

    Yes, you can make selected item check on the client-side.

    I made an example for you showing how to modify the ComboBox controls inside the AdvancedForm of the Scheduler using JavaScript.

    Attached is a .zip file containing only the .aspx file of the example.

    Hope this helps.

    Best wishes,
    Ivana
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  6. Kevin
    Kevin avatar
    24 posts
    Member since:
    Jul 2011

    Posted 06 Sep 2011 Link to this post

    Thanks fr the reply Ivana , i still not able to remove by default selected '-' symbol or any other text that i can put there.
    i just want able to set selected index of dropdown to one. so that no validation will required. when advance form will open, it already have selected index one i.e task one will be selected. please reply if you can help.

    Thanks
  7. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 07 Sep 2011 Link to this post

    Hello Kevin,

    You can access the resource combobox in FormCreated and set its SelectedIndex property from code behind. Here is a kb article that will help with this task - http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-access-controls-in-the-advanced-form.aspx.


    Kind regards, Peter
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017