server-side selecting items by key values

4 posts, 0 answers
  1. Roy
    Roy avatar
    36 posts
    Member since:
    Jun 2008

    Posted 05 Jul 2009 Link to this post

    Hello all,

    I've the following scenario:
    i have a user options page. the options are in a data base table, and i have a connecting table between users and the options.
    the page gets the user id, and loads all possible options from which the user should select.
    the options are bound to a RadGrid, and i have a select column (CheckBox) where the selection is made.
    problem is i want to select the option the user currently have on page load (or RadGrid databound).
    is there a fast way i can give the grid the keys of the items i would like to select, or i need to check all items?

    Good ideas are welcome...
    Roy

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 08 Jul 2009 Link to this post

    Hello Roy,

    You can try to wire OnItemDataBound event and depending on some condition to chekc/uncheck the checkbox control. For further information how to get instance of the rendered control you can refer to this help article (you can use the same approach for the OnItemDataBound ).

    Regards,
    Georgi Krustev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Roy
    Roy avatar
    36 posts
    Member since:
    Jun 2008

    Posted 08 Jul 2009 Link to this post

    The solution i've implemented was to wire up the OnDataBound Event, and run threw all items, checking them for the condition and selecting them.
    I just thought there should probably be a better solution, like specifing the key values to select and that the grid will select them for you...
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 09 Jul 2009 Link to this post

    Hello Roy,

    Thank you for contacting us.

    Unfortunately the behavior you are trying to achieve is not possible. RadGrid does not provide such functionality. The easiest way to achieve your requirements is the suggested approach in my previous post.

    Sincerely yours,
    Georgi Krustev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top