Hi,
I am using infragistics web datagrid. I have set auto generate columns to false. And adding 20 blank rows to the grid from code behind. Then using javascript method to loop through all columns all rows to set the values of each column.
eg: grid.get_rows().get_row(i).get_cell(0).set_value(false);
There is one checkbox column on grid. If the value of the column is false; When the grid is loaded first time it displays blank checkbox. But when a postback occurs, the checkbox UI is changed to partial. (blue filled checkbox). When I do grid.get_rows().get_row(i).get_cell(0).get_value() it shows correctly, i.e. false. but not sure why it shows partial.
Hello,
Is the checkbox column unbound or bound? What is the grid configuration - markup and code behind? The best way for us to assist you is if you provide a small isolated sample that we can run and use for debugging locally.
Here is the markup in aspx page.
<ig:WebDataGrid ID="gridTimeSheet" HeaderCaptionCssClass="ColumnWidthCustom" runat="server" Height="400px" Width="100%" AutoGenerateColumns="False" DataKeyFields="RowIndex" EnableDataViewState="True"> <ClientEvents KeyDown="gridTimeSheet_KeyDown" KeyUp="gridTimeSheet_KeyUp" DoubleClick="gridTimeSheet_dblClick" KeyPress="gridTimeSheet_KeyPress"/> <Behaviors> <ig:RowSelectors RowNumbering="true"></ig:RowSelectors> <ig:EditingCore Enabled="true" BatchUpdating="true"> <Behaviors> <ig:CellEditing> <CellEditingClientEvents ExitedEditMode="gridTimeSheet_CellEditing_ExitedEditMode" ExitingEditMode="gridTimeSheet_CellEditing_ExitingEditMode" EnteredEditMode="gridTimeSheet_CellEditing_EnteredEditMode" /> <EditModeActions MouseClick="Single" EnableOnKeyPress="true" /> </ig:CellEditing> </Behaviors> </ig:EditingCore> <ig:Activation> <AutoPostBackFlags ActiveCellChanged="false" /> </ig:Activation> <%-- <ig:Selection CellClickAction="Row" RowSelectType="Single"> <SelectionClientEvents RowSelectionChanged="gridTimeSheet_RowSelectionChanged" /> </ig:Selection>--%> </Behaviors> </ig:WebDataGrid>
Then the columns are added from codebehind. following code is used to add normal text column.
Dim colTS As Infragistics.Web.UI.GridControls.BoundDataField colTS = New Infragistics.Web.UI.GridControls.BoundDataField colTS.Key = strKey colTS.Header.Text = strName colTS.Width = intSize gridTS.Columns.Add(colTS)
'Set Behaviors Dim colSetting As New EditingColumnSetting colSetting.ColumnKey = strKey colSetting.ReadOnly = Not bEditable gridTS.Behaviors.EditingCore.Behaviors.CellEditing.ColumnSettings.Add(colSetting)
And following code is used to add checkbox column.
Dim colTS As BoundCheckBoxField colTS = New BoundCheckBoxField colTS.Key = strKey colTS.Header.Text = strName colTS.Width = intSize gridTS.Columns.Add(colTS)
'Set Behaviors Dim colSetting As New EditingColumnSetting colSetting.ColumnKey = strKey colSetting.ReadOnly = Not bEditable
gridTS.Behaviors.EditingCore.Behaviors.CellEditing.ColumnSettings.Add(colSetting)
After this empty datatable of 20 rows is bound to the grid. The data for the grid is added to a json variable & it is assigned to each row on document.ready. using set_value function.
Hope this helps, I will try to create a working sample by tom.
Thanks for all the help.
Looking forward for your isolated runnable sample.