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

[Solved] In Hierarchy grid, Child grid show data only one time

0 Answers 16 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.
Mohamed
Top achievements
Rank 2
Mohamed asked on 26 Mar 2013, 04:18 PM
in hierarchy grid the child grid show data only one time 
when i open another record hierarchy it gives me no data

I've put a break point  on the select function of the child grid and this method run only one time

Sometimes when I wait about 20 seconds the child grid of the second record show data but not always

This is a sample code

@(Html.Telerik().Grid<GetCarrierPriceAnalysisByDates_Result>()
 .Name("grdCarrierPrice")
 .DataKeys(dk => dk.Add(u => u.CarrierId))
     .Columns(columns =>
     {       
         columns.Bound(e => e.Description);
         columns.Bound(e => e.Prefix);
         columns.Bound(e => e.FirstPrice);
         columns.Bound(e => e.AvgPrice);
         columns.Bound(e => e.MinPrice);
         columns.Bound(e => e.MaxPrice);
         columns.Bound(e => e.NewPrice);
 
     })
          .DataBinding(recbnd =>
          {
              recbnd.Ajax().Select("SelectCarrierPrices", "Carriers", new
              {
                  CarrierID = CarrierID,
                  D_F = D_F,
                  M_F = M_F,
                  Y_F = Y_F,
                  D_T = D_T,
                  M_T = M_T,
                  Y_T = Y_T
              });
          })
              .ClientEvents(e =>
                  {
                  e.OnRowDataBound("grdCarrierPrice_OnRowDataBound");
                  e.OnError("RaiseMyError");
              })
               
               
                  .DetailView(dv => dv.ClientTemplate(
                        Html.Telerik().Grid<RatesManagerDL.CarrierPricesView>()
                                .Name("grdCarrierPriceDetails<#= CarrierId #>")
                         .Columns(columns =>
                        {
                            columns.Bound(e => e.Description).Title("Description");
                            columns.Bound(e => e.Prefix).Title("Prefix");
                            columns.Bound(e => e.Price);
                        })
                        .DataBinding(recbnd =>
                        {
                            recbnd.Ajax().Select("SelectCarrierPriceDetails", "Carriers", new
                            {
                                CarrierID = "<#= CarrierId #>",
                                D_F = D_F,
                                M_F = M_F,
                                Y_F = Y_F,
                                D_T = D_T,
                                M_T = M_T,
                                Y_T = Y_T,
                                PrefixID = "<#= PrefixId #>"
                            });                           
                        })
                        
                        .Pageable(p =>
                        {
                            p.Enabled(true);
                            p.PageSize(20);
                        })
                        .Filterable(f => f.Enabled(true))
                        .ToHtmlString()
                ))
                 
        .Sortable()
        .Pageable(pg => pg.PageSize(20))
)
Tags
Grid
Asked by
Mohamed
Top achievements
Rank 2
Share this question
or