本文介绍了添加GridTemplateColumn断radgrid控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来这GridTemplateColumn前:

Looks like this before GridTemplateColumn:

和加入GridTemplateColumn后

And after adding GridTemplateColumn

<telerik:GridTemplateColumn HeaderText="Name" HeaderStyle-Width="250" FilterControlWidth="250">                          
    <ItemTemplate>                                          
        <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#" Text='<%# Eval("Name") %>'></asp:HyperLink>
    </ItemTemplate>
</telerik:GridTemplateColumn>

试图执行<一个href=\"http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx?product=tooltip\" rel=\"nofollow\">http://demos.telerik.com/aspnet-ajax/tooltip/examples/targetcontrolsandajax/defaultcs.aspx?product=tooltip

我的radgrid控件:

My RadGrid:

<telerik:RadGrid HorizontalAlign="Center" PageSize="50" ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" CellSpacing="0" AllowFilteringByColumn="false" Skin="Forest" DataSourceID="SqlDataSourceUyeAday" Height="400px" Width="100%" AutoGenerateColumns="False">
    <ClientSettings>
        <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSourceUyeAday">
        <Columns>
            <telerik:GridBoundColumn ItemStyle-CssClass="iceri" DataField="Id" ItemStyle-Width="50" HeaderStyle-Width="50" FilterControlWidth="50" FilterControlAltText="Filter Id column" HeaderText="Id" SortExpression="Id" UniqueName="AdayId">
                <ColumnValidationSettings>

                </ColumnValidationSettings>
            </telerik:GridBoundColumn>

            <telerik:GridTemplateColumn HeaderText="FirstName" SortExpression="FirstName" DataField="FirstName" UniqueName="FirstName" FilterControlAltText="Filter FirstName column" HeaderStyle-Width="250" FilterControlWidth="250">

                <ItemTemplate>

                    <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#" Text='<%# Eval("FirstName") %>'></asp:HyperLink>
                </ItemTemplate>
            </telerik:GridTemplateColumn>

            <telerik:GridDateTimeColumn DataField="Date" HeaderStyle-CssClass="iceriTarih" ItemStyle-CssClass="iceriTarih" FilterControlAltText="Filter Datecolumn" PickerType="DatePicker" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Date" SortExpression="Date" UniqueName="Date" DataType="System.DateTime" ItemStyle-Width="150" HeaderStyle-Width="150" FilterControlWidth="100">
                <ColumnValidationSettings>

                </ColumnValidationSettings>
            </telerik:GridDateTimeColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

这可能是什么原因?

What could be the reason?

推荐答案

显然,这被要求。

<appSettings>
   <add key="vs:EnableBrowserLink" value="false"/>
</appSettings>

从这里开始:
Telerik控制布局问题 - 的Visual Studio 2013

这篇关于添加GridTemplateColumn断radgrid控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 00:22