Hi,
I currently have a <cfgrid> with a bunch of <cfgridcolumns>. It is bound to a cfc file, so the <cfgridcolumns> would be a column of the recordset obtained from the cfc. I was wondering how would I make it so that if I click on a column, it sorts by another column in the query. Below is the code I have. For example, the last cfgridcolumn has the name set to PercentProfit and if I click on it, it will sort by this column. I want to make it sort by another column.
<cfform name="moneyLost">
<cfgrid name="moneyLostGrid"
format="HTML"
pagesize="30"
selectMode="Row"
colHeaders="true"
colHeaderBold="yes"
width="800"
stripeRows="yes"
stripeRowColor="efefef"
appendKey="no"
bind="cfc:cfc/qry_getmoneylost.grabmoneylost(
{cfgridpage},
{cfgridpagesize},
{cfgridsortcolumn},
{cfgridsortdirection},
{startdate},
{enddate},
{DispensingPharmacyID}
)"
>
<!--- <cfgridcolumn name="CustomerOrderID" header="Customer Order ID" width="150"> --->
<cfgridcolumn name="CustomerOrderID" header="Order ID" href="order_details_url" width="75" select="no" target="_blank">
<cfgridcolumn name="ShippingInvoiceID" header="Shipping ID" width="75">
<cfgridcolumn name="Pharmacy_Name" header="Pharmacy" width="175">
<cfgridcolumn name="TotalRevenues" header="Total Revenues" width="100">
<cfgridcolumn name="TotalCosts" header="Total Costs" type="numeric" width="100">
<cfgridcolumn name="TotalProfity" header="Total Profit" width="125">
<cfgridcolumn name="PercentProfit" header="Percent Profit" width="150" type="numeric">
</cfgrid>
</cfform>
Sincerely,
Jason