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

[Solved] Problem With Editing Parent Grid Direction

0 Answers 71 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.
Issam
Top achievements
Rank 1
Issam asked on 10 Jan 2011, 12:59 PM

I have nested grid using Ajax Binding  .. with RTL direction
the problem is :
When click Edit on Parent Gride the record fields Shifted to the left .. while the editing child grid working fine
any body can help ?

 

<%= Html.ValidationSummary(true) %>
<div >
 <% 
     Html.Telerik().Menu()
        .Name("Menu")
        .Items(menu =>
            
        {
            menu.Add()
           .Text("\t????? ??? ???? ?? ?????? ").Action("Create", "ItemRequest")
           .ImageUrl(Url.Content("~/Content/Icons/OrangeRec.png"))
           .HtmlAttributes(new { style = "font-family :Arial ; font-size : medium ; font-weight :bold ;" });
              
             menu.Add()
             .Text("\t????? ????? ??????? ").Action("Export", "ItemRequest")
           .ImageUrl(Url.Content("~/Content/Icons/OrangeRec.png"))
           .HtmlAttributes(new { style = "font-family :Arial ; font-size : medium ; font-weight :bold ;" });
  
        })
  
        .Render();
                     %>
 </div>
 <br />
 <div >
<%= Html.Telerik().Grid<DeltaERPWebApp.Models.ItemReq.ItemRequestVM>()
        .Name("Requests")
        .DataKeys(c => c.Add(k => k.ItemReqID))
        .Editable(c => c.Enabled(true))
        .Editable(editing => editing.Mode(GridEditMode.PopUp))          
        .Columns(columns =>
        {
            columns.Bound(e => e.ItemReqID).Title("??? ?????").Width(25).ReadOnly().HtmlAttributes(new { style = " text-align:center  ;" }).HeaderHtmlAttributes(new { style = " text-align:center  ;" });
            columns.Bound(e => e.Description).Title("?????????????????").Width(300).HeaderHtmlAttributes(new { style = " text-align:center  ;" });
            columns.Bound(e => e.CreationDate).Title("????? ???????").ReadOnly().Width(100).HtmlAttributes(new { style = " text-align:center  ;" }).HeaderHtmlAttributes(new { style = " text-align:center  ;" });
            columns.Bound(e => e.Priority).Title("???????").Width(100).HtmlAttributes(new { style = " text-align:center  ;" }).HeaderHtmlAttributes(new { style = " text-align:center  ;" });
            columns.Bound(e => e.Status).Title("??????").Width(100).ReadOnly().HtmlAttributes(new { style = " text-align:center  ;" }).HeaderHtmlAttributes(new { style = " text-align:center  ;" });
            columns.Command(commands =>
            {
                commands.Edit();
                commands.Delete();
  
            }).Title("??????")
      .HtmlAttributes(new { style = " text-align:center  ;" })
      .HeaderHtmlAttributes(new { style = " text-align:center  ;" }); 
             
        })
          
        .ClientEvents(events => events.OnRowDataBound("Request_onRowDataBound"))
        .DetailView(details => details.ClientTemplate(
        /*******************************************************************************************************/
                Html.Telerik().Grid<DeltaERPWebApp.Models.ItemReq.ItemRequestDetailVM>()
                    .Name("Items<#= ItemReqID #>")
                    .DataKeys(c => c.Add(k => k.ItemReqDetailID))
                    .Editable(c => c.Enabled(true))
                    .Editable(editing => editing.Mode(GridEditMode.InLine))
                         .ToolBar(commands => commands.Insert().ButtonType(GridButtonType.Text).ImageHtmlAttributes(new { style = "margin-left:0" }))
                    .Columns(columns =>
                    {
                        columns.Bound(o => o.UserItemName).Title("??? ?????????????????????").Width(200)
                                                          .HeaderHtmlAttributes(new { style = " text-align:center  ;" }); 
                        columns.Bound(o => o.ReqQty).Title("?????? ????????").Width(100)
                                                    .HtmlAttributes(new { style = " text-align:center  ;" })
                                                    .HeaderHtmlAttributes(new { style = " text-align:center  ;" }); 
                        columns.Bound(o => o.ApprovedQty).Title("?????? ????????").Width(100).ReadOnly()
                                                         .HtmlAttributes(new { style = " text-align:center  ;" })
                                                         .HeaderHtmlAttributes(new { style = " text-align:center  ;" }); 
                        columns.Command(commands =>
                        {
                            commands.Edit();
                            //commands.Delete();
                            
  
                        }).Title("??????")
                    .HtmlAttributes(new { style = " text-align:center  ;" })
                    .HeaderHtmlAttributes(new { style = " text-align:center  ;" }); 
                         
                    })
                    .ClientEvents(events => events.OnRowDataBound("Items_onRowDataBound"))
                      
                    .DataBinding(dataBinding => dataBinding.Ajax()
                                             .Select("_GetReqItems", "ItemRequest", new { ReqID = "<#= ItemReqID #>" })
                                             .Insert("_InsertItem", "ItemRequest", new { ReqID = "<#= ItemReqID #>" })
                                             .Update("Edit", "ItemRequest"))
                                               
                    .Pageable(c => c.PageSize(5)
                            .Position(GridPagerPosition.Both)
                            .Style(GridPagerStyles.NextPreviousAndNumeric))
                    .Sortable()
                    .Filterable()
                    .Selectable()
                    .ToHtmlString()
  
        ))
        /*******************************************************************************************************/  
                     .DataBinding(dataBinding => dataBinding.Ajax()
                                                 .Select("_GetRequests", "ItemRequest")
                                                 .Update("Edit", "ItemRequest")
                                                 .Delete("Delete", "ItemRequest"))
                                                // .Insert("Create", "ItemRequest"))
  
           
             .Scrollable(scrolling => scrolling.Height(580))
             .Pageable(c => c.PageSize(20)
                                .Position(GridPagerPosition.Both)
                                .Style(GridPagerStyles.NextPreviousAndNumeric))
            .Sortable()
            .Filterable()
            .Selectable()
            .Sortable()
    
    %>

 

 

 

 

 

 

 

 

 

Tags
Grid
Asked by
Issam
Top achievements
Rank 1
Share this question
or