Hi,
i want to include an editing template in my gridview as per the attachment. Users will be able to add new row only through the editing template (last row) . Also in the template, all the fields by default should be in edit (not in display mode). Is there any way to achieve this? Currently the gridview is allowing only one cell as editable mode by default. Its not allowing the whole row to be in editable mode. The code snippet below is allowing a single cell to be in editable mode.
Expecting a quick reply from you,
Regards,
Saranya.
i want to include an editing template in my gridview as per the attachment. Users will be able to add new row only through the editing template (last row) . Also in the template, all the fields by default should be in edit (not in display mode). Is there any way to achieve this? Currently the gridview is allowing only one cell as editable mode by default. Its not allowing the whole row to be in editable mode. The code snippet below is allowing a single cell to be in editable mode.
var rowToEdit = this.grdReferrals.ItemContainerGenerator.ContainerFromItem(this.grdReferrals.SelectedItem) as GridViewRow;
if (rowToEdit != null)
{
GridViewCell currentCell = (GridViewCell)rowToEdit.Cells[0];
if (null != currentCell)
currentCell.IsCurrent = true;
rowToEdit.BeginEdit();
}
Expecting a quick reply from you,
Regards,
Saranya.