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
245
WebDataGrid with scrollbar, fixed header and rowadding
posted

Hello,
I'm working on a project update from infragistic UI for ASP.NET WebForm version 10.2 to 20.1.
I have some problems with the WebDataGrids for obtain the same graphics of UltraWebGrid.

My Grids should have a fixed size, fixed header, vertical scroll bar and "add new rows" on the last of many rows.

Until now I have attempted to use sizeless WebDataGrid placed inside a DIV with vertical scroll bars (for have a similar "addNewRow" graphics).
But when using fixed header function ( .igg_Header { position: fixed; } ) in css,  I have the following problems:

- After loading, the grid header is covered by the first row (it's displayed only after a click edit on a cell)
- Once displayed, the header covers the first row of the grid.

I've tried to using the JQuery script (as explained here in a old post) to overwrite a padding-top of the first grid <TR>, but the script doesn't seem to change the attribute in html.

<script src="../scripts/jquery-3.5.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $("tbody.igg_Item > tr:first-child td").css("padding-top", "20px");
</script>

The definition of this script is still right?

I use a MasterPage which contains the HEAD tag for many pages containing Grids, where I should load the JQueryScript (* .js) and where I should insert the "header padding correction" scripts?

If I have more than one WebDataGrid on the same page with different graphics (es. header hidden), how I can point to the right grid?

Could you tell me how to proceed?

Thanks!