We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Binder.NameToColIndex()

The code and detailed explanation are attached as grid_3164.zip. Summary: Binder.NameToColIndex() always returns -1, even when it seems clear that it should not. grid_3164.zip

3 Replies

AD Administrator Syncfusion Team July 28, 2004 06:07 PM UTC

I do not know why this is failing. The string has to be an exact match (case is significant). If you have the source code, you can use the Assembly Manager to build a debug version of our libraries, and then run your application and step into NameToColIndex to see exactly why it is failing. Or, if you can attach a sample project, we can do that here.


SL Scott Lundgren July 28, 2004 07:57 PM UTC

Your answer helped. The case sensitivity is the issue; NameToColIndex() is case-sensitive. However: gridobj.GridBoundColumns["NOTcaseSENSiTiVeCOLname"] returns a valid GridBoundColumn reference. So, it seems that the GridBoundColumn collection is not case sensitive, at least, when keying as shown. So, everything is resolved now. Thanks for the help. Out of curiousity - is there a reason for this behavior? >I do not know why this is failing. The string has to be an exact match (case is significant). > >If you have the source code, you can use the Assembly Manager to build a debug version of our libraries, and then run your application and step into NameToColIndex to see exactly why it is failing. > >Or, if you can attach a sample project, we can do that here.


AD Administrator Syncfusion Team July 28, 2004 10:25 PM UTC

NameToColIndex does a loop with code checking for strict equality. The GridBoundColumn indexers must be using some list lookup code that is not case sensitive.

Loader.
Live Chat Icon For mobile
Up arrow icon