I need to know what neverValidate actually turns off - it seems the listgridfield type validation is still fired even though I have this flag set to true.
Run the testcase. In the population field start enter 12,345 then exit edit mode. You'll see the error "Must be a whole number"
I would remove the type property but I need this for sorting. If I don't specify that this field is an integer/decimal then it sorts as string.
Run the testcase. In the population field start enter 12,345 then exit edit mode. You'll see the error "Must be a whole number"
I would remove the type property but I need this for sorting. If I don't specify that this field is an integer/decimal then it sorts as string.
Code:
isc.ListGrid.create({ ID: "countryList", width:550, height:224, alternateRecordStyles:true, cellHeight:22,neverValidate:true, // use server-side dataSource so edits are retained across page transitions dataSource: countryDS, // display a subset of fields from the datasource fields:[ {name:"countryCode", title:"Flag", width:40, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png", canEdit:false}, {name:"countryName"}, {name:"continent"}, {name:"member_g8"}, {name:"population", formatCellValue:"isc.Format.toUSString(value);"}, {name:"independence"} ], autoFetchData: true, canEdit: true, editEvent: "click" }) <DataSource ID="countryDS" serverType="sql" recordName="country" testFileName="/examples/shared/ds/test_data/country.data.xml" > <fields> <field name="pk" type="integer" hidden="true" primaryKey="true" /> <field name="countryCode" type="text" title="Code" required="true" /> <field name="countryName" type="text" title="Country" required="true" /> <field name="capital" type="text" title="Capital" /> <field name="government" type="text" title="Government" length="500" /> <field name="continent" type="text" title="Continent" > <valueMap> <value>Europe</value> <value>Asia</value> <value>North America</value> <value>Australia/Oceania</value> <value>South America</value> <value>Africa</value> </valueMap> </field> <field name="member_g8" type="boolean" title="G8" /> <field name="independence" type="date" title="Nationhood" /> <field name="area" type="float" title="Area (km&sup2;)" /> <field name="population" type="integer" title="Population" /> <field name="gdp" type="float" title="GDP ($M)" /> <field name="article" type="link" title="Info" detail="true" /> </fields> </DataSource>
Comment