please follow the instruction as below
1. Select Rad GridView
2. Go to Events option in properties
3. Click on cellFormatting Event and double click on it.
It will generate code behind as below
public void gResults_CellFormatting(object sender, CellFormattingEventArgs e)
{
}
do some logical cod here for me I have inserted a button based on other columns cell value
if (e.Column.Name == "IsUpAndRunning")
{
if (((e.Row.ViewInfo.CurrentRow).DataBoundItem).ControlParameters != null)
{
string isControllablevalue = (((e.Row.ViewInfo.CurrentRow).DataBoundItem)).ControlParameters.IsControlable.ToString();
if (isControllablevalue == "True")
{
e.CellElement.Text = "";
RadButtonElement btnOn = new RadButtonElement();
btnOn.Margin = new System.Windows.Forms.Padding(0, 1, 3, 1);
if ((e.CellElement.Value).ToString() == "True")
{
btnOn.Text = "On";
}
else
{
btnOn.Text = "Off";
}
e.CellElement.Children.Add(btnOn);
}
}
else
{
if ((e.CellElement.Value).ToString() == "True")
{
e.CellElement.Text = "";
e.CellElement.Image = ((System.Drawing.Image)(resources.GetObject("picHMtrue.Image")));
}
else
{
e.CellElement.Text = "";
e.CellElement.Image = ((System.Drawing.Image)(resources.GetObject("picHMFalse.Image")));
}
}
}
else
{
e.CellElement.ResetValue(LightVisualElement.ImageProperty, ValueResetFlags.Local);
}