Hi All,
Our CSLA project windows application, in which we are using Infragistics controls. We have scenario where the applications crashes when click on the dropdown control under the UtraWinGrid
Below is the scenario
When the page is loaded the grid is filled with all the required as below as shown in the below snapshot.
There are two columns
1. Category Id
2. Options
The option column is a drop down which gets populated and filtered based on the value of the Category. The Dropdown gets filtered and poppulated in the below event,
For the first click on the dropdown, it goes in a never ending loop when we add the filter condition based on the category. We get the system overflow exception error. This error started coming when upgraded our infragistics control to 17.1
Just for workaround when we skip the first call of adding the filter condition to the dropdown. Now second time when the trigger the same event it works properly. So not sure whether the problem is from the UtlraWinGrid control or Ultradropdown control. If anyone has come across such scenario your input will be valuable.
Private Sub UltraGridDiscountsSurcharges_BeforeCellActivate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CancelableCellEventArgs) Handles UltraGridDiscountsSurcharges.BeforeCellActivateIf e.Cell.Column.Key = "PremModifierOptionId" ThenFilterModifierOptions(CType(e.Cell.Row.Cells("PremModifierCatId").Value, Integer))End IfEnd Sub
Private Sub FilterModifierOptions(ByVal CategoryId As Integer)With Me.UltraDropDownOptions.DisplayLayout.Bands(0).ColumnFilters("RBKCategoryId").ClearFilterConditions().ColumnFilters("RBKCategoryId").FilterConditions.Add(FilterComparisionOperator.Equals, CategoryId)End WithEnd Sub
Hi Abhilash.
I created a small sample app to test this out and it seems to be working fine for me. I am attaching my sample here so you can take a look.
I'm not sure if I got right exactly what you are doing, but it sounds like you are filtering the list based on some other column in the same row, which is what I did here.
Take a look at my sample and see if it works for you. If it does, then something else in your application is causing the issue. Either that or I misunderstood what you are trying to do.
If my sample gives you the same infinite loop, then this must be a problem with the version of the assemblies you are using. In which case, the solution it probably to get the latest service release.
Hi Mike,
Thanks for your reply. Your application works fine.
But in my application, after the page loads for the first time and when we click on the cell of the "Option" column. It calls the BeforeCellActivate event of the grid where we have added the Filter condition logic for the particular dropdown. After the filter condition successfully added in that event it somehow goes into an infinite loop and the application crashes out withe system overflow exception. Not sure is it because some late binding happening on the UltraDropdown control when it tries to execute the filter condition value list is not populated.(Just a guess)
The reason why i am saying is that because in the debug mode if i skip the logic of the adding filter condition on the first call. The application does not crashes out but in the drop down it lists out all the values. After that when we click on any of the options of the grid and the second time i didn't skip the logic of adding the filter condition and it worked fine. The dropdown got filtered properly without the application getting crashed. After that any successive clicks of the dropdown column works.
Is there any other event where i can add the filter condition logic of the dropdown in order to make sure that the value list is properly binded on the control.
Thanks,
Abhilash Nair
Hi Abhilash,
Abhilash said:in my application, after the page loads for the first time and when we click on the cell of the "Option" column. It calls the BeforeCellActivate event of the grid where we have added the Filter condition logic for the particular dropdown.
Is that not exactly what my sample is doing?
The UltraDropDown might not be getting the data until the first time it paints and that probably doesn't happen until the first time you drop it down. So that's not really "late binding", but it's sort've a delayed optimization.
BeforeCellActivate is typically a good event in which to perform the filtering. You could use BeforeRowActivate or BeforeCellListDropDown. Or even AfterCellActivate.
Beyond that, we would need to be able to reproduce the exception in order to look into it further. Maybe you could modify my sample and get it to reproduce the problem.
If that's not possible, then posting the call stack of the exception might help - although it's usually not sufficient in these kinds of cases, so a working sample is really the only sure way to get it resolved.
I'm experiencing the same issue. V 16.1 ultra grid with ultra drop downs on it.
I've got six combo boxes, the list in each one filtered based on the selected item in the drop down to the left (using before cell activate to apply the filter).
If I drop down all the combos without making a selection first all the drop downs show their rows (unfiltered of course), and then it all works fine afterwards, But if I go left to right selecting items as I go it crashes with the stack overflow exception on my third ultra drop down.
I'm just looking closer now to get down to why it's doing this.
I've got the same issue (see below). did you find a solution?