Can anyone please look into the code below and let me know how to enable multiple checkboxes checked and include those rows in grd.selected.rows to loop through the selected rows.
private void grdPayVis_InitializeLayout(object sender,InitializeLayoutEventArgs e) {var gridBand = grdPayVis.DisplayLayout.Bands[0];
if(!gridBand.Columns.Exists("Select")) gridBand.Columns.Add("Select", "Select"); gridBand.Columns["Select"].Header.VisiblePosition = 0; gridBand.Columns["Select"].Hidden = false; gridBand.Columns["Select"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox; gridBand.Columns["Select"].AutoSizeMode = ColumnAutoSizeMode.AllRowsInBand; gridBand.Columns["Select"].CellClickAction = CellClickAction.Edit; }
This is a pretty old post, but my guess is that it was probably InitializeRow. A lot of people don't realize that InitializeRow fires when the row is created but also but any value in the row changes. So if you are initializing the state of the CheckBox cell in InitializeRow, you have to be sure to check e.ReInitialize and only do that when it's false.
hi, i am facing something similar, can you please let me know which event was causing issue to you, if you remember
Hello Mike, I figured out and fixed it an event in my grid is causing this issue...now I am able to check multiple checkboxes..
If you can only check one row at a time, then something is wrong. That's not the intended behavior.
It might be because you didn't set the DataType on the column, so it's defaulting to String and can't store a boolean value. Try setting the DataType of the column to typeof(bool).
Also, once you set the DataType, you do not need to set the Style, since the default Style for boolean column is CheckBox.
If that still doesn't help, see if you can put together a small sample project and attach it here and I will be happy to take a look and tell you what's going on.
Hello Mike, Thank you for the reply, but why is that I am unable to check multiple checkboxes at a time, check box on my grid behaves like a radio button..Can you think of anything to fix this behaviour