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 3678396
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:20:11+00:00 2026-05-19T03:20:11+00:00

I have a RadComboBox that loads 10 items at a time (from a couple

  • 0

I have a RadComboBox that loads 10 items at a time (from a couple hundred items). For simplicity sake, the datasource is a List<Person> where:

public class Person 
{   
  public string Name { get; set; }   
  public int ID { get; set; } 
}

My service and repository methods return the List<Person> after it has already been sorted (by Name) and paged (10 items per request). My problem that somewhere within the data is the Name of the “logged in” user (I have the ID for that user). I need to show that person at the top of the list (first page, first item.)

What is the best way to go about this?

I have thought of the following:

  • Show 1-11 instead of 1-10 on the first set, throwing the “logged in” user at the top
  • Omit the logged in user from the
    query and add them in after
  • 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-05-19T03:20:11+00:00Added an answer on May 19, 2026 at 3:20 am

    If you already have the data you need for that user, you can add a “fake” user object to the top and handle everything in the paging:

    (code not tested, written in notepad++)

    public class DummyPagerRepo
    {
        private List<Person> persons;
        private Person userObject;
        private int userIndex = -1;
    
        public DummyPagerRepo(List<Person> persons, Person userObject)
        {
            this.persons = persons;
            this.userObject = userObject;
        }
    
        public List<Person> GetPage(int pageSize, int pageOffset)
        {
            List<Person> results = new List<Person>(pageSize);
            int start = pageOffset * pageSize;
            if(pageOffset == 0)
            {
                result.add(userObject);
                start++;
            }
            int end = Math.Min(persons.length, pageSize * (pageOffset + 1));
            for(int i = start; i < end; i++)
            {
                Person person = persons[i];
                if(userIndex == -1 && person.ID == userObject.ID)
                {
                    userIndex = i;
                }
                else if(userIndex != i)
                {
                    resutls.Add(person);
                }
            }
    
            if(userIndex != -1 && start <= userIndex && end > userIndex && end < persons.length)
            {
                results.add(persons[end]);
            }
            return results;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a repeater that contains a Telerik RadComboBox: <asp:Repeater ID=rpt runat=server> <ItemTemplate> <telerik:RadComboBox
I have a RadComboBox that I am using to display department name and abbreviations.
I have a webpage that has a Telerik RadComboBox on the page. One of
have a table that dynamically generates text boxes in run time. I want to
Have you refactored from an ActiveRecord to a DataMapper pattern? What conditions prompted the
I've been having a problem using the javascript API of the RadComboBox from Telerik.
Have noticed issue while testing iphone app that if one quickly opens/dismisses a modal
Have a build process that can't be edited and need to pack another war
Have just started using Google Chrome , and noticed in parts of our site,
Have you ever seen any of there error messages? -- SQL Server 2000 Could

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.