case ListItemType.Item:
case ListItemType.SelectedItem:
case ListItemType.AlternatingItem:{
- cell.Controls.Add(CreateButton(ButtonType, EditText, "Edit"));
+ cell.Controls.Add(CreateButton(ButtonType, EditText, "Edit", false));
break;
}
case ListItemType.EditItem: {
- cell.Controls.Add(CreateButton(ButtonType, UpdateText, "Update"));
+ cell.Controls.Add(CreateButton(ButtonType, UpdateText, "Update", true));
cell.Controls.Add(new LiteralControl(" "));
- cell.Controls.Add(CreateButton(ButtonType, CancelText, "Cancel"));
+ cell.Controls.Add(CreateButton(ButtonType, CancelText, "Cancel", false));
break;
}
}
#endregion // Public Instance Methods
#region Private Methods
- private Control CreateButton(ButtonColumnType type, string text, string command) {
+ private Control CreateButton(ButtonColumnType type, string text, string command, bool valid) {
Button b;
LinkButton d;
if (type == ButtonColumnType.LinkButton) {
- d = new LinkButton();
+ d = new ForeColorLinkButton();
d.Text = text;
d.CommandName = command;
+ d.CausesValidation = valid;
return d;
}
b = new Button();
b.Text = text;
b.CommandName = command;
+ b.CausesValidation = valid;
return b;
}
#endregion // Private Methods