UltraWebGrid1.Columns[0].Type = Infragistics.WebUI.UltraWebGrid.ColumnType.CheckBox;
UltraWebGrid1.Columns[0].AllowUpdate = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes;
I created a checkbox col with the code above. How can I change the value of the checkbox with C# code?
Set the value of the corresponding cell to a boolean "true" to check the checkbox, and to a boolean "false" to uncheck it.
I tried that and it does not work.
protected void chkAll_CheckedChanged(object sender, EventArgs e)
foreach (UltraGridRow row in UltraWebGrid1.Rows)
}
Make sure that you don't have the grid's built-in AJAX enabled. You can do this by setting the grid's DisplayLayout.LoadOnDemand property to any value other than "Xml" - generally, you'd use "NotSet" to turn off all load-on-demand functionality. The reason for this is that the grid uses a different AJAX framework than used by Microsoft's ASP.NET AJAX Extensions, and the two can't be made compatible.
Alternately, you can replace UpdatePanel with a WebAsyncRefreshPanel. WARP and WebGrid use compatible AJAX frameworks.
If you see the same behavior when the grid's AJAX functionality is off, or when using WARP instead of UpdatePanel, then this will likely require further research. In this situation, I suggest you submit a support request. The best thing you can include is a concise sample project that we can run and debug that reproduces this behavior. A Developer Support Engineer will research your issue using the sample you provide, and will work with you to find a resolution.
OK it does not work when the ckeckbox is within an ajaxupdate panel. The code in the event runs but no change to the checkbox.