Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
230
WebDataGrid commit data on ExitingEditMode not always working on BoundCheckBoxField
posted

Hi,

I'm having an issue where ExitingEditMode doesn't trigger if I check a checkbox then click outside of the table.  It seems to work on other types, such as dropdowns and text, however, the checkbox only seems to commit if I click another cell before clicking out of the table.  Any suggestions?

Here's some of the code:

BLOCKED SCRIPT

function WebDataGrid1_CellEditing_ExitingEditMode(sender, eventArgs) {
if (eventArgs.get_browserEvent().keyCode == 9) {
return;
}
else {
sender.get_behaviors().get_editingCore().commit();
}
}

WebDataGrid:

<ig:WebDataGrid ID="WebDataGrid1" runat="server" OnRowUpdating="wdg1_RowUpdating"
OnRowUpdated="wdg1_RowUpdated" OnRowAdding="wdg1_RowAdding" OnRowAdded="wdg1_RowAdded"
OnRowsDeleting="wdg1_RowDeleting" OnRowDeleted="wdg1_RowDeleted"
Width="1000px" Font-Names="Arial" Font-Size="XX-Large" CellSpacing="1" Font-Bold="False"
EnableDataViewState="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
OnInitializeRow="WebDataGrid1_InitializeRow" DataKeyFields="ID">
<Columns>
<ig:BoundDataField DataFieldName="ID" Key="ID" Hidden="true">
<Header Text="ID" />
<Header Text="ID"></Header>
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="CRID" Key="CRID" Hidden="true">
<Header Text="CRID" />
<Header Text="CRID"></Header>
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="RowOrder" Key="RowOrder">
<Header Text="RowOrder" />
<Header Text="Row Order"></Header>
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Item_Description" Key="Item_Description">
<Header Text="Item_Description" />
<Header Text="Item Description"></Header>
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Size" Key="Size">
<Header Text="Size" />
<Header Text="Size"></Header>
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Stock" Key="Stock">
<Header Text="Stock" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Quantity" Key="Quantity">
<Header Text="Quantity" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="English_French_Bilingual" Key="English_French_Bilingual">
<Header Text="Language" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Imprint_1" Key="Imprint_1" >
<Header Text="Imprint 1" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Imprint_2" Key="Imprint_2" >
<Header Text="Imprint 2" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Notes" Key="Notes">
<Header Text="Notes" />
</ig:BoundDataField>
<ig:BoundCheckBoxField DataFieldName="ScopeChange" Key="ScopeChange">
<Header Text="Scope Change" />
</ig:BoundCheckBoxField>
<ig:BoundDataField DataFieldName="DueDate" Key="DueDate" DataType="System.DateTime">
<Header Text="Due Date (MM/DD/YYYY)" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Complete" Key="Complete" DataType="System.DateTime">
<Header Text="Complete (MM/DD/YYYY)" />
</ig:BoundDataField>
<ig:BoundCheckBoxField DataFieldName="PrintLine" Key="PrintLine" ToolTipChecked="This line will now be in the Printer Friendly View">
<Header Text="Include Row for Printing?" Tooltip="Check this if you want it to appear in the Printer Friendly page" />
</ig:BoundCheckBoxField>
</Columns>
<EditorProviders>
<ig:DropDownProvider ID="LanguageDropDownProvider1">
<EditorControl ClientIDMode="Predictable" DataSourceID="SqlDataSource2" DropDownContainerMaxHeight="300px"
EnableAnimations="true" EnableDropDownAsChild="False" DisplayMode="DropDown"
TextField="Items" ValueField="Items" DropDownContainerWidth="75px">
<DropDownItemBinding TextField="Items" ValueField="Items" />
</EditorControl>
</ig:DropDownProvider>
<ig:DropDownProvider ID="SizeDropDownProvider1">
<EditorControl ClientIDMode="Predictable" DataSourceID="SqlDataSource3" DropDownContainerMaxHeight="300px"
EnableAnimations="true" EnableDropDownAsChild="False" DisplayMode="DropDown"
TextField="Items" ValueField="Items" DropDownContainerWidth="75px">
<DropDownItemBinding TextField="Items" ValueField="Items" />
</EditorControl>
</ig:DropDownProvider>
<ig:DropDownProvider ID="StockDropDownProvider1">
<EditorControl ClientIDMode="Predictable" DataSourceID="SqlDataSource4" DropDownContainerMaxHeight="300px"
EnableAnimations="true" EnableDropDownAsChild="False" DisplayMode="DropDown"
TextField="Items" ValueField="Items" DropDownContainerWidth="75px">
<DropDownItemBinding TextField="Items" ValueField="Items" />
</EditorControl>
</ig:DropDownProvider>
<ig:DropDownProvider ID="ImprintDropDownProvider1">
<EditorControl ClientIDMode="Predictable" DataSourceID="SqlDataSource5" DropDownContainerMaxHeight="300px"
EnableAnimations="true" EnableDropDownAsChild="False" DisplayMode="DropDown"
TextField="Items" ValueField="Items" DropDownContainerWidth="75px">
<DropDownItemBinding TextField="Items" ValueField="Items" />
</EditorControl>
</ig:DropDownProvider>
<ig:DropDownProvider ID="ImprintDropDownProvider2">
<EditorControl ClientIDMode="Predictable" DataSourceID="SqlDataSource6" DropDownContainerMaxHeight="300px"
EnableAnimations="true" EnableDropDownAsChild="False" DisplayMode="DropDown"
TextField="Items" ValueField="Items" DropDownContainerWidth="75px">
<DropDownItemBinding TextField="Items" ValueField="Items" />
</EditorControl>
</ig:DropDownProvider>
<ig:DatePickerProvider ID="DatePickerProvider1" >
<EditorControl ClientIDMode="Predictable" runat="server">
<Buttons EnsureFocus="True" InlineRendering="True">
</Buttons>
</EditorControl>
</ig:DatePickerProvider>
<ig:DateTimeEditorProvider ID="WebDataGrid1_DateTimeEditorProvider1">
<EditorControl ClientIDMode="Predictable">
</EditorControl>
</ig:DateTimeEditorProvider>
<ig:TextEditorProvider ID="Notes_TextEdProvider">
<EditorControl ClientIDMode="Predictable">
</EditorControl>
</ig:TextEditorProvider>
</EditorProviders>
<Behaviors>
<ig:Activation />
<ig:EditingCore AutoCRUD="False">
<EditingClientEvents BatchUpdateUndoing="batchUndoing" BatchUpdateUndone="batchUndone" />
<EditingClientEvents BatchUpdateUndoing="batchUndoing" BatchUpdateUndone="batchUndone">
</EditingClientEvents>
<Behaviors>
<ig:CellEditing Enabled="true">
<CellEditingClientEvents ExitingEditMode="WebDataGrid1_CellEditing_ExitingEditMode" ExitedEditMode="WebDataGrid1_CellEditing_ExitingEditMode" />
<ColumnSettings>
<ig:EditingColumnSetting />
<ig:EditingColumnSetting EditorID="LanguageDropDownProvider1" ColumnKey="English_French_Bilingual"></ig:EditingColumnSetting>
<ig:EditingColumnSetting EditorID="SizeDropDownProvider1" ColumnKey="Size"></ig:EditingColumnSetting>
<ig:EditingColumnSetting EditorID="StockDropDownProvider1" ColumnKey="Stock"></ig:EditingColumnSetting>
<ig:EditingColumnSetting EditorID="ImprintDropDownProvider1" ColumnKey="Imprint_1"></ig:EditingColumnSetting>
<ig:EditingColumnSetting EditorID="ImprintDropDownProvider2" ColumnKey="Imprint_2"></ig:EditingColumnSetting>
<ig:EditingColumnSetting EditorID="WebDataGrid1_DateTimeEditorProvider1" ColumnKey="DueDate"></ig:EditingColumnSetting>
<ig:EditingColumnSetting EditorID="WebDataGrid1_DateTimeEditorProvider1" ColumnKey="Complete"></ig:EditingColumnSetting>
<ig:EditingColumnSetting EditorID="Notes_TextEdProvider" ColumnKey="Notes" ValidatorID="rfvNotes" />
</ColumnSettings>
<EditModeActions EnableF2="true" MouseClick="Single" EnableOnKeyPress="True" />
<EditModeActions MouseClick="Single"></EditModeActions>
</ig:CellEditing>
<ig:RowDeleting />
</Behaviors>
</ig:EditingCore>
<ig:Selection CellClickAction="Row" RowSelectType="Single">
</ig:Selection>
<ig:RowSelectors>
</ig:RowSelectors>
</Behaviors>
</ig:WebDataGrid>

Apologies for the for the lack of indentation, it doesn't want to past with formatting, and the indenting in this editor likes indenting full paragraphs

Parents
  • 25665
    Verified Answer
    Offline posted

    Hello,

    Thank you for contacting Infragistics!

    I have looked into your setup and code and this is the expected behavior because the checkbox column never enters or exits edit mode. Instead you can use the cellValueChanged event of the EditingCore client side events.

    Please let me know if you have any further questions concerning this matter.

Reply Children
No Data