D
DC Gringo
I have a simple datagrid and need to output the value of "0" (zero) if the
value is null.
<asp:BoundColumn DataField="clnPopulationCensus"
SortExpression="clnPopulationCensus" HeaderText="Population (Census)"
DataFormatString=""></asp:BoundColumn>
Would this go in the DataFormatString column? Or somewhere else?
Here's my adapter:
'SqlDataAdapter1
'
Me.SqlDataAdapter1.SelectCommand = Me.SqlSelectCommand1
Me.SqlDataAdapter1.TableMappings.AddRange(New
System.Data.Common.DataTableMapping() {New
System.Data.Common.DataTableMapping("Table", "sac1SelectSurvey1", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("clnGUID", "clnGUID"), New
System.Data.Common.DataColumnMapping("clnPriorityCorrectedTC",
"clnPriorityCorrectedTC"), New
System.Data.Common.DataColumnMapping("clnMADoneTC", "clnMADoneTC"), New
System.Data.Common.DataColumnMapping("clnMASchoolTC", "clnMASchoolTC"), New
System.Data.Common.DataColumnMapping("clnMAPosterTC", "clnMAPosterTC"), New
System.Data.Common.DataColumnMapping("clnMARadioTC", "clnMARadioTC"), New
System.Data.Common.DataColumnMapping("clnMAPerformingGroupTC",
"clnMAPerformingGroupTC"), New
System.Data.Common.DataColumnMapping("clnMACommunityCenterTC",
"clnMACommunityCenterTC"), New
System.Data.Common.DataColumnMapping("clnMAReligiousOrganizationTC",
"clnMAReligiousOrganizationTC"), New
System.Data.Common.DataColumnMapping("clnMAOtherTC", "clnMAOtherTC"), New
System.Data.Common.DataColumnMapping("clnMAOther", "clnMAOther"), New
System.Data.Common.DataColumnMapping("clnMAOrganisation",
"clnMAOrganisation")}), New System.Data.Common.DataTableMapping("Table1",
"Table1", New System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("clnGUID", "clnGUID"), New
System.Data.Common.DataColumnMapping("clnName", "clnName")})})
--
__________________________
Glenn Levine
(e-mail address removed)
Cell: (202) 374-4871
Home: (703) 212-6723
"One never knows, does one?"
value is null.
<asp:BoundColumn DataField="clnPopulationCensus"
SortExpression="clnPopulationCensus" HeaderText="Population (Census)"
DataFormatString=""></asp:BoundColumn>
Would this go in the DataFormatString column? Or somewhere else?
Here's my adapter:
'SqlDataAdapter1
'
Me.SqlDataAdapter1.SelectCommand = Me.SqlSelectCommand1
Me.SqlDataAdapter1.TableMappings.AddRange(New
System.Data.Common.DataTableMapping() {New
System.Data.Common.DataTableMapping("Table", "sac1SelectSurvey1", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("clnGUID", "clnGUID"), New
System.Data.Common.DataColumnMapping("clnPriorityCorrectedTC",
"clnPriorityCorrectedTC"), New
System.Data.Common.DataColumnMapping("clnMADoneTC", "clnMADoneTC"), New
System.Data.Common.DataColumnMapping("clnMASchoolTC", "clnMASchoolTC"), New
System.Data.Common.DataColumnMapping("clnMAPosterTC", "clnMAPosterTC"), New
System.Data.Common.DataColumnMapping("clnMARadioTC", "clnMARadioTC"), New
System.Data.Common.DataColumnMapping("clnMAPerformingGroupTC",
"clnMAPerformingGroupTC"), New
System.Data.Common.DataColumnMapping("clnMACommunityCenterTC",
"clnMACommunityCenterTC"), New
System.Data.Common.DataColumnMapping("clnMAReligiousOrganizationTC",
"clnMAReligiousOrganizationTC"), New
System.Data.Common.DataColumnMapping("clnMAOtherTC", "clnMAOtherTC"), New
System.Data.Common.DataColumnMapping("clnMAOther", "clnMAOther"), New
System.Data.Common.DataColumnMapping("clnMAOrganisation",
"clnMAOrganisation")}), New System.Data.Common.DataTableMapping("Table1",
"Table1", New System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("clnGUID", "clnGUID"), New
System.Data.Common.DataColumnMapping("clnName", "clnName")})})
--
__________________________
Glenn Levine
(e-mail address removed)
Cell: (202) 374-4871
Home: (703) 212-6723
"One never knows, does one?"