Changing the Cell Value at Runtime

Hi,

I am working in Deutsche Bank and using SyncFusion. I want to change the cell value at run time. Could you tell me how to do it?

thanx

regards

Muneeb Youns

e.g.

Currently I am doing this. When I debug, it does change the text but I am not able to see it in the grid.
if (e.Inner.Style.Text == "XYZ")
{
gridGroupingControl.TableControl.Model[e.Inner.RowIndex,e.Inner.ColIndex].Text = "ABC";
}


3 Replies

PW Perry Way October 30, 2008 08:36 PM UTC

Hi,

I am using "RowDataBound" event to change the cell value. I am not sure whether it will solve your requirement. Please see the code below:

protected void sgInventory_RowDataBound(object sender, Syncfusion.Web.UI.WebControls.Grid.Grouping.RowDataBoundEventArgs e)
{
switch (e.Element.Kind)
{
case DisplayElementKind.Record:
{
if (ddlViewBy.SelectedValue == "Root")
{
e.Row.Cells[4].Text = "Root Text";
}
break;
}
}

}



MY Muneeb Younsi October 31, 2008 12:24 PM UTC

Hi,

Thanks for your help. But, unfortunately it will not work in my case.

regards

Muneeb Younsi

>Hi,

I am using "RowDataBound" event to change the cell value. I am not sure whether it will solve your requirement. Please see the code below:

protected void sgInventory_RowDataBound(object sender, Syncfusion.Web.UI.WebControls.Grid.Grouping.RowDataBoundEventArgs e)
{
switch (e.Element.Kind)
{
case DisplayElementKind.Record:
{
if (ddlViewBy.SelectedValue == "Root")
{
e.Row.Cells[4].Text = "Root Text";
}
break;
}
}

}





MS Mohamed Suhaib Fahad A. Syncfusion Team November 1, 2008 02:11 AM UTC

Hi Muneeb,

I had already updated the other forum thread,

http://www.syncfusion.com/support/forums/message.aspx?MessageID=76732

Please check this out and let us know if it helps you.

Thanks,
Fahad
ASP.NET Grid Team
Syncfusion Inc.,


Loader.
Up arrow icon