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

can radgrid have more than 1 GridEditCommandColumn?

3 Answers 212 Views
Grid
This is a migrated thread and some comments may be shown as answers.
blue
Top achievements
Rank 1
blue asked on 21 Jul 2010, 12:54 PM
Hi,

Can radgrit have more than 1 GridEditCommandColumn?

I already have 1 GridEditCommandColumn where I would display a sub section when clicked. But I need another GridEditCommandColumn because I have to have another sub section to display.

So for my radGrid, the GridEditCommandColumn A will show section A, and GridEditCommandColumn B will show section B.

However, I get an error when I put two GridEditCommandColumn. Is there a work around for this?


Please see attached pic for the example scenario.

3 Answers, 1 is accepted

Sort by
0
john
Top achievements
Rank 1
answered on 22 Jul 2010, 07:43 AM
Up for this query same case/concern with blue, I am using C# 3.5 for this implementation. Thanks
0
john
Top achievements
Rank 1
answered on 22 Jul 2010, 04:58 PM
Up Please help...Thanks
0
Radoslav
Telerik team
answered on 26 Jul 2010, 10:41 AM
Hello John,

The RadGrid does not support adding multiple GridEditCommandColumns. To achieve the desired functionality concerning having two buttons which fires edit command you could try using two GridButtonColumns with CommandName = "Edit":
<Columns>
  <telerik:GridButtonColumn UniqueName="Add" CommandName="Edit" ButtonType="PushButton" Text="Add">
  </telerik:GridButtonColumn>
  <telerik:GridButtonColumn UniqueName="AddEmployee" CommandName="Edit" ButtonType="PushButton" Text="Add Employee">
  </telerik:GridButtonColumn>
</Columns>

or you could try changing the ID of the GridEditCommandColumn's link button:
void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
       GridDataItem item = e.Item as GridDataItem;
       (item["GridEditCommandColumnUniqueName"].Controls[0] as LinkButton).ID = "LinkButton1";
    }
}

Please give it try and let me know if you experience any problems.

Kind regards,
Radoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
blue
Top achievements
Rank 1
Answers by
john
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or