cancel
Showing results for 
Search instead for 
Did you mean: 

How to set check box in iGrid using JavaScript

Former Member
0 Kudos


Hi,

I am passing the query column names dynamically in JavaScript to query object. Display and query are already created. In query template I have only [Param.1]. Display template is configured with query template.

I am able to display iGrid with different column names. I want to set one column as check box depending up on the query value 0 or 1. (In attached picture, I want to display check box for RUSH either checked or unchecked depending upon the column value).

Please tell me how to set check box using JavaScript.

Thanks,

Raman N

Accepted Solutions (1)

Accepted Solutions (1)

sidnooradarsh
Contributor
0 Kudos

Hello Raman,

Please try using below code sample,

document.gridName.getGridObject().setShowColumnAsBoolean(int, boolean)

Where, "int" is your column number and "boolean" value is to set it as Boolean or not, setting it to "true" shows column with checkboxes else not.

Hope this helps!

Regards,

Adarsh

Former Member
0 Kudos

Adarsh,

It is working. After refreshing and update, I added the line. It is working fine. If added before refresh, it is not working.

document.SuperiorOrder.refresh()

document.SuperiorOrder.updateGrid(true)

document.SuperiorOrder.getGridObject().setShowColumnAsBoolean(1, true)

Thanks,

Raman N

swaroop_anasane
Active Contributor
0 Kudos

Hi Raman,

Ideally, this should not happen. What version/SP are your using here?

I would suggest checking the box in layout screen.

Thanks,

Swaroop

Former Member
0 Kudos

Hi,

I am using MII 14.0 SP04. I want to set the check box at runtime depending upon user selection of required data fields. I am doing in JavaScript function.

Your suggestion is for static data fields and in work bench.

Thanks,

Raman N

swaroop_anasane
Active Contributor
0 Kudos

Hi Raman,

This looks like an bug in this case. You might want to upgrade your SP.

Your code works perfectly fine with SP5 Patch 11.

Thanks,

Swaroop

Answers (1)

Answers (1)

swaroop_anasane
Active Contributor
0 Kudos

Hi Raman,

I second Adarsh here.

And also if i remember it correctly, you get this option in igrid layout as well. You can mark it checked.

Best regards,

Swaroop