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

Don't show GridTemplateColumn when no ItemTemplate is present

1 Answer 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 17 Nov 2014, 11:20 PM
I need to have a property show up when an item is being edited, but I don't have an ItemTemplate for it. The reason for it, is because I am using GroupByExpressions to show the values of those records. In order to get those properties to show up in Edit mode, here's what I did:

<telerik:GridTemplateColumn HeaderText="Report Period" UniqueName="ReportPeriodName" Visible="False" Display="False">
    <EditItemTemplate>
        <asp:DropDownList runat="server" ID="ddlReportPeriod" AppendDataBoundItems="True">
            <asp:ListItem Text="-- Select Reporting Period --" Value="" />
        </asp:DropDownList>
    </EditItemTemplate>
</telerik:GridTemplateColumn>

But, I can still see that it's rendering a column (but an empty one). What would be a better approach?

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 20 Nov 2014, 02:08 PM
Hello Pavel,

The behavior that you are describing is rather unexpected. Could you please elaborate which version of the controls you are using, so we can test it with the exact version.

Additionally, you could provide the markup and the code-behind of your grid, so we can get a better idea of your exact scenario.

I am looking forward to your reply.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Pavel
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or