CFGrid not displaying anything
I have the following code:
I have the following code:
@conners40482221 , to settle matters definitively, I decided to recreate your entire scenario. In doing so, I quickly found the reason why the grid was not displaying anything. The grid code contains the following redundant line
<cfoutput query="getanilist">
That would have resulted in an error. Hence the grid would not have been displayed.
I shall now provide a 100% simulation of your scenario. If you run it you will see that the grid is displayed.
<cfscript>
// Create the initial query,"getanilist", with column names and data types
getanilist = queryNew("ANIID, ANINameID, PhoneNo, Carrier, CSR, SS, CP, Hunt, Response, LineTypeFeat, CustomerUse, AniDate, Cost",
"varchar, integer, varchar, varchar, varchar, varchar, varchar, varchar, varchar, varchar, varchar, date, decimal");
// Add the first row of data
queryAddRow(getanilist, {
ANIID: "12345",
ANINameID: 101,
PhoneNo: "+1-555-123-4567",
Carrier: "AT&T",
CSR: "Jane Doe",
SS: "Active",
CP: "Enabled",
Hunt: "Default",
Response: "Success",
LineTypeFeat: "VoIP",
CustomerUse: "Support",
AniDate: createDate(2025, 9, 4),
Cost: 15.75
});
// Add a second row of data
queryAddRow(getanilist, {
ANIID: "67890",
ANINameID: 102,
PhoneNo: "+1-555-987-6543",
Carrier: "Verizon",
CSR: "John Smith",
SS: "Inactive",
CP: "Disabled",
Hunt: "Overflow",
Response: "Timeout",
LineTypeFeat: "PSTN",
CustomerUse: "Sales",
AniDate: createDate(2025, 8, 20),
Cost: 20.50
});
// Add a third row of data
queryAddRow(getanilist, {
ANIID: "11223",
ANINameID: 103,
PhoneNo: "+1-555-111-2222",
Carrier: "T-Mobile",
CSR: "Lisa Jones",
SS: "Active",
CP: "Enabled",
Hunt: "Default",
Response: "Success",
LineTypeFeat: "VoIP",
CustomerUse: "Marketing",
AniDate: createDate(2025, 7, 15),
Cost: 18.25
});
// Output the query to verify its contents
// writeDump(getanilist);
</cfscript>
<!--- Set the client ID --->
<cfset clientID=1234>
<!--- Display the grid --->
<cfform action="updateinfodone.cfm?needsupdate=ANILIST&clientid=#clientid#" method="POST">
<cfgrid name="grid3" query="getanilist" selectmode="EDIT" delete="Yes" deletebutton="Delete Row" width="690" height="400" format="html">
<cfgridcolumn name="ANIID" display="no">
<cfgridcolumn name="ANINameID" display="no">
<cfgridcolumn name="PhoneNo" header="Phone" headeralign="CENTER">
<cfgridcolumn name="Carrier" header="LEC" headeralign="CENTER">
<cfgridcolumn name="CSR" header="CSR" headeralign="CENTER">
<cfgridcolumn name="SS" header="SS" headeralign="CENTER">
<cfgridcolumn name="CP" header="BTN" headeralign="CENTER">
<cfgridcolumn name="Hunt" header="Hunt" headeralign="CENTER">
<cfgridcolumn name="Response" header="IssueNo" headeralign="CENTER">
<cfgridcolumn name="LineTypeFeat" header="Ln Type/Feat" headeralign="CENTER">
<cfgridcolumn name="CustomerUse" header="Customer Use - - - - " headeralign="CENTER">
<cfgridcolumn name="AniDate" header="LD Carrier" headeralign="CENTER">
<cfgridcolumn name="Cost" header="Cost" headeralign="CENTER" numberformat="_____.__">
</cfgrid>
</cfform>
The output:

Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.