Page 1 of 1

Custom Files - Options

Posted: Sat Mar 17, 2018 6:39 am
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>


Re: Custom Files - Options

Posted: Sat Mar 17, 2018 11:08 am
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);