Live Chat Icon For mobile
Live Chat Icon

How do I use a ‘helper function’ to change the column value as Boolean in database to be displayed as Yes/No in Datagrid?

Platform: ASP.NET| Category: DataGrid

<asp:DataGrid id='DataGrid1' runat='server' AutoGenerateColumns='False'>
	<asp:TemplateColumn HeaderText='Status'>


protected Function ShowStatus(ByVal someval as boolean)
  If someval = true Then
    ShowStatus = 'Yes'
    ShowStatus = 'No'
  End If
End Function


protected string ShowStatus(bool  someval)
	if (someval == true)
	return 'Yes';
	return 'No';

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.