PDA

View Full Version : freeze pane in cfgrid as in excel:1st column will be locked while scrolling horizonta



sarahmfr
21 Jan 2011, 12:54 PM
I would like to know how to lock my first column of a cfgrid so that it will not move while scrolling horizontally.
I want to use the ext js build in version with coldfusion 9.

Thanks

aconran
21 Jan 2011, 3:49 PM
sarahmfr -

Take a look at the Locking Grid Column example shipped in our SDK.
http://dev.sencha.com/deploy/dev/examples/grid/locking-grid.html

This user extension is not supported in the cfgrid component tag library shipped with CF. You will need to use native JavaScript to integrate this into your page.

sarahmfr
22 Jan 2011, 6:43 PM
Thanks a lot.
But I have a problem some of my columns are automatically generated i.e. first two columns are id, name but the rest of the columns are hw1, hw2,etc. according on how many homeworks for this class are in my database.


<cfform>

<cfgrid name="xxxxx"
pagesize="5"
format="html"
selectmode="edit"
delete="yes"
deletebutton="Delete"
autowidth="yes"
colheaderbold="yes"
picturebar="yes"
sort="no"
bind="cfc:xxxxx({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},1)"
onchange="xxxxx ({cfgridaction},
{cfgridrow},
{cfgridchanged})">

<cfgridcolumn name="ID"
header="ID"
display="false">

<cfgridcolumn
name="Name"
header="Name"
width="100" select="no">

<cfoutput query="xxxxx">
<cfgridcolumn
name="_#hw#"
header="#hw#<br/> >

</cfoutput>



</cfgrid>


</cfform>


</cffunction>