D
dauphian
Greetings,
I have a dataSet that I am loading into a dataGrid where one of the
columns values is simply one letter. I need to be able to assign that
letter to word:
BoundColumn type = new BoundColumn();
type.DataField = "type";
type.DataFormatString = checkType("{0}");
type.HeaderText = "Type";
type.HeaderStyle.Font.Bold = true;
public string checkType(object type)
{
string checkType = (string)type.ToString();
switch (checkType)
{
case "S":
return "Series";
case "R":
return "Random";
default:
return "Unknown!";
}
}
This is all being done in codebehind and currently it just displays
Unknown! on the page. So I think the values of S or R are not being
passed correctly to check this, or I am doing something wrong.
Thanks in advance!
-Kevyn
I have a dataSet that I am loading into a dataGrid where one of the
columns values is simply one letter. I need to be able to assign that
letter to word:
BoundColumn type = new BoundColumn();
type.DataField = "type";
type.DataFormatString = checkType("{0}");
type.HeaderText = "Type";
type.HeaderStyle.Font.Bold = true;
public string checkType(object type)
{
string checkType = (string)type.ToString();
switch (checkType)
{
case "S":
return "Series";
case "R":
return "Random";
default:
return "Unknown!";
}
}
This is all being done in codebehind and currently it just displays
Unknown! on the page. So I think the values of S or R are not being
passed correctly to check this, or I am doing something wrong.
Thanks in advance!
-Kevyn