VAR SECTROW = ""
Var selectobject;
Function Editcell (thisoBject, Type)
{
VAR ID = thisobject.id;
Var buttonid = "Button" Type;
Var row = id.replace (buttonid, "");
IF (Type == 1 && SELECTROW.LENGTH> 0 && selectObject! = NULL)
{
Editrow (SELECTROW, 2, SELECTOBJECT);
SELECTROW = "";
}
IF (type == 1) {selectrow = row; select} else {selectrow = ""; selectObject = null;
Editrow (Row, Type, thisObject);
}
Function Editrow (Row, Type, thisObject)
{
VAR Visible1 = "None";
VAR Visible2 = "inline";
IF (Type! = 1)
{
Visible1 = "inline";
Visible2 = "none";
}
Var buttonid = "Button" Type;
VAR style;
Var i;
For (i = 1; i <8; i )
{
VAR name1 = row "img" i;
Document.all [name1] .GetaTRibute ("style"). Display = visible1;
Name1 = ROW "text" i;
Var name2 = row "checkbox" i;
Document.all [name2] .getattribute ("style"). Display = visible2;
IF (Type! = 1)
{
IF (Document.all [Name1] .value == 1)
Document.all [Name2] .checked = true;
Else
Document.all [Name2] .checked = false;
}
}
Var tdindex = thisObject.parentelement.cellindex;
IF (Type> 1) TDINDEX = TDINDEX -1;
ThisObject.parentelement.parentelement.cells [tdindex] .gettribute ("style"). Display = visible2;
Thisobject.parentelement.colspan = type;
VAR name;
Name = row buttonid;
Document.all [name] .getattribute ("style"). Display = "none";
IF (Type == 1)
{
Document.all [name] .parentelement.parentelement.getaTRibute ("style"). BackgroundColor = "lightyellow"; name = row "button2";
Document.all [name] .GetaTRibute ("style"). Display = "inline";
}
Else
{
Document.all [name] .parentelement.parentelement.getaTribute ("style"). BackgroundColor = ""
Name = row "button1";
Document.all [name] .GetaTRibute ("style"). Display = "inline";
}
}
Script>
Width = "100%" allowpaging = "true"> ask: BOUNDCOLUMN> ask: BOUNDCOLUMN> Itemtemplate> asp: templateColumn> Itemtemplate> asp: templateColumn> Itemtemplate> ask: templateColumn> Itemtemplate> asp: templateColumn> Itemtemplate> asp: templateColumn> Itemtemplate> asp: templateColumn> Itemtemplate> asp: templateColumn> asp: buttoncolumn>
οnclick = "editcell (this, 2);" Type = "Button" value = "Cancel" runat = "server"> Itemtemplate> asp: templateColumn> Columns> ask: DataGrid>