Add Html text to igGrid output

Answered (Not Verified) This post has 0 verified answers | 1 Reply | 2 Followers Thread's RSS feed.

spimichael
Points 410
Replied On: Wed, Feb 22 2012 3:34 PM Reply

I would like to know if I can add additional html elements to the output of the igGrid? I want to add an action link to the top of the grid, not inside the grid but outside the grid.


Thanks

  • Post Points: 20

All Replies

Answered (Not Verified) Replied On: Thu, Feb 23 2012 3:53 AM Reply

hi,

all ui components have specific CSS classes assigned to them, so you can use jQuery selectors in order to locate those elements, and append any content you'd like.

For example if i have paging, and I would like to add a link to the top of the pager, i can do this:

$(".ui-iggrid-toolbar").append("some html");

you can additionally target those with an extra selector for the grid ID, suffixed by _container, in order to avoid doing this for multiple grid which may be on the page:

$("#grid1_container .ui-iggrid-toolbar").append("some html");

Hope it helps,

Angel

  • Post Points: 5
Page 1 of 1 (2 items) | RSS