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

Row height increases when going into edit mode

2 Answers 150 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 11 Nov 2010, 04:12 AM
Hi

I am using the demo here to create a grid where the user can do batch updates with double-click inplace editing. Is there some way to remove the extra padding when the textbox is displayed? The problem is the textbox for editing is 19px high, while the label for display is 15px high and this 4px difference causes the row to "bounce" when going into/out of edit mode. This behaviour is also in the demo.

I have tried removing the padding at runtime with jquery in the ShowColumnEditor() function and re-adding it in the HideColumnEditor() function without luck. I can get rid of the bounce by setting the ItemStyle to 29px, but this makes the grid too spaced out and not as attractive.

I am using Internet Explorer 8 and the Vista skin.

Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 11 Nov 2010, 10:21 AM
Hello Jeremy,

Removing the editedCell's top and bottom padding works OK on my side and the rows does not increase its height. Please check your implementation.

function ShowColumnEditor()
{
      editedCell = this;
      //........
     editedCell.style.paddingTop = 0;
     editedCell.style.paddingBottom = 0;
      //.......
}

An alternative approach is to add/remove a custom CSS class. In this way you don't have to know what is the original cell padding.

function ShowColumnEditor()
{
      editedCell = this;
      //........
     editedCell.className = "noPadding";
      //.......
}

.noPadding
{
        padding-top: 0 !important;
        padding-bottom: 0 !important;
}


Greetings,
Dimo
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
Jeremy
Top achievements
Rank 1
answered on 12 Nov 2010, 01:50 AM
Thanks! The first method worked! I was mistakenly trying to get the TD or TR from the editedcell and apply the styles to that. Also the alternative approach doesn't seem to do anything.
Tags
Grid
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Jeremy
Top achievements
Rank 1
Share this question
or