How can you remove (or hide) the caption bar in jqgrid?

leora picture leora · Mar 12, 2011 · Viewed 20.7k times · Source

I see you can add a top caption bar and put a title by using this code:

jQuery('#grid').setCaption("Title");

Is there anyway, if I have already set a title, to remove the caption bar?

I tried this but it just removes the text (doesn't remove the whole caption bar).

jQuery('#grid').setCaption("");

Answer

Mujah Maskey picture Mujah Maskey · Mar 12, 2011

if you want hurry, test

$(".ui-jqgrid-titlebar").hide();

or if you have multiple grids, then only hide titlebar of $("#grid"), then do

$("#gview_grid > .ui-jqgrid-titlebar").hide()