GridView RowDataBound
Code .NET SQL :: ASP.NET :: C# :: Gridview
Page 1 sur 1
GridView RowDataBound
- Code:
public void GridViewAllPartResults_OnRowDataBound(Object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string format;
if (displayVariant)
format = FORMATPERCENT;
else
format = FORMATNUMBER;
// Display the formated number.
foreach (TableCell tableCell in e.Row.Cells)
{
string columnName = ((System.Web.UI.WebControls.DataControlFieldCell)(tableCell)).ContainingField.ToString();
if (columnName != TITLE)
{
if (tableCell.Text != " ")
{
double formatValue = Convert.ToDouble(tableCell.Text);
tableCell.Text = formatValue.ToString(format);
}
}
}
}
}
Sujets similaires
» GridView : DataKeys
» gridview date format
» RadioButton dans Gridview
» Dynamically Create column in GridView
» Lien hypelink dynamique GridView
» gridview date format
» RadioButton dans Gridview
» Dynamically Create column in GridView
» Lien hypelink dynamique GridView
Code .NET SQL :: ASP.NET :: C# :: Gridview
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum