When using the dhtmlxConnector.NET in with server side configs, if I call config.AttachFooter() without calling config.AttachHeader(), an exception occurs.
This leads me to have an extra empty header by attaching a blank value in the header which is undesirable
...
config.SetHeader("Item, Quantity, Amount");
config.SetInitWidthsP("50,10,10");
config.SetColAlign(",right,right");
config.SetColTypes("ro,ro,ednroamount");
config.SetColSorting("str,str,int");
config.AttachHeader("Item, Quantity, Amount"); // if this is commented out the exception below occurs
config.AttachFooter(",Total,<strong id='amount_total'>calculating...</strong>");
columnsToRetrieve = "name, quantity, amount";
...
connector = new dhtmlxGridConnector("items",columnsToRetrieve, primaryKey,ConnectionString, extra)
connector.SetConfig(config);
Exception Details
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.ThrowHelper.ThrowArgumentOutOfRangeException() +72
dhtmlxConnectors.dhtmlxGridConfiguration.RenderHeader(IdhtmlxWriter xWriter) +957
dhtmlxConnectors.dhtmlxGridConnector.BeginRenderContent(IdhtmlxWriter xWriter, Int32 TotalRowsCount) +170
dhtmlxConnectors.dhtmlxConnector1.RenderData(IdhtmlxWriter xWriter, DataTable RowsToRender, Int32 TotalRowsCount) +38 dhtmlxConnectors.DataRequest.Render(IdhtmlxWriter xWriter) +797 dhtmlxConnectors.dhtmlxConnector
1.Render(IdhtmlxWriter xWriter) +25
dhtmlxConnectors.dhtmlxConnector`1.RenderResponse(HttpResponse response) +113
dhtmlxConnectors.dhtmlxRequestHandler.ProcessRequest(HttpContext context) +107
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75