We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

System.ArgumentOutOfRangeException in syncfusion GridDataBoundGrid?

Has anyone got the same exception?

System.ArgumentOutOfRangeException
at

Syncfusion.Collections.SFTable.set_Item(Int32 rowIndex, Int32 colIndex, Object value)

at Syncfusion.Windows.Forms.Grid.GridModel.SetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style, StyleModifyType modifyType, Boolean dontRaiseSaveCellInfoEvent, Boolean copyReferenceOnly)

at Syncfusion.Windows.Forms.Grid.GridModel.ChangeCells(GridRangeInfo range, GridStyleInfo[] cellsInfo, StyleModifyType modifyType)

at Syncfusion.Windows.Forms.Grid.GridModel.ChangeCells(GridRangeInfo range, GridStyleInfo cellInfo, StyleModifyType modifyType)

at Syncfusion.Windows.Forms.Grid.GridFilterBar.WireGrid(GridDataBoundGrid grid, GridStyleInfo style)




5 Replies

HA haneefm Syncfusion Team January 24, 2008 07:17 PM UTC

Hi Keping,

Is it possible for you to upload us more details/sample or modify the browser sample to reproduce the issue here? This will help us to analyse the issue further.

The limitations on the GridFilterBar are:

1) Its grid must have a DataTable as its datasource (will not work with a DataView datasource)
2) It requires special handling to manage foreign key combo columns (requires a derived GridFilterBar)
3) If the Type (as in System.Type) of your column entries are numerical, some of the custom operators do not apply.
4) There is also a problem with date formats trying to match up with the raw values obtained from the datasource.

If you can provide more information, we can try to suggest some solution.

Best Regards,
Haneef



KW Keping Wu January 24, 2008 10:52 PM UTC

Hi Haneef,

Thanks for response. Much appreciated.

I think that there's an invalid column is inserted in GridDataBoundGrid.

int colIndex = GridDataBoundGrid.Binder.ColIndexToField(e.ColIndex);
GridBoundColumn column = GridDataBoundGrid.Binder.InternalColumns[colIndex];

The colIndex return from the binder is actually an invalid index for InternalColumns. It's equal to the count of the InternalColumns which caused the ArguemntOutOfRangeException.



HA haneefm Syncfusion Team January 28, 2008 10:07 PM UTC

Hi Keping,

Thank you for your information. Please let us know if you have any further queries, we will be glad to assist you.

Best regards,
Haneef



KW Keping Wu February 5, 2008 02:06 AM UTC

I think the problem is caused by syncfusion 6.0. When we bind master-detail view to GridDataBoundGrid, GridDataBoundGrid adds an extra column which was not happened in 4.4.

This extra column made our UI inconsistent. At the moment, we have to hide the extra column mannually like following:

namespace SyncGrid6
{
internal class MyGrid : GridDataBoundGrid
{
public MyGrid()
{
Model = new MyModel();
}
}

internal class MyModel : GridDataBoundGridModel
{
protected override void OnQueryColWidth(GridRowColSizeEventArgs e)
{
if (e.Index == ColCount && string.IsNullOrEmpty(this[0, e.Index].Text))
{
e.Size = 0;
e.Handled = true;
}
}
}
}

Can you provide a patch for this issue or give us a proper solution?

THANKS!



JS Jeba S Syncfusion Team February 10, 2008 01:47 PM UTC

Hi Keeping,

Sorry for the delay in response.

Issue: In GridDataBoundGrid extra column added at the last column in hierarchy view.

The above issue is suspected to be a defect . Could you please create a separate Direct-Trac incident with the Forum id as subject?

Example: F71264-In GridDataBoundGrid extra column added at the last column in hierarchy view.

We will provide details regarding the fix in the Direct-Trac incident.

Regards,
Jeba.




Loader.
Live Chat Icon For mobile
Up arrow icon