Dynamically Add a Row to a Gridview at Runtime
Question
Is it possible to add a row to a gridview at runtime? I need to add a default row(sometimes) and then add an adhoc row after the bound row based on a value in the bound row.
gridView.DataSource = source;
/// Create a new Default Row here
gridview.DataBind();
AND
OnDataBound(object sender, DataGridEventArgs e)
//evaluate each row and if certain criteria add a new row.
Solution
It would be easier to determine if you need to add additional rows before databinding.
OTHER TIPS
This might solve your problem.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow