Technical support This forum is closed.
Version 1.x > Technical support > CMS Document Comparison View modes: 
User avatar
Member
Member
mwaheed - 12/17/2005 4:56:46 PM
   
CMS Document Comparison
Hello, I tried to work with the CMSDocumentComparison1 but it is now working. Here is my code from the Page Load,

string[,] tableParameters = new string[3, 2];

tableParameters[0, 0] = "Item:";
tableParameters[0, 1] = "TaskTitle";
tableParameters[1, 0] = "Description:";
tableParameters[1, 1] = "TaskDetails";
tableParameters[2, 0] = "Hours:";
tableParameters[2, 1] = "hours";

CMSDocumentComparison1.TableParams = tableParameters;

//specify available documents
CMSDocumentComparison1.SelectNodesClassName = "CMS.EstimationItem";
CMSDocumentComparison1.DropDownListColumn = "TaskTitle";

Here is the error i'm getting,

Index was outside the bounds of the array.
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.IndexOutOfRangeException: Index was outside the bounds of the array.

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:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
Kentico.CMS.CMSControls.CMSDocumentComparison.ControlPrerender(Object sender, EventArgs e) +927
System.Web.UI.Control.OnPreRender(EventArgs e) +2066972
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360


Can you please let me know what is wrong here?

thank you
Mohammad

User avatar
Guest
admin - 12/20/2005 5:10:15 PM
   
Re: CMS Document Comparison
Hi Mohammad,

The size of the array must be defined as this:

string[,] tableParameters = new string[4, 4];

Please let me know if it helped.

Best Regards,

User avatar
Member
Member
mwaheed - 12/22/2005 3:13:50 AM
   
Re: CMS Document Comparison
Petr here is my line,

string[,] tableParameters = new string[3, 2];

Your line says the same thing but just have 4, 4. What is missing from my line?

thank you
Mohammad