Checkbox in CFgrid
i have cfgrid bind component , have column shows checkbox, problem checkbox not showing, cannot use selectmode="edit" read in websites showing check box because gave me error:
if bind attribute specified editable html grid, onchange attribute must specified.
that code cfgrid:
<cfgrid format="html" pagesize="10" name="mygrid" preservepageonsort="true" sort="false" striperows="true"
bind="cfc:marketing.newsfunction({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgrid sortdirection})" >
<cfgridcolumn name="newsid" width="20" header="id">
<cfgridcolumn name="startdate" width="155" header="start date">
<cfgridcolumn name="title" width="460" header="news title name">
<cfgridcolumn name="checked" header="select" width="500" select="yes" type="boolean" display="yes">
</cfgrid>
i appreciate help.
we've been there before in these forums. problem isn't onchange thing. i'll show 1 way take care of in mo.
the challenge find way add checkbox column html grid, using cfgridcolumn tag. tried, in vain. hope else come new idea.
the workaround found use queryaddcolumn dynamically add boolean column query (in case, query in method newsfunction) before cfform accesses it. boolean column becomes checkbox gridcolumn.
you can solve onchange problem, including dummy method in marketing cfc. add this
<cffunction name="editnews" access="remote" output="false">
<cfargument name="gridaction">
<cfargument name="gridrow">
<cfargument name="gridchanged">
<!--- dummy function: empty functionality --->
</cffunction>
and define cfgrid onchange event as
onchange="cfc:marketing.editnews({cfgridaction},{cfgridrow},{cfgridchanged})"
More discussions in ColdFusion
adobe
Comments
Post a Comment