Anyone suggest why
e.Layout.Bands(0).AddNewRow.RowStyle.Height = System.Web.UI.WebControls.Unit.Pixel(10)
doesn't work when I place it in my web grid initialize layout procedure? When I click add new row button, the new row is much higher than 10 pixels.
Hi,
I tested this and found the same issue. For some reason the RowHeightDefault is overwriting this style setting for the new row. When the add new row button is clicked, it adds a new row on the client side. The AfterRowInsert event can be handled on the client side and the styling of the new row can be changed. The code should be similar as follows:
function uwgNewRooms_AfterRowInsertHandler(gridName, rowId, index)
{
//Add code to handle your event here.
var row = igtbl_getRowById(rowId);
row.Element.style.height = '10px';
}
This works fine. I'm not sure why the server side styling is not working. I'm doing more research on this and will get back to you.
I hope it helps.
Thanks
Sarita