0
Reply

Web DataGrid

c_wiley

c_wiley

Aug 31 2004 9:27 AM
3k
Hi, I was trying to toggle an “Edit, Update, Cancel” button (LinkButton) between visible and not visible, I found that I had to add the column dynamically which is what I have done, the problem is I can not get my event handlers to fire for the Edit, Cancel & Update, I tried using the properties window to select my events but that did not work so I tried biding the event manual after I added the new edit column, but I am not sure where I should put it? I just can’t get the edit event to fire? EditCommandColumn edit_field = new EditCommandColumn(); edit_field.ButtonType = ButtonColumnType.LinkButton; edit_field.EditText = "Edit"; edit_field.CancelText = "Cancel"; edit_field.UpdateText = "Update"; edit_field.Visible = true; DataGrid1.Columns.Add(edit_field); DataGrid1.EditCommand += new DataGridCommandEventHandler(this.DataGrid1_EditCommand); DataGrid1.CancelCommand += new DataGridCommandEventHandler(this.DataGrid1_CancelCommand); DataGrid1.UpdateCommand += new DataGridCommandEventHandler(this.DataGrid1_UpdateCommand); Please help, I am rather new to this