I am currently using 11.1.20111.2020 and am experiencing an issue with using an unbound checkbox column in a WebDataGrid. When the user checks a box in a row in this column and posts back twice or more, the value is lost on the second post back. Infragistics currently has a sample in the samples section which works correctly. In my situation, the grid is bound based upon selection criteria and via a button click. It is not bound to a datasource object. The ultrawebgrid does not have this issue.
How do I persist the checked value across subsequent postbacks?
Thanks,
I dd the upgrade but issue is not solved; am i missing anything
my checked boxes come back with partial checked image instead of fully checked one
Hi Dave - Yes we will upgrade. For now, I'm just using a template column for the checkbox but it's good that the issue has been resolved in a subsequent release (to get the additional functionality that this column type provides). I'll mark the question as answered as it will take us some time to upgrade.
Thanks again for responding so quickly - it is much appreciated.
Hi Dev_01,
I was able to replicate the problem in build 2020. In a later Service Release, build 2064, this issue appears resolved. Could you please upgrade and verify that?
thanks,Dave
Also - if you edit any of the other fields as well, they too are maintained only on the first post back.
Hi David -
Here is the markup and code behind.
<!—Begin markup -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ig:WebScriptManager ID="wsm1" runat="server" />
<div>
<style type="text/css">
.gridHeader
{
background-color:#4682B4;
color:#FFFFFF;
background-repeat: repeat-x;
background-position: 0 50%;
height: 18px;
border-bottom:solid 1px #D8D8D8;
border-top:solid 1px #D8D8D8;
border-left:solid 1px #D8D8D8;
border-right:solid 1px #D8D8D8;
padding:3px 2px 3px 2px;
border-color:#FFFFFF;
text-align: center;
font-family:"Arial";
font-size:10pt;
}
tbody.igg_ItemIE6 tr td
background-color:White;
border-bottom-color:#D3D3D3;
border-top-color:#D3D3D3;
border-left-color:#D3D3D3;
border-right-color:#D3D3D3;
border-bottom-width:thin;
border-top-width:thin;
border-left-width:thin;
border-right-width:thin;
border-top:solid 2px #D8D8D8;
overflow: hidden;
vertical-align:top;
tbody.igg_Item>tr>td
tbody tr.igg_AltIE6 td
background-color:#FFFFFF;
tbody>tr.igg_Alt>td
.igg_RowSelector
width: 18px;
color:Black;
text-align:center;
vertical-align:middle;
.igg_HeaderRowSelector
.igg_HeaderCaption
font-size: 12px;
font-weight:normal;
padding-left:0px;
.igg_ActiveRowSelector
background-position:left center ;
background-image: url(ig_res/Default/images/arrow_steel_blue.png);
background-repeat: no-repeat;
/*background-color: #8DC6EC;*/
.igg_SelectedRowSelector
background-color: White;
color: #FFFFFF;
.Field_CSS
padding-top:2px;
border-style:solid;
border-width:thin;
height:14px;
width:150px;
.DayTexBox
border-bottom-style:solid;
border-top-style:solid;
border-left-style:solid;
border-right-style:solid;
width:17px;
text-align:right;
.DayDropDownList
width:57px;
</style>
<asp:Button ID="btn1" runat="server" Text="Get Some Data" />
<asp:Button ID="btn2" Text="Just post back" runat="server" />
<ig:WebDataGrid ID="wdg1" runat="server" EnableViewState="true" EnableAjax="false" EnableDataViewState="true" AutoGenerateColumns="false">
<Columns>
<ig:UnboundField Header-CssClass="gridHeader" Header-Text="key" Key="f5" Width="75px" />
<ig:UnboundField Header-CssClass="gridHeader" Header-Text="f0" Key="f0" Width="75px" />
<ig:UnboundField Header-CssClass="gridHeader" Header-Text="f1" Key="f1" Width="75px" />
<ig:UnboundField Header-CssClass="gridHeader" Header-Text="f2" Key="f2" Width="75px" />
<ig:UnboundField Header-CssClass="gridHeader" Header-Text="f3" Key="f3" Width="75px" />
<ig:UnboundCheckBoxField Key="Select" HeaderCheckBoxMode="Off" Header-Text="Select" />
</Columns>
<Behaviors>
<ig:EditingCore AutoCRUD="false">
<ig:RowAdding Enabled="true" />
<ig:CellEditing Enabled="true">
</ig:CellEditing>
</Behaviors>
</ig:EditingCore>
<ig:Activation Enabled="true" ><AutoPostBackFlags ActiveCellChanged="false" /></ig:Activation>
<ig:Selection Enabled="true" ><AutoPostBackFlags CellSelectionChanged="false" RowSelectionChanged="true" /></ig:Selection>
<ig:RowSelectors Enabled="true" />
</ig:WebDataGrid>
</div>
</form>
</body>
</html>
<!—End markup -->
'Begin code behind
Public Class WebForm2
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub BindData()
Dim dt As DataTable = New DataTable()
Dim dr As DataRow
dt.Columns.Add("f5")
dt.Columns.Add("f0")
dt.Columns.Add("f1")
dt.Columns.Add("f2")
dt.Columns.Add("f3")
dr = dt.NewRow()
dr.SetField(0, 0)
dr.SetField(1, 0)
dr.SetField(2, 0)
dr.SetField(3, 0)
dr.SetField(4, 0)
dt.Rows.Add(dr)
dr.SetField(0, 1)
dr.SetField(1, 1)
dr.SetField(2, 1)
dr.SetField(3, 1)
dr.SetField(4, 1)
dr.SetField(0, 2)
dr.SetField(1, 2)
dr.SetField(2, 2)
dr.SetField(3, 2)
dr.SetField(4, 2)
wdg1.DataSource = dt
wdg1.DataBind()
Private Sub btn1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn1.Click
BindData()
Private Sub btn2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn2.Click
'do nothing - just post back.
End Class
'End code behind