I am using version 2009.1 to create a XamWebGrid in my code behind. I set the ItemSource to my datasource which is an Observable Collection. All columns are ReadOnly except for the first column which is a checkbox. The user can check or uncheck this -
The problem is that checking or unchecking seems to be a 2 click process: 1 click to activate the cell & a second click to change the value. How can I set this up so that the user only has to click once?
I have the following settings:
this.ctl_ResultsWebGrid.EditingSettings.AllowEditing = Infragistics.Silverlight.EditingType.Row;
this.ctl_ResultsWebGrid.EditingSettings.IsEnterKeyEditingEnabled = true;
this.ctl_ResultsWebGrid.EditingSettings.IsOnCellActiveEditingEnabled = true;
this.ctl_ResultsWebGrid.EditingSettings.IsF2EditingEnabled = true;
this.ctl_ResultsWebGrid.EditingSettings.IsMouseActionEditingEnabled = Infragistics.Silverlight.MouseEditingAction.SingleClick;
this.ctl_ResultsWebGrid.EnterEditMode();
Hi,
Using the CheckBox column, this isn't really possible, b/c we wanted to be able to support editing events, and if we didn't have this mechanism then we wouldn't know that the cell was entering or exiting edit mode.
However, you can still achieve this using a TemplateColumn with a CheckBox and binding to the IsChecked property. The only thing to note is that it won't participate in the editing events.
-SteveZ
Using a Templatecolumn with a checkbox solves the issue at cell level.. But a similar issue exists when the AllowFiltering mode is set to FilterRowTop (or Bottom)...
The row which allows you to filter shows a checkbox, which when clicked does not apply the filter immediately.... the filter is applied only after the focus from that cell changes..
Any way to resolve this?
The TemplateColumn has two additional properties called FilterItemTemplate and FilterEditorTemplate.
Their DataContext is of type: FilterDataContext:
http://help.infragistics.com/NetAdvantage/Silverlight/2010.3/CLR4.0/?page=InfragisticsSL4.Controls.Grids.XamGrid.v10.3~Infragistics.FilteringDataContext_members.html
So you can bind directly to the value, which should cause it to update immeditately:
<DataTemplate><CheckBox IsChecked={Binding Value, Mode=TwoWay}/></DataTemplate>
Hope this helps,