Custom Function to Align jQGrid Column Headers

/**
  * This Function Changes the Alignment of Column Heading as Desired
  *
  * @author Shiva Bhusal
  *
  * @param tableName Id of table within which jQGrid is to be embedded
  * @param headingName Name of Column Heading
  * @param alignmentType Type of alignment Desired viz, left, center, right
  * @use inside --> loadComplete: function (data) {//Here}
  */
function jQGridAlignHeading(tableName, headingName, alignmentType){
 $('#jqgh_'+tableName+'_'+headingName).css({
          // Style for Alignment and Padding is for Sort-Icon
 'text-align':alignmentType,
 'padding-right':'12px'
 });
 }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s