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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Index Out Of Range

Thread ID:

Created:

Updated:

Platform:

Replies:

39807 Jan 18,2006 03:51 PM UTC Jan 19,2006 01:47 PM UTC Windows Forms 3
loading
Tags: GridControl
jerome
Asked On January 18, 2006 03:51 PM UTC

I try to put CheckBox in the headers of my GridDataBoundGrid. I have 2 nested relation. My Checkbox box are located in the third row, the row of the second relation. I use your example "How to put a checkbox in headers". I can see them, but when i click on one of them i have this Exception: " System.ArgumentOutOfRangeException: L''argument spécifié n''était pas dans les limites de la plage des valeurs valides. Nom du paramètre : rowIndex at Syncfusion.Collections.SFTable.set_Item(Int32 rowIndex, Int32 colIndex, Object value) at Syncfusion.Windows.Forms.Grid.GridRowCollection.set_Item(Int32 rowIndex, Int32 colIndex, GridStyleInfoStore value) at Syncfusion.Windows.Forms.Grid.GridData.set_Item(Int32 rowIndex, Int32 colIndex, GridStyleInfoStore value) at Syncfusion.Windows.Forms.Grid.GridModel.SetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style, StyleModifyType modifyType, Boolean dontRaiseSaveCellInfoEvent, Boolean copyReferenceOnly)" I have to double click on the checkbox to check them, and it takes a long time. Any Ideas? thx. jerome PS: my code private void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e) { if(e.RowIndex==2) { e.Style.CellValueType = typeof(string); if(CheckedHeaders.Contains(e.ColIndex)) e.Style.CellValue = (string) CheckedHeaders[e.ColIndex]; e.Style.CheckBoxOptions = new GridCheckBoxCellInfo(true.ToString(), false.ToString(), "", true); e.Style.CellType = "CheckBox"; e.Style.CellAppearance = GridCellAppearance.Raised; e.Style.Enabled = true; } } private void Model_SaveCellInfo(object sender, GridSaveCellInfoEventArgs e) { if(e.RowIndex==2) { if (e.Style.CellValue!=null) CheckedHeaders[e.ColIndex] = (string) e.Style.CellValue; e.Style.Enabled = true; } }

jerome
Replied On January 18, 2006 03:54 PM UTC

Sorry, i forgot: I m using version 3.3 Regards, jerome

Administrator [Syncfusion]
Replied On January 19, 2006 01:33 PM UTC

Hi Jerome, Try setting Model.Data.RowCount with Model.RowCount after setting the datasource to see if this helps. this.gridDataBoundGrid1.Model.Data.RowCount = this.gridDataBoundGrid1.Model.RowCount; Regards, Calvin.

jerome
Replied On January 19, 2006 01:47 PM UTC

Thx a lot, it works very well, jerome

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;