I've this code behind:
GridEditCommandColumn editCol = (GridEditCommandColumn)rgPropDocs.MasterTableView.GetColumn("EditCommandColumn");
ResponseDocument checkDoc = null;
checkDoc = svc.GetDoc(new Guid(item.GetDataKeyValue("ID").ToString()), new Guid(PID));
Literal litFileUploaded = (Literal)item.FindControl("litFileUploaded");
if (checkDoc == null)
{
editCol.EditText = "Add";
litFileUploaded.Text = "Not Uploaded";
}
else
{
//we have document for this type
editCol.EditText = "Edit";
litFileUploaded.Text = checkDoc.OriginalFileName;
}
on the grid I get the first row with correct edit text of "edit" but then the 2nd row is also coming to "edit" in place of "add" and third row I get it correct which is "add". The above code is in item databound event.
GridEditCommandColumn editCol = (GridEditCommandColumn)rgPropDocs.MasterTableView.GetColumn("EditCommandColumn");
ResponseDocument checkDoc = null;
checkDoc = svc.GetDoc(new Guid(item.GetDataKeyValue("ID").ToString()), new Guid(PID));
Literal litFileUploaded = (Literal)item.FindControl("litFileUploaded");
if (checkDoc == null)
{
editCol.EditText = "Add";
litFileUploaded.Text = "Not Uploaded";
}
else
{
//we have document for this type
editCol.EditText = "Edit";
litFileUploaded.Text = checkDoc.OriginalFileName;
}
on the grid I get the first row with correct edit text of "edit" but then the 2nd row is also coming to "edit" in place of "add" and third row I get it correct which is "add". The above code is in item databound event.