This is a migrated thread and some comments may be shown as answers.

Grid's edit command column edit text

1 Answer 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Neepa
Top achievements
Rank 1
Neepa asked on 21 Nov 2014, 02:02 PM
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.

1 Answer, 1 is accepted

Sort by
0
Neepa
Top achievements
Rank 1
answered on 24 Nov 2014, 02:07 PM
can somebody please let me know whether is it a bug in radgrid or my code is not correct.  I tried using the breakpoints, it assigns it correct based on logic but when the grid is displayed it is not correct.
Tags
Grid
Asked by
Neepa
Top achievements
Rank 1
Answers by
Neepa
Top achievements
Rank 1
Share this question
or