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

[Solved] DetailView with dropdownlist and row position

2 Answers 99 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.
Steve
Top achievements
Rank 1
Steve asked on 30 Oct 2010, 07:30 PM
Hi,

    I'm using version 2010.2.930 and I have some problems with Master/DetailView.  Before, I used Server binding, but I had some bad issues because it reload the page every time and it was very annoying, so I decided to change my grid to be an Ajax grid with master/detailview.  It works fine except these 2 issues.  I attach the sample project to this post to help you see the problem.  Run the project and click on Usergrid tab to reproduce these issues.

1- When I expand the first row, I see 1 row in my DetailView.  I click on edit button, the column is now a dropdownlist, but the value selected is not right.  It select the first value in the dropdown and not the value supposed to be selected.
2- In this same grid, expand first row to see detailview, click on edit button and you will see that column is shifted right even if I put this line in my View:
events.OnLoad("function(e) { $(this).find('table').css('table-layout', 'fixed'); }");

Thank you very much for your help
Steve

2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 01 Nov 2010, 08:40 AM
Hello Steve,

You can use the following CSS in order to apply fixed layout:

<style>
.t-grid table
{
     table-layout: fixed;
}
</style>

To select the proper option use the OnEdit event of the child grid and the following code:

function OnEdit(e) {
    var $dropdown = $(e.form).find('#Role');
     
    $('<option/>', { text: '<none>', value: -1 })
      .prependTo($dropdown);
 
    $dropdown.val(e.dataItem.Role.RoleId);
}

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
Steve
Top achievements
Rank 1
answered on 05 Nov 2010, 01:07 AM
Hi,

     Thank you very much for your help.  it works.  The layout is not perfectly align however.

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