Radgrid 和 RadFormDecorator
我有一个使用 Telerik Q1 2009 控件的 ASP.NET 应用程序。我有一个母版页,母版页中有一个 FormDecorator 控件。在我的 ASPX 页面中,我有一个 RadGrid,具有以下定义:
<telerik:RadGrid ID="gridExclusions" runat="server" AllowPaging="True" AllowSorting="True"
GridLines="None" AutoGenerateColumns="False" PageSize="5">
<MasterTableView>
<Columns>
<telerik:GridTemplateColumn>
<ItemTemplate> <asp:Button runat="server" ID="btnEdit" Text="Delete"
CommandName="SelectSelect" CommandArgument='<%#GetEmployeeExID(DataBinder.Eval(Container,"DataItem")) %>'
/>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Date" AllowFiltering="true">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<%#GetExDate(DataBinder.Eval(Container, "DataItem"))%>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Exclusion?" AllowFiltering="true">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<%#GetExclusionFlag(DataBinder.Eval(Container, "DataItem"))%>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Reason" AllowFiltering="true">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<%#GetReason(DataBinder.Eval(Container, "DataItem"))%>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Paid?" AllowFiltering="true">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<%#GetPaidStatus(DataBinder.Eval(Container, "DataItem"))%>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<HeaderContextMenu>
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</HeaderContextMenu>
<PagerStyle Mode="NextPrevAndNumeric" />
<FilterMenu>
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
</telerik:RadGrid>
我还有一个刷新此 radgrid 的按钮:
Me.txtExcludeDate.Clear()
Me.gridExclusions.Rebind()
Me.txtExcludeDate.Focus()
问题是,当我按下按钮刷新它时,它工作正常,除了 radgrid 内的按钮似乎失去其 Web20 外观和感觉。它看起来像一个普通的按钮。有什么想法吗?
I have an ASP.NET application using the Telerik Q1 2009 controls. I have a masterpage, which has a FormDecorator control in the master page. In my ASPX page, I have a RadGrid, with the following definition:
<telerik:RadGrid ID="gridExclusions" runat="server" AllowPaging="True" AllowSorting="True"
GridLines="None" AutoGenerateColumns="False" PageSize="5">
<MasterTableView>
<Columns>
<telerik:GridTemplateColumn>
<ItemTemplate> <asp:Button runat="server" ID="btnEdit" Text="Delete"
CommandName="SelectSelect" CommandArgument='<%#GetEmployeeExID(DataBinder.Eval(Container,"DataItem")) %>'
/>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Date" AllowFiltering="true">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<%#GetExDate(DataBinder.Eval(Container, "DataItem"))%>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Exclusion?" AllowFiltering="true">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<%#GetExclusionFlag(DataBinder.Eval(Container, "DataItem"))%>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Reason" AllowFiltering="true">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<%#GetReason(DataBinder.Eval(Container, "DataItem"))%>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Paid?" AllowFiltering="true">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<%#GetPaidStatus(DataBinder.Eval(Container, "DataItem"))%>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<HeaderContextMenu>
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</HeaderContextMenu>
<PagerStyle Mode="NextPrevAndNumeric" />
<FilterMenu>
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
</telerik:RadGrid>
I also have a button that refreshes this radgrid:
Me.txtExcludeDate.Clear()
Me.gridExclusions.Rebind()
Me.txtExcludeDate.Focus()
The problem is, when I push the button to refrsh it, it works fine, except the button inside the radgrid seems to lose its Web20 Skin Look and Feel. It looks like a normal button. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
RadGrid 如何更新?是使用 Ajax 还是全页刷新?
如果您使用 Ajax(或部分页面更新),RadFormDecorator 可以自动重新设计表单元素的外观,但您需要确保正确配置 DecorationZones。看一下这个演示,看看是否有帮助:
http: //demos.telerik.com/aspnet-ajax/formdecorator/examples/partialpageupdates/defaultcs.aspx
尝试一下,看看是否有帮助。如果您可以提供有关单击按钮时发生的情况的更多信息,这也会很有帮助。
How is the RadGrid being updated? Is it using Ajax or full page refreshes?
If you're using Ajax (or, partial page updates), the RadFormDecorator can automatically re-skin the form elements, BUT you need to make sure you configure your DecorationZones correctly. Have a look at this demo to see if it helps:
http://demos.telerik.com/aspnet-ajax/formdecorator/examples/partialpageupdates/defaultcs.aspx
Give that a try and see if it helps. If you can provide more information about what's happening when you click your buttons, that will also be helpful.
当您迁移到 2009 年第 2 季度发布的 RadControls for ASP.NET AJAX 时,这种差异是否仍然存在?如果是这样,最好在 Telerik 论坛或支持系统中报告该问题以获得补丁。
迪克
Does this discrepancy remain when you move to the Q2 2009 release of RadControls for ASP.NET AJAX? If so, it would be best if you report the issue in the Telerik forums or support system to get a patch for it.
Dick