Error occurred when invoke editor while no editable fields
Posted: Tue Mar 01, 2011 6:54 am
Hello,
When i have editable fields inside any mrt file. and then call " StiViewerConrol.InvokeToolEditorEnable();" from my code. It work fine.
But, if i have no editable fields then call "StiViewerConrol.InvokeToolEditorEnable();", the following error will occured :
Argument Out of Range
Parameter name: index
at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
at Stimulsoft.Report.Components.StiComponentsCollection.get_Item(Int32 index)
at Stimulsoft.Report.Viewer.StiTextEditor.CreateEditor()
at Stimulsoft.Report.Viewer.StiTextEditor.Open()
at Stimulsoft.Report.Viewer.StiSLViewerControl.OpenEditor()
at Stimulsoft.Report.Viewer.StiSLViewerControl.OnToolEditorEnable(EventArgs e)
at Stimulsoft.Report.Viewer.StiSLViewerControl.InvokeToolEditorEnable()
at Simplog.Infrastructure.Documents.DocumentPreviewControl.StiStartEditButton_Click(Object sender, RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
Regards,
Jalal
When i have editable fields inside any mrt file. and then call " StiViewerConrol.InvokeToolEditorEnable();" from my code. It work fine.
But, if i have no editable fields then call "StiViewerConrol.InvokeToolEditorEnable();", the following error will occured :
Argument Out of Range
Parameter name: index
at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
at Stimulsoft.Report.Components.StiComponentsCollection.get_Item(Int32 index)
at Stimulsoft.Report.Viewer.StiTextEditor.CreateEditor()
at Stimulsoft.Report.Viewer.StiTextEditor.Open()
at Stimulsoft.Report.Viewer.StiSLViewerControl.OpenEditor()
at Stimulsoft.Report.Viewer.StiSLViewerControl.OnToolEditorEnable(EventArgs e)
at Stimulsoft.Report.Viewer.StiSLViewerControl.InvokeToolEditorEnable()
at Simplog.Infrastructure.Documents.DocumentPreviewControl.StiStartEditButton_Click(Object sender, RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
Regards,
Jalal