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

[Solved] Filter has transparent background in nested grids?

0 Answers 11 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shannon
Top achievements
Rank 1
Shannon asked on 10 May 2012, 10:21 PM
I have the following Razor code below.
It declares a main grid with nested grids inside of tree controls.  The filters on the nested grids show up with transparent backgrounds which is undesirable as it shows the data from the rowset below the filter mixed into the filter control.

Any ideas on how to style the filters in the nested grids?

<PRE style="background: white; color: black; font-family: Consolas;"><SPAN style="background: yellow;">@{</SPAN>     Html.Telerik().Grid(Model)         .Name(<SPAN style="color: magenta;">"AccountsGrid"</SPAN>)         .DataKeys(dk => dk.Add(o => o.Account_ID))         .Columns(col =>                      {                          col.Bound(o => o.Account_ID);                          col.Bound(o => o.Last_Update)                              .Width(200);                      })          .DataBinding(db => db.Ajax().Select(<SPAN style="color: magenta;">"_SelectAccounts"</SPAN>, <SPAN style="color: magenta;">"Account"</SPAN>))          .Pageable(p => p.Enabled(<SPAN style="color: blue;">true</SPAN>).PageSize(<SPAN style="color: blue;">int</SPAN>.Parse(<SPAN style="color: rgb(43, 145, 175);">ConfigurationManager</SPAN>.AppSettings[<SPAN style="color: magenta;">"defaultPageSize"</SPAN>])).Position(<SPAN style="color: rgb(43, 145, 175);">GridPagerPosition</SPAN>.Bottom).Style(<SPAN style="color: rgb(43, 145, 175);">GridPagerStyles</SPAN>.NextPreviousAndNumeric))          .Filterable()          .Sortable()          .ClientEvents(evt =>               {                  evt.OnRowDataBound(<SPAN style="color: magenta;">"AccountRowDataBound"</SPAN>);               }                 )         .DetailView(detail => detail.ClientTemplate(             Html.Telerik().TreeView()             .Name(<SPAN style="color: magenta;">"Account_<#= Account_ID #>_Tree"</SPAN>)             .ShowLines(<SPAN style="color: blue;">false</SPAN>)             .Items(tr =>              {                 tr.Add()                     .Text(<SPAN style="color: magenta;">"Applications"</SPAN>)                     .LinkHtmlAttributes(<SPAN style="color: blue;">new</SPAN> { style = <SPAN style="color: magenta;">"color:#000000;"</SPAN> })                     .Content(@Html.Telerik().Grid<<SPAN style="color: rgb(43, 145, 175);">ApplicationViewModel</SPAN>>()                                     .DataKeys(dk => dk.Add(o => o.Application_ID))                                     .Name(<SPAN style="color: magenta;">"Applications_<#= Account_ID #>"</SPAN>)                                     .Columns(col =>                                     {                                         col.Bound(o => o.Name);                                         col.Bound(o => o.Description);                                         col.Bound(o => o.Last_Update);                                         col.Bound(o => o.Disabled)                                             .ClientTemplate(<SPAN style="color: magenta;">"<#if(Disabled){#>Yes<#}else{#>No<#}#>"</SPAN>)                                             .HtmlAttributes(<SPAN style="color: blue;">new</SPAN> { @class = <SPAN style="color: magenta;">"insight-center-nopad"</SPAN> })                                             .Width(75);                                     })                                     .DataBinding(db => db.Ajax().Select(<SPAN style="color: magenta;">"_SelectApplications"</SPAN>, <SPAN style="color: magenta;">"Account"</SPAN>, <SPAN style="color: blue;">new</SPAN> { accountId = <SPAN style="color: magenta;">"<#= Account_ID#>"</SPAN> }))                                     .Pageable(p => p.Enabled(<SPAN style="color: blue;">true</SPAN>).PageSize(<SPAN style="color: blue;">int</SPAN>.Parse(<SPAN style="color: rgb(43, 145, 175);">ConfigurationManager</SPAN>.AppSettings[<SPAN style="color: magenta;">"defaultPageSize"</SPAN>])).Position(<SPAN style="color: rgb(43, 145, 175);">GridPagerPosition</SPAN>.Bottom).Style(<SPAN style="color: rgb(43, 145, 175);">GridPagerStyles</SPAN>.NextPreviousAndNumeric))                                     .Filterable()                                     .Sortable()                                     .ClientEvents(evt => { evt.OnRowDataBound(<SPAN style="color: magenta;">"ApplicationRowDataBound"</SPAN>); })                                     .DetailView(appDetail => appDetail.ClientTemplate(                                             Html.Telerik().TreeView()                                             .Name(<SPAN style="color: magenta;">"AppTree_<#= Application_ID#>"</SPAN>)                                             .Items(sub =>                                             {                                                 sub.Add()                                                     .Text(<SPAN style="color: magenta;">"Modules"</SPAN>)                                                     .LinkHtmlAttributes(<SPAN style="color: blue;">new</SPAN> { style = <SPAN style="color: magenta;">"color:#000000;"</SPAN> })                                                     .Content(<SPAN style="background: yellow;">@<text></SPAN>                                                                   <SPAN style="background: yellow;">@(</SPAN>                                                                     Html.Telerik().Grid<<SPAN style="color: rgb(43, 145, 175);">ModuleViewModel</SPAN>>()                                                                     .Name(<SPAN style="color: magenta;">"Modules_<#= Application_ID#>"</SPAN>)                                                                     .DataBinding(db => db.Ajax().Select(<SPAN style="color: magenta;">"_SelectApplicationModules"</SPAN>, <SPAN style="color: magenta;">"Account"</SPAN>, <SPAN style="color: blue;">new</SPAN> { applicationId = <SPAN style="color: magenta;">"<#= Application_ID#>"</SPAN> }))                                                                     .Pageable(p => p.Enabled(<SPAN style="color: blue;">true</SPAN>).PageSize(<SPAN style="color: blue;">int</SPAN>.Parse(<SPAN style="color: rgb(43, 145, 175);">ConfigurationManager</SPAN>.AppSettings[<SPAN style="color: magenta;">"defaultPageSize"</SPAN>])).Position(<SPAN style="color: rgb(43, 145, 175);">GridPagerPosition</SPAN>.Bottom).Style(<SPAN style="color: rgb(43, 145, 175);">GridPagerStyles</SPAN>.NextPreviousAndNumeric))                                                                     .Filterable()                                                                     .Sortable()                                                                        .ClientEvents(evt =>{evt.OnRowDataBound(<SPAN style="color: magenta;">"ModuleRowDataBound"</SPAN>);})                                                                   <SPAN style="background: yellow;">)</SPAN>                                                               <SPAN style="background: yellow;"></text></SPAN>);                                                 sub.Add()                                                     .Text(<SPAN style="color: magenta;">"Users"</SPAN>)                                                     .LinkHtmlAttributes(<SPAN style="color: blue;">new</SPAN> { style = <SPAN style="color: magenta;">"color:#000000;"</SPAN> })                                                     .Content(<SPAN style="background: yellow;">@<text></SPAN>                                                                   <SPAN style="background: yellow;">@(</SPAN>                                                                     Html.Telerik().Grid<<SPAN style="color: rgb(43, 145, 175);">UserListViewModel</SPAN>>()                                                                     .Name(<SPAN style="color: magenta;">"Users_<#= Application_ID#>"</SPAN>)                                                                     .DataBinding(db => db.Ajax().Select(<SPAN style="color: magenta;">"_SelectApplicationUsers"</SPAN>, <SPAN style="color: magenta;">"Account"</SPAN>, <SPAN style="color: blue;">new</SPAN> { applicationId = <SPAN style="color: magenta;">"<#= Application_ID#>"</SPAN> }))                                                                     .Pageable(p => p.Enabled(<SPAN style="color: blue;">true</SPAN>).PageSize(<SPAN style="color: blue;">int</SPAN>.Parse(<SPAN style="color: rgb(43, 145, 175);">ConfigurationManager</SPAN>.AppSettings[<SPAN style="color: magenta;">"defaultPageSize"</SPAN>])).Position(<SPAN style="color: rgb(43, 145, 175);">GridPagerPosition</SPAN>.Bottom).Style(<SPAN style="color: rgb(43, 145, 175);">GridPagerStyles</SPAN>.NextPreviousAndNumeric))                                                                             .Filterable()                                                                     .Sortable()                                                                              .ClientEvents(evt => { evt.OnRowDataBound(<SPAN style="color: magenta;">"UserRowDataBound"</SPAN>); })                                                                     <SPAN style="background: yellow;">)</SPAN>                                                               <SPAN style="background: yellow;"></text></SPAN>);                                             }).ToHtmlString()                                     )).ToHtmlString()                                         );                 tr.Add()                     .Text(<SPAN style="color: magenta;">"Account Only Users"</SPAN>)                     .LinkHtmlAttributes(<SPAN style="color: blue;">new</SPAN> { style = <SPAN style="color: magenta;">"color:#000000;"</SPAN> })                     .Content(<SPAN style="background: yellow;">@<text></SPAN>                                                        <SPAN style="background: yellow;">@(</SPAN>                                     Html.Telerik().Grid<<SPAN style="color: rgb(43, 145, 175);">UserListViewModel</SPAN>>()                                           .Name(<SPAN style="color: magenta;">"AccountUsers_<#=Account_ID#>"</SPAN>)                                            .DataBinding(db => db.Ajax().Select(<SPAN style="color: magenta;">"_SelectAccountOnlyUsers"</SPAN>, <SPAN style="color: magenta;">"Account"</SPAN>, <SPAN style="color: blue;">new</SPAN> { applicationId = <SPAN style="color: magenta;">"<#=Account_ID#>"</SPAN> }))                                           .Pageable(p => p.Enabled(<SPAN style="color: blue;">true</SPAN>).PageSize(<SPAN style="color: blue;">int</SPAN>.Parse(<SPAN style="color: rgb(43, 145, 175);">ConfigurationManager</SPAN>.AppSettings[<SPAN style="color: magenta;">"defaultPageSize"</SPAN>])).Position(<SPAN style="color: rgb(43, 145, 175);">GridPagerPosition</SPAN>.Bottom).Style(<SPAN style="color: rgb(43, 145, 175);">GridPagerStyles</SPAN>.NextPreviousAndNumeric))                                           .Filterable()                                           .Sortable()                                           .ClientEvents(evt =>                                             {evt.OnRowDataBound(<SPAN style="color: magenta;">"UserRowDataBound"</SPAN>);})                                                                 <SPAN style="background: yellow;">)</SPAN>                               <SPAN style="background: yellow;"></text></SPAN>);             }).ToHtmlString()             ))             .Render(); <SPAN style="background: yellow;">}<BR><BR>)</SPAN></PRE>
Tags
Grid
Asked by
Shannon
Top achievements
Rank 1
Share this question
or