Custom Files - Options

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
patton77
User
Posts: 1

Custom Files - Options

Post by patton77 »

Hello

I am simply copying and pasting the Custom Files example from the Help section as per below, only changing the table an variable names. Everything works fine, however none of the options work. In particular, I have the issue where if only 1 record exists, the table is displayed vertically rather than traditional horizontally. See code below.

What possibly am I doing wrong in the below example for none of the options to work ?

Thank You

{
var dbhelper = ew_GetConn("DB"); // Create instance of connection by the database id (database variable name)
}
<div class="panel panel-default">
<div class="panel-heading">Out of stock products</div>
@{
var sql = "SELECT playerid, injury, duration FROM [dbo].[MedicalNotes] WHERE STATUSID = 1980";
var options = new Dictionary<string, object>();
options.Add("tablename", new List<string>() {"MedicalNotes"});
options.Add("fieldcaption", true);
options.Add("horizontal", true);

}
@Html.Raw(dbhelper.ExecuteHtml(sql, options)) @* Execute a SQL and show as HTML table *@
</div>


Webmaster
User
Posts: 9427

Post by Webmaster »

The codes look alright. Please make sure that you are using the latest version (2018.0.1). You can debug by writing out the options:

VarDump(options);


Post Reply