cancel
Showing results for 
Search instead for 
Did you mean: 

iGrid Column width

Former Member
0 Kudos

Hi,

In my iGrid,I have 5 static columns as BatchNo.,Drop DateTime,Date Time,Drop Qty,Moisture

and several columns which are dynamically created.

I want to hide the Date Time which is my third column on certain condition.I am using

document.iGrid.getGridObject().setColumnWidth(3,0);

but it is not working.

Just to check I also tried using document.iGrid.getGridObject().setColumnWidths(0);,but this is also not working.

What can be the problem.

I am also using

document.iGrid.getGridObject().setColumnHeadings(NEWVALUE); to set the column headings.

Thanks,

Anuj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anuj,

Hope you r doing gud.

for setColumnWidths function you have to set widths for all the columns

example : if you have 5 columns and you want to hid 3rd one then


document.iGrid.getGridObject().setColumnHeadings("Col1,Col2,Col3,Col4,Col5");
document.iGrid.getGridObject().setColumnWidths("10,10,0,10,10");

Thanks

Anshul

Edited by: Anshul Sahu on Jun 23, 2011 11:12 AM

Former Member
0 Kudos

Hi Anshul,

Thanks.

It is working now.I have used document.iGrid.getGridObject().setColumnWidths("VALUES");

Can you please help me with the use of document.iGrid.getGridObject().setColumnWidth(INDEX,NEWVALUE); too.

Thanks,

Anuj

Former Member
0 Kudos

Hi,

I have tested following code to set width of first column to 0.

document.AppletName.getGridObject().setColumnWidth(0,0);

To update this on your grid you can call

document.AppletName.updateGrid(true);

Regards,

Manoj Bilthare

Former Member
0 Kudos

try to use


	document.iGrid.getGridObject().setColumnHeading(1,"Col1")
	document.iGrid.getGridObject().setColumnWidth(1,20)

here 1 is index of column

and to hide 3rd column you can use


	document.iGrid.getGridObject().setColumnWidth(3,0)
        document.iGrid.updateGrid(true);

thanks

Anshul

Edited by: Anshul Sahu on Jun 23, 2011 11:28 AM

Edited by: Anshul Sahu on Jun 23, 2011 11:29 AM

Former Member
0 Kudos

Hi,

Manoj,I tried the way you suggested,but it is still not working.

Anshul,your method is also not working.

Anyways,my requirement is fulfilled by using document.iGrid.getGridObject.setColumnWidths(NEWVALUE);

Thanks,

Anuj

Answers (0)