My issue is basically the same one posted in the following post:
http://forums.infragistics.com/forums/p/20698/74609.aspx#74609
In my application I bring over data from a database and display it in my WinGrid. The data could be entered in lower or upper case depending on how the user input it into the database. The problem is that when the data is in mixed case the WinGrid does not want to show the data that has been entered in uppercase.
A colleague of mine created a mini-project to illustrate this issue. He created a dataset with 2 tables and a data relation and added several records to each table. One of the records added to the child table was added with an uppercase value. This record does not show in the second band, but it is accessible via ADO GetChildRows(). This suggests that it's a WinGrid issue and not an ADO issue. I've attached the project to this post.
We have tried using the CaseSensitive property on the DataTable to make this work but it doesn't appear to be the correct option. How can I get the wingrid to display my data when it's in a mixture of cases?
Thank you!
Steve
Hi Steve,
I'm not sure I follow you. This doesn't sound like the same issue as the other thread at all. That issue was talking about UltraDropDown matching values in a case-sensitive manner. But you seem to be suggestion that you are missing rows of data from your grid based on the case of that data.
I don't see how the casing of the data could possibly affect whether or not that data displays in the grid. The contents of a cell are pretty much opaque to the grid.
Hi Mike,
You are right. The link I pasted in does not really sound like my issue at all. It was probably the closest I could find to my issue while searching the forums while not exactly being the same. I should've said that instead of saying it was the same. My apologies ...
Did you happen to look at the test mini-project I attached? Why would the ADO side of .Net be able to see and access the row that has the data value in uppercase but then the grid not display that line? That is truly the mystery here. If you have any other suggestions, please let me know.
Thanks again!
Sorry, I failed to notice that you had attached the sample.
I just took a look at it and I agree with you that this is really odd. But this does not appear to be a problem in the grid. The grid has no control over this, in fact.
In your code, you are calling GetChildRows on the parent row. That's fine because you happen to know that the data source is a DataSet with DataTables and DataRows. But the grid (or any other bound control) does not know this. All it deals with is the IBindingList interface. So what must be happening here is that even though GetChildRows is returning the correct child rows, the IBindingList implementation of the DataSet is not.
I tested this out just to make sure and it looks like I am correct. Here's the code that gets the child CurrencyManager for the current parent row - which will be the first row by default. The List.Count here only returns 1. I also added code to display the values in the row, just to make sure I am looking at the children of the first row.
CurrencyManager cm = this.ultraGrid1.BindingContext[ds, "t1.dr1"] as CurrencyManager;Debug.WriteLine(cm.List.Count); DataRowView drv = (DataRowView)cm.List[0];Debug.WriteLine(drv.Row["k1"]);Debug.WriteLine(drv.Row["k2"]);
So this seems like an issue in the IBindingList impementation of the DataSet or perhaps something else internal to the DataSet.
I work with Steve and wanted to find out how you would modify the IBindingList interface per your suggestion above, to get it to be case-insensitive.
Thank you,
Bill
Hi Bill,
I'm not sure if that's possible. Theoretically, you could derive your own class from a DataSet and then re-implement the IBindingList implementation. But this is not really my area of expertise. I could only guess at the implementation of IBindingList on the DataSet or why it's doing what it's doing. You'd have to check with someone at Microsoft about how that could be done, if it's even possible.
Another option would be to create your own data source and implement IBindingList yourself from scratch.
Thanks for the response. To aid in researching a solution, would it be possible to get some further info about what WinGrid is doing "under the hood" as it goes about rendering a DataSet? In particular, what method(s) are being invoked in the IBindingList (or otherwise) to retrieve the child records of a parent record? The reason for the question is because I've looked at the docs on MSDN regarding IBindingList, IList, DataView, DataViewManager etc. and it's not clear which methods would be invoked to do this.
Regards,
The grid gets the data from the CurrencyManager. So what you are asking for here is essentially the code I posted above.