I am using the new BoundCheckBoxField and I want it to postback each time the checkbox is clicked so I can update the database.
Is this possible?
I really don't want to have an "update" button anywhere and this is the ONLY column in the grid that is editable.
Hello,
I have also noticed that this issue is fixed by development (Issue ID# 82029) and updates should be merged in next service release. Here is a link to service release schedule:
<http://ko.infragistics.com/support/service-releases.aspx#ServiceReleases>
Update me if you have any further questions with this matter.
That worked. Thanks.
Hi,
You appear to be correct about that. I believe that is a bug. You should be able to force it to commit with this code after calling editingCore.commit();
var eventArgs = new $IG.CancelBehaviorEventArgs(editingCore);
eventArgs._props[1] =grid._enableAjax ? 2 : 1;
grid._raiseClientEventEnd(eventArgs);
I will submit a bug about this.
-Dave
Okay, it appears that commit does not work when the grid is set to EnableAjax="False"
I have disabled Ajax because my grid is inside of an update panel and I use that for Ajax instead of the Grid so that I can use a common AjaxProgressIndicator and I have outside items that effect the grid (such as a pagesize chooser).
How can I make commit work with EnableAjax set to false?
<ig:EditingCore AutoCRUD="False"> <EditingClientEvents CellValueChanged="whdgPEPs_Editing_CellValueChanged" CellValueChanging="whdgPEPs_Editing_CellValueChanging" /> <Behaviors> <ig:CellEditing> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="ProjectNumber" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="PrjResp" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="Status" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="DueDate" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="StatusChangeBy" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="StatusChangeDate" ReadOnly="True" /> <ig:EditingColumnSetting ColumnKey="ClientName" ReadOnly="True" /> </ColumnSettings> </ig:CellEditing> </Behaviors></ig:EditingCore>
ClientSide:
function whdgPEPs_Editing_CellValueChanging(grid, eventArgs){ ///<param name="eventArgs" type="Infragistics.Web.UI.CancelCellValueChangeEventArgs"></param>
var cell = eventArgs.get_cell(); var row = cell.get_row();
var isPM = row.get_cellByColumnKey('PrjResp').get_text() == 'PM';
if (!isPM) { eventArgs.set_cancel(true) }}
function whdgPEPs_Editing_CellValueChanged(grid, eventArgs){ ///<param name="eventArgs" type="Infragistics.Web.UI.CellValueChangedEventArgs"></param>
var editingCore = grid.get_behaviors().get_editingCore();
editingCore.commit();}
Server Side:
protected void whdgPEPs_RowUpdated(object sender, RowUpdatedEventArgs e){
}
protected void whdgPEPs_RowUpdating(object sender, RowUpdatingEventArgs e){ long pepID = (long)e.Row.DataKey[0];
tblPEP_Master pep = tblPEP_Master.GetRecord(pepID);
if (pep != null) { pep.Confidential = (bool)e.Row.Items[(int)GridColumns.Confidential].Value; tblPEP_Master.Update(pep); }}