Hi,
we are trying the evaluating version of dhx Grid.
We need to use it in a .NET environment using your .NET Connector to return data in a JSON format.
We try with this settings:
.NET PAGE:
In our VIEW we have all the references needed by the grid…
[code]<link rel=“STYLESHEET” type=“text/css” href="@Url.Content("~/plugins/dhtmlxGrid/dhtmlxGrid/codebase/dhtmlxgrid.css")" />
[/code]…and the grid initialization:
[code]
[/code]GridConnector.ashx is our Request Handler.
We expect it returns a valid json for Grid. It’s not true, we receive a javascript error on filling!!
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class GridConnector : dhtmlxRequestHandler
{
public override IdhtmlxConnector CreateConnector(HttpContext context)
{
return new dhtmlxDataJsonConnector(
"EXECUTE MY_STOREDPROCEDURE_WITHOUT_PARAMS",
String.Empty,
dhtmlxDatabaseAdapterType.SqlServer2005,
ConfigurationManager.ConnectionStrings["MY_CONNECTION_STRING"].ConnectionString
);
}
}
Using xml as output format, we have no problem to fill the grid:
mygrid.load("@Url.Content("~/RequestHandlers/GridConnector.ashx")");
The class used for this format is dhtmlxGridConnector class instead of dhtmlxDataJsonConnector.
Where is our error?