Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Grid Tech Support » Unable to Get Checkbox column to work Collapse All
Subject Author Date
Steve Pinckney Aug 27, 2008 - 3:31 AM

Hello,


I’m currently evaluating your grid and really like it so far, but I’m having a problem.


I have a database table that contains a column named "active_flg."   The values contained in this column are Y or N.

I have tried to set the column type for active_flg to checkbox, but whenever I do I get the following error message:

"String was not recognized as a valid boolean."


I have also tried to use a mappingDataSource as displayed below, but I get the same error when I do.


//Variable declarations

        private object[][] _YN_BOOLEAN_MAPPING_S = new object[3][]

                {

                    new object[]{"Y", true},

                    new object[]{"N", false},

                    new object[]{"R", false}

                };


In the load method I have the following code:

            active_flgColumn.MappingDataSource = _YN_BOOLEAN_MAPPING_S;

            active_flgColumn.MappingValueDataMember = "[0]";

            active_flgColumn.MappingDisplayDataMember = "[1]";


The behaviour I’m trying to implement is that when the user clicks the checkbox, a Y will be written to the database (and then to the database table.) 


 


Please help,


Thanks.


 


Steve