Changing display based on return from WebServiceSettings-Method

4 posts, 0 answers
  1. Max
    Max avatar
    18 posts
    Member since:
    Apr 2016

    Posted 06 Apr Link to this post

    Hello, I am very new to working with Telerik stuff.

    I have a ComboBox that is a dropdown that gets populated from a WebServiceSettings-Method call (it querys our database and returns a RadComboBoxData object). I need to highlight some items in the dropdown with a color based on a flag in our database. I was wondering how to do this.

  2. Max
    Max avatar
    18 posts
    Member since:
    Apr 2016

    Posted 07 Apr in reply to Max Link to this post

    Is there an event that happens after a WebServiceSettings-Method call that I can hook on to?

    Because if there is I can think of a way to do this.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Max
    Max avatar
    18 posts
    Member since:
    Apr 2016

    Posted 07 Apr in reply to Max Link to this post

    In case anyone cares I hooked into OnClientItemDataBound and did

    <telerik:RadComboBox [other things] OnClientItemDataBound="MarkFlaggedItems">
    function MarkFlaggedItems(sender, eventArgs) {
        var item = eventArgs.get_item();
        var flag = item.get_attributes().getAttribute("Flag"); // Flag is a bool in the database
        if (loaded) { // if item has been flagged mark yellow
            item.get_element().style.backgroundColor = "yellow";
        }
    }

  5. Max
    Max avatar
    18 posts
    Member since:
    Apr 2016

    Posted 07 Apr in reply to Max Link to this post

    I can't believe there's no edit on these forums. The "loaded" in the if statement is supposed to be "flag".
Back to Top