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

[Solved] 2 Edit Columns Being Generated

1 Answer 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris McMahan
Top achievements
Rank 1
Chris McMahan asked on 07 Jan 2010, 08:29 PM
Hello,
I have a Radgrid has one EditCommandColumn and then has columns dynamically generated for it in the Page_Load.  This generating two columns that have the Edit link in them for my data.  

My question is, is this a function of the grid?  If so how can I just limit the grid to generating one Edit column on the left side of the grid.

Here is the asp for my grid.

<telerik:RadGrid ID="RadGrid1" AllowPaging="True" ShowFooter="True" OnNeedDataSource="RadGrid1_NeedDataSource"
            runat="server" AutoGenerateEditColumn="true" AutoGenerateColumns="False" AllowSorting="True" OnItemDataBound="RadGrid1_ItemDataBound"
            GridLines="Both" CellPadding="0" Skin="Office2007" AllowMultiRowSelection="true" OnUpdateCommand="RadGrid1_UpdateCommand" AllowAutomaticUpdates="False">
            <MasterTableView EditMode="InPlace" CommandItemDisplay="Top" ShowFooter="True" AllowFilteringByColumn="True" TableLayout="Fixed">                
                <Columns>      
                    <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" >
                        <HeaderStyle Width="20px" />                        
                    </telerik:GridEditCommandColumn>                                   
                </Columns>                      
            </MasterTableView>
        </telerik:RadGrid>   


Thank you for any help,
Chris McMahan

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Jan 2010, 07:55 AM
Hi Chris,

You have set AutoGenerateEditColumn="true" for radgrid. When we set AutoGenerateEditColumn property to True, table view in the grid automatically insert a GridEditCommandColumn column to column collection.

Set the AutoGenerateEditColumn property to False, for not showing this column.

Regards,
Shinu.
Tags
Grid
Asked by
Chris McMahan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or