Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
UltraCombo hiding rows after databinding
posted

Hi,

Using Infragistics 9.2, LLBLGen Pro v2.6 and are having issue with the UltraCombo

We have OrderStatus ultracombo with datasource datatable with 4 rows values

  1. Active
  2. Filled
  3. Completed
  4. Cancelled

if we lookup an order with Active status, bind the order to the dropdown like following

                StatusDropDown.DataBindings.Add("Value", this.CurrentOrder, "OrderStatusID");

The combo shows all four of items in the list with active selected. Now we lookup and bind other order with status Completed as

StatusDropDown.DataBindings.RemoveAt(0);

StatusDropDown.DataBindings.Add("Value", this.CurrentOrder, "OrderStatusID");

But now the combo has only one item which is Completed, while debugging the combo.Row.Count still show 4 items, further only Completed row was found to be Hidden = false while all other rows are hidden= true. The other 3 rows were found to be filtered Out as the rows.FilteredInRowCount show value 1. We tried to clear filter but no luck

StatusDropDown.Rows.ColumnFilters.ClearAllFilters()

then

StatusDropDown.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;

But nothing worked, except re-assigning the datasource to the datatable again.

Why does it required to re-assign the same datasource each time we databind to new order entity ?

-Shekhar

 

  • 469350
    Offline posted

    HI Shekhar,

    The UltraCombo does not have any automatic filtering in it. Something in your code must be setting te Hidden property on the row(s) to true, or else applying filters to the combo.

    • 130
      posted in reply to Mike Saltzman

      Hello Mike,

      Yes, there is a code to hide and unhide rows in InitializeLayout event which I believe runs when we assign a datasource, but this never runs while DataBinding to next entity. (the breakpoint doesnt get hit when debugging)

      As soon as next entity is binded, I noticed StatusDropDown.Rows.FilteredInRowCount becomes 1 but StatusDropDown.Rows.Count is still 4.

       

      Thanks

      Shekhar

      • 4219
        posted in reply to Shekhar

        You are welcome :)

        Sincerely,

        Stefaniya

        • 130
          posted in reply to [infragistics]Stefaniya Tapela

          Thanks Mike, Thanks Stefaniya.

          • 4219
            posted in reply to Mike Saltzman

            Hi Shekhar,

            I have created a case ticket with number CAS-45495-WM8H7F for you. I will inform you about the progress of this issue there, also if you have any further questions, please submit them on this ticket.

            Best Regards,

            Stefaniya

            • 469350
              Offline posted in reply to Shekhar

              Hi Shekhar,

              I'm not entirely sure this is a bug, or if it's possible to get around it. What's happening is that the TextBox is getting it's Text updated indirectly by the DotNet BindingManager, and this is triggering the Suggest mode. The suggestion have to be triggered based on the TextChanged property of the TextBox that the ComboEditor is using, because otherwise, it wouldn't work when you pasted into the control.

              But this does seem like something we need to look into more closely to see if there's any way we can detect this situation so we do not go into suggest mode when the ComboEditor is updated by the DatBinding.

              I'm going to forward this post over to Infragistics developer support so they can create a case for you and write this up for developer review.

              • 130
                posted in reply to Mike Saltzman

                Version: Infragistics v9.2, .Net 3.5 C#

                Description:

                Finally, found out that the issue was when the combo is set to SuggestAppend and the combo is currently being focused, it will filter out other rows.

                the Combo.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;

                commenting out this statement prevented the filtering of the rows.

                So, when the control is in focus and if the value gets changed during data binding, since it filters out the other rows.. the user feels other choices were "lost" and has reported it as bug.

                Please refer to the video and sample application attach.

                Thanks

                Shekhar