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

[Solved] The command column disabled the row expansion in Master/Detail Grid

6 Answers 60 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.
David
Top achievements
Rank 1
David asked on 31 Oct 2010, 04:56 AM
Hello,
I am doing a feasible study for using telerik in my customer's project. We have some complicated logic that the requires editing inside the master/detail grid.

However I may encounter a bug/issue
  • When I add the edit command in the grid (either in the master or detail), the master page row expansion was disabled. (I can't extend the master row and go to the detail grid anymore.)
  • As long as I remove the edit command, the row expand start working immediately.

I attahced a screenshot that show the 2 page behavior.
One with edit command button without row expansion
One without edit command (I simply comment out the edit command column) but row expansion work just fine.

Thanks in advance for any suggestion,
David

Html.Telerik().Grid<CCF.Models.Employee>(Model)
           .Name("Employee")
           .Columns
           (columns =>
           {
               columns.Bound(e => e.FirstName).Width(200);
               columns.Bound(e => e.HireDate).Width(200);
               columns.Bound(e => e.Title).Width(200);
  
               columns.Command(commands =>
               {
                  // commands.Edit();
                  // commands.Delete();
               }).Title("Commands");
  
           }
            )
             
           .DetailView(view => view.Template(e =>
               {
                     
                   Html.Telerik().Grid<CCF.Models.Order>(e.Orders)
                       .Name("Orders_" + e.EmployeeID)
                       .DataKeys(keys => keys.Add(o => o.OrderID))
                       .DataBinding(db => db.Server()
                           .Select("Index", "Employee")
                           .Insert("EmployeeInsert", "Employee")
                           .Update("EmployeeUpdate", "Employee")
                           .Delete("EmployeeDelete", "Employee"))
                       .ToolBar(commands => commands.Insert())
                       .Columns
                       (columns =>
                       {
                           columns.Bound(o => o.OrderID).Width(200);
                           columns.Bound(o => o.OrderDate).Width(200);
                           columns.Bound(o => o.ShipAddress).Width(200);
                           columns.Bound(o => o.Employee.FirstName).Width(200);
                           columns.Command(commands =>
                           {
                               //commands.Edit();
                               //commands.Delete();
                           }).Title("Commands");
  
                       }
                        )
                       .Editable(editing => editing.Mode(GridEditMode.InLine))
                       .Pageable(p => p.PageSize(3))
                       .Sortable(s=>s.Enabled(true))
                       .Filterable(f=>f.Enabled(true))
                       .Render();
               }))
                 
           .ToolBar(commands => commands.Insert())
           .DataKeys(keys => keys.Add(e => e.EmployeeID))
           .DataBinding(db => db.Server()
               .Select("Index", "Employee")
               .Insert("EmployeeInsert", "Employee")
               .Update("EmployeeUpdate", "Employee")
               .Delete("EmployeeDelete", "Employee"))
            .Editable(editing => editing.Mode(GridEditMode.InLine))
            .Pageable(p => { p.Enabled(true); p.PageSize(5); })
            .Sortable(s => s.Enabled(true))
            .Filterable(f => f.Enabled(true))
            .Render();

6 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 01 Nov 2010, 07:47 AM
Hi David,

 There was a bug which caused similar side effects. I suggest you try the service pack release. It is attached to this forum thread.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
David
Top achievements
Rank 1
answered on 01 Nov 2010, 06:02 PM
Hi Atanas,

I am afraid that the service doesn't work.  I forget to mention in my original post that I am using the 10/25 Beta release. I guess that should already contain the Sep hotfix.

But anyway, I did apply the hotfix and confirmed that it didn't work.

Thx,
David
0
Atanas Korchev
Telerik team
answered on 02 Nov 2010, 08:06 AM
Hi David,

 Unfortunately I cannot reproduce this problem. I am sending my test project. What is different in your case?

All the best,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
David
Top achievements
Rank 1
answered on 02 Nov 2010, 08:32 PM
Hi Atanas,
Thank you for investigating my problem. You don't know how much appreciate I have for your help.

I tried your sample applcation. It works. However, mine is also simple enough. So I attached my project for your review.
When you check my project here are a few things you may like to know
  • I use the sample db from sql server, northwind (customer,order, order_detail). Please chanage the connection string to your local sql host.
  • You can check out my customer controller and the index page and you should be able to repro.
  • As long as I enable the edit, not only the detail expand not working. But the row selectable stop functional.
  • In your sample, the detail expand sign is a + icon but mine is a triangle. I didn't change css though.
  • In your sample, when I click the edit button in the detail view, what I got is that the row collaped and hide the detail edit row. I have to expand the master row and find the detail edit row.  I was hoping that the grid will remember the position of the last expansion. So we don't need to expand the master row one more time for the editing.

I have upload my project through the support ticket. Ticket # is 362941.

Thx,
David

0
David
Top achievements
Rank 1
answered on 02 Nov 2010, 08:56 PM
Hi Atanas,

I am almost sure that the problem is caused by the subtle script variance between you and me. If you copy your controller/view/model to my project. I can repro the exact issue.

I eyeballed my script folder and your script folder. We have similar files but apparently you are using a version subfolder. Not sure if that will the the root cause.

Thx,
David
0
David
Top achievements
Rank 1
answered on 03 Nov 2010, 02:16 AM
Hi Atanas,

I confirm that it is caused by the variance of the js file in script folder. But I didn't boil down which file. (I am new to JQuery).
Now the only issue exisitng is the master row collapse issue when edit in the embeded detail row.

Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
David
Top achievements
Rank 1
Share this question
or