Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
800
AddNewRow - Can't seem to get padding to 0px
posted

I have tried every way I can find to remove the padding from the top of the addnewrow, but it always stays at 5px.

Here is the source code it creates: <td id="ctl00xbodyxUltraWebGrid1_addBox" align='left' style="overflow:auto;width:100%;padding:5px;" class="ig_1d4d908f_r24">

I want this to be 0!  I have tried overriding the class but even that doesn't works.

Any ideas?

 

  • 28464
    posted

    This can probably be "hacked" with client-side javascript. I see that the ID of the cell holding AddNewRow is the ClientID of the grid plus "_addBox", so you can use something like that in body.onload

    <body onload="fixAddNewRow()">

     

    ...

    <script type="text/javascript">

    function fixAddNewRow()

    {

        var element = document.getElementById("<%= UltraWebGrid1.ClientID %>" + ""_addBox");

        element.style.padding = "0px"; 

    </script>