A
Andrea Williams
I have a BoundColumn which shows a field called 'IsPrimary'. Straight from
the database, the field is a 1 or 0 (bit). But I want to show 'Yes' or 'No'
instead. Or better yet, an image only if the value equals one.
Does anyone have some code sample of how this could be done in code-behind?
Here's my bound column code:
dgc = new BoundColumn();
dgc.HeaderText = "Primary Contact";
dgc.DataField = nvcAuthor.Get("IsPrimary");
this.dgdAuthors.Columns.Add(dgc);
I've looked at TemplateColumns in the MSDN help, but I only see samples
where a template column is used in the ASPX and I want it in the
code-behind.
Thanks in advance,
Andrea
the database, the field is a 1 or 0 (bit). But I want to show 'Yes' or 'No'
instead. Or better yet, an image only if the value equals one.
Does anyone have some code sample of how this could be done in code-behind?
Here's my bound column code:
dgc = new BoundColumn();
dgc.HeaderText = "Primary Contact";
dgc.DataField = nvcAuthor.Get("IsPrimary");
this.dgdAuthors.Columns.Add(dgc);
I've looked at TemplateColumns in the MSDN help, but I only see samples
where a template column is used in the ASPX and I want it in the
code-behind.
Thanks in advance,
Andrea