How to set the default value of ture for add new row on a checkbox field. The default value is set to true for that field in the SQL Server database.
Thanks.
Hi,
DefaultValue should only be set at RunTime (it should actually not show up in the aspx). You need to set DefaultValueAsString as I said. This will get parsed into the actual boolean value by the setting at runtime and carried down to the client.
-Dave
Yes Im using version 11 and it is a BoundCheckbox Field. Hi I tried that and now i get this error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Cannot create an object of type 'System.Object' from its string representation 'True' for the 'DefaultValue' property.Source Error:
Line 42: <ig:RowAdding> Line 43: <ColumnSettings> Line 44: <ig:RowAddingColumnSetting ColumnKey="bActive" DefaultValue="True" Line 45: DefaultValueAsString="True" /> Line 46: <ig:RowAddingColumnSetting ColumnKey="bMerged" DefaultValue="True"
Version Information: Microsoft .NET Framework Version:2.0.50727.3623; ASP.NET Version:2.0.50727.3618
Hi bridsimon,
Are you using 11.1 and the new BoundCheckboxField? If this is the case, you should add a RowAddingColumnSetting to the ColumnSettings for the RowAdding behavior. Set the ColumnKey to the key of the checkbox field. And set DefaultValueAsString="true".
regards,David Young