Ticket Q527134
Visible to All Users

ComboBox/Large Database - A predefined value is shown incorrectly if it's index is greater than the CallbackPageSize property value

created 12 years ago

Hello.

I use Combo Box with Large Database MVC extension.
But it does not set text value for stored data.
I set Value property on PreRender:

C#
settings.PreRender = (s, e) => { MVCxComboBox combo = (MVCxComboBox)s; combo.Value = "KeyInNotFirstRange"; };

But text value does not set.

Sample Visual Sudio project in attachment.

Answers approved by DevExpress Support

created 12 years ago (modified 12 years ago)

Hello Alexander,
The issue occurs due to the CallbackPageSize property.
In your project it's equal to 10. This means that only ten items are loaded on the client side. The item with the 'KeyInNotFirstRange' value is not included in the first ten items, that's why it couldn't be found in the current collection and displayed like a text.
If you increase the CallbackPageSize property, you'll see that everything works as expected.
Note that if you set the Text property to a non-existing value, it will override the earlier defined Value and dummy text will be shown.
I've recorded a video to demonstrate this approach in action.
Let me know if you have additional questions.

    Comments (2)
    AB AB
    Alexander Bendik 12 years ago

      Unfortunately I can not increase CallbackPageSize because data source is corporate Active Directory with more than 10'000 employees.
      May be You will suggest another solution of our problem?

      Artem (DevExpress Support) 12 years ago

        Hello,
        It's a designed behavior. Since you define ItemRequestedByValueMethod and ItemsRequestedByFilterConditionMethod delegate methods manually, you can pass your predefined value in the ItemsRequestedByFilterConditionMethod delegate method as a parameter to obtain necessary items at the first time.
        I've modified your project to demonstrate this idea.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.