Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7767893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:47:09+00:00 2026-06-01T15:47:09+00:00

I have a listview that is loaded with a list of objects that contain

  • 0

I have a listview that is loaded with a list of objects that contain an attribute called AssigneeView which holds the date that the entry was opened. The listview's ItemTemplate has a label named “lblHeader”. What I want to do is loop through the ListView.Items and check each element’s AssigneeView attribute, if it is null, I want to set the lblHeader.Text to be bold (indicating it is unread).

I want to create a method that takes an attribute from the Object in the Items list called ticketID and lookup whether or not the AssigneeView field is null for that field and return a bool. So it would look something like

ForEach item in listview.Items
   if(IsUnread(item.datamember.ticketID)) then
       item.lblHeader.MakeBold
   else
      item.lblHeader.MakeNotBold

I’m not 100% on how to dig into the telerik control to get what I need to do this. Any suggestions?

UPDATE:
here’s where I am at the moment:

using (var client = new QUTIService.QSVCClient())
            {
                var data = client.SearchTickets(this.myGuid, txtSearchString.Text, 100, chkSearchClosed.Checked).ToList();
                lsvResultTickets.DataSource = data;
                lsvResultTickets.DataBind();
                if (data.Count == 0)
                {
                    lblStatus.Text = "No tickets found.";
                }
                else
                {
                    foreach (var item in lsvResultTickets.Items)
                    {
                        var obj = item.DataItem as QT.FullTicket;
                        if (TicketIsUnread(obj.OriginalTicket.TicketID))
                        {
                            //???
                        }
                    }
                }
            }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:47:11+00:00Added an answer on June 1, 2026 at 3:47 pm

    Ok, it turns out that I just had to drill down one more level. I didn’t need to pull out another method to do the check for me. I handled this is in the item loaded event handler, here’s what I ended up with:

    protected void ResultItem_DataBound(object sender, RadListViewItemEventArgs e)
        {        
            var dItem = e.Item as RadListViewDataItem;
            var dObj = dItem.DataItem as QT.FullTicket;
            //if no read date, mark as unread (bold)
            if (dObj.AssigneeView == null)
            {            
                var headerLabel = e.Item.FindControl("lblHeader") as Label;
                headerLabel.Style.Add("Font-Weight", "Bold");
                headerLabel.Style.Add("Color", "Orange");
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of images that are pulled from a database and loaded
I have a company object which has a list of branch objects, my company
I have an ItemsControl that is bound to a list of Objects. I have
I have ListView that has the following EditItemTemplate: <EditItemTemplate> <tr style=> <td> <asp:LinkButton ID=UpdateButton
I have ListView that uses a GridView to display several columns of data. Two
I have a listview that is binded to a ThreadSafeObservableCollection. The background of each
I have a ListView that is set up with a MinHeight and a MaxHeight.
I have a ListView that I am populating with items from an ObservableCollection .
A have a ListView that is rendered with multiple items. Now I want to
I have a ListView that is populated using an XML file. However, I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.