cfgrid, checkboxes in non-edit mode
I have a nice data-entry form that works great. I have gotten a simple cfgrid to work nicely, displaying contract articles.
- The cfgrid is read-only. I do not want the user updating this data!
- There are 16 pages of contract articles, from which the user may select up to 10; however, they must select at least 1 article.
- No matter what I try, I cannot get check boxes to appear in the first column of the grid. There's a column there, with my header, but no boxes.
- The current system forces the user to select and save the applicable articles from each page on which they appear. What they want is the ability to click the check box, scroll to the next page (or 7) and select another without having to press Save each time (or leave the pop up window until they have selected all their articles).
- Once the user selects their articles, how do I access their choices?
Here's my code:
The query to populate the grid:
<cfquery datasource="#REQUESTDataSource#" name="articles">
SELECT ArticleName from Articles ORDER BY ArticleNumber
</cfquery>
<cfreturn QueryConvertForGrid(articles, page, pageSize)>
The code that calls the pop-up window:
<cfinput type="button" name="popArticles" onClick="ColdFusion.Window.show('ArtPopUp')
value="Click to select Contract Articles">
The code that opens the window and displays the grid:
<cfwindow name="ArtPopUp" initShow="false" center="true" title="Select Contract Articles">
<cfform>
<cfgrid name="ArticleGrid" format="html" selectonload="false" selectmode="row"
bind="cfc:Functions.GetArticles({cfgridpage}, {cfgridpagesize},
{cfgridsortcolumn}, {cfgridsortdirection})">
<cfgridcolumn name="selectArt" header="Select" select="true" type="boolean"
values="1" display="yes">
<cfgridcolumn name="ArticleName" header="Contract Articles" select="no">
</cfgrid>
</cfform>
</cfwindow>
I've tried SelectMode="edit" with a corresponding "onChange" entry, but that didn't work.
Thank you in advance for your help.