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

enable grid delete button during inplace edit mode

5 Answers 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 18 Nov 2008, 05:39 PM
When the grid renders, I am displaying all items in edit mode (inplace).  The grid's source is a table and I am additionally adding an "AutoGeneratedDeleteColumn".  I would like to display all of the "Delete" link buttons while in edit mode.  Thanks.......Ken

5 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 18 Nov 2008, 06:25 PM
Hello Ken,

It is possible to use a regular GridButtonColumn as easier way to achieve the desired functionality.
<telerik:GridButtonColumn Text="Delete" UniqueName="myDeleteColumn" CommandName="Delete"
</telerik:GridButtonColumn> 
 

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ken
Top achievements
Rank 1
answered on 18 Nov 2008, 07:47 PM
Daniel,

Thanks for the advice. I have added a grid button column as you suggested and the column is showing when the grid renders.  However the link button is not showing up for each item.  There must be a step for the button that I am missing.  I have included the code behind where I create the column.  Can you help?

 

GridButtonColumn deleteColumn = new GridButtonColumn();

 

 

 deleteColumn.ButtonType =

GridButtonColumnType.LinkButton;

 

 

 deleteColumn.UniqueName =

"myDeleteColumn";

 

 

 deleteColumn.HeaderText =

"Delete Item";

 

 

 deleteColumn.Text =

"Delete";

 

 

 deleteColumn.CommandName =

"Delete";

 

 

 

if (!IsPostBack)

 

 

 {

gvStaParam.MasterTableView.Columns.Add(deleteColumn);

}

Thanks.....Ken

 

 

0
Shinu
Top achievements
Rank 2
answered on 19 Nov 2008, 04:39 AM
Hi Ken,

Try setting the EditMode to EditForms and see whether the delete button is appearing.

ASPX:
<MasterTableView DataSourceID="SqlDataSource1"  EditMode="EditForms" > 
                   


Shinu
0
Ken
Top achievements
Rank 1
answered on 19 Nov 2008, 06:58 PM
Thanks for your reply.

When I set the edit mode to 'Edit Forms' the link did display properly......however that does not do me any good, because I would like the edit mode to be 'In Place'.

I have opened a support ticket for this issue.

Thanks....Ken



0
Daniel
Telerik team
answered on 21 Nov 2008, 03:43 PM
Hello Ken,

Please check the attached example and let me know whether it helps.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Ken
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Ken
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or