Infragistics4.Web.v11.1, Version=11.1.20111.1006
MS .NET Frameword Version 4.0.30319 SP1Rel
In my parent of the WHDG there is a UnboundCheckBoxField in the first column. This checkbox is used to delete the associated data in the row when the Save button is selected. This is done by posting back to the server, using SQL to get the data, put it in a DataSet and bind the DataSet to the WHDG. This all works as expected except the UnboundCheckBoxField. When the page refreshes, the UnboundCheckBoxField is filled in (a black square) instead of the unchecked state. I have tried all the following in the code behind, before binding the new DataSet, without luck. What is going on with this?
whdgOrganize.Rows.Clear()
whdgOrganize.ClearTemplates()
whdgOrganize.GridView.ClearTemplates()
whdgOrganize.GridView.Rows.Clear()
whdgOrganize.GridView.ClearDataSource()
HTML: <ig:UnboundCheckBoxField Key="RemoveDocument" Header-Text="Rem" Width="30px"> </ig:UnboundCheckBoxField>
Hi IntegraSys76,
Have you tried simply setting the value of the cell for the unbound checkbox after the row update has occurred? The unbound values have nothing to do with templates, so those first three lines will not affect the values. Clearing the Rows shouldn't affect values either. I'm surprised ClearDataSource didn't clear out the values of all unbound values, though.
Do you have a full sample?
regards,David Young
I do not have a place to set the value of the unbound checkbox. Here is my grid:
<ig:WebHierarchicalDataGrid ID="whdgOrganize" runat="server" AutoGenerateColumns="False" AutoGenerateBands="False" DataKeyFields="LoanAppEnvelopeDocumentRecID" EnableAjax="false" EnableDataViewState="true" HeaderCaptionCssClass ="GridColumnHeaderNew" Height="400px" InitialDataBindDepth="1" Style="Z-INDEX: 100; LEFT: 20px; POSITION: absolute; TOP: 43px" StyleSetName="Office2007Blue" Width="1070px">
<Columns> <ig:UnboundCheckBoxField Key="RemoveDocument" Header-Text="Rem" Width="30px"> </ig:UnboundCheckBoxField> <ig:BoundDataField DataFieldName="DocumentDescription" Key="DocumentDescription" Header-Text="Document Description" Width="403px" ></ig:BoundDataField> <ig:BoundDataField DataFieldName="LoanAppEnvelopeDocumentRecID" Key="LoanAppEnvelopeDocumentRecID" Hidden ="true"></ig:BoundDataField> </Columns>
<Behaviors> <ig:EditingCore> <EditingClientEvents CellValueChanged="Grid_CellValueChanged" /> <Behaviors> <ig:CellEditing> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="RemoveDocument" ReadOnly="false" /> <ig:EditingColumnSetting ColumnKey="DocumentDescription" ReadOnly="true" /> </ColumnSettings> </ig:CellEditing> </Behaviors> </ig:EditingCore> <ig:Selection Enabled ="true"></ig:Selection> <ig:Activation Enabled="true"></ig:Activation> </Behaviors>
<Bands> <ig:Band Key="LoanAppEnvelopeDocumentSignerSignatureRecID" DataMember="Signature" DataKeyFields="LoanAppEnvelopeDocumentSignerSignatureRecID" AutoGenerateColumns="false"> <Columns > <ig:BoundDataField DataFieldName="SignatureTypeEnumValue" Key="SignatureTypeEnumValue" Header-Text="Signature Type" Width="130px"></ig:BoundDataField> <ig:BoundDataField DataFieldName="SignerRole" Key="SignerRole" Header-Text="Role" Width="25px" ></ig:BoundDataField> <ig:BoundDataField DataFieldName="SignerName" Key="SignerName" Header-Text="Name" Width="260px" ></ig:BoundDataField> <ig:BoundDataField DataFieldName="SignatureFieldName" Key="SignatureFieldName" Header-Text="Reference" Width="445px" ></ig:BoundDataField> <ig:BoundDataField DataFieldName="LoanAppEnvelopeDocumentRecID" Key="LoanAppEnvelopeDocumentRecID" Hidden ="true"></ig:BoundDataField> <ig:BoundDataField DataFieldName="LoanAppEnvelopeSignerRecID" Key="LoanAppEnvelopeSignerRecID" Hidden ="true" ></ig:BoundDataField> <ig:BoundDataField DataFieldName="LoanAppEnvelopeDocumentSignerSignatureRecID" Key="LoanAppEnvelopeDocumentSignerSignatureRecID" Hidden ="true" ></ig:BoundDataField> </Columns> <Behaviors> <ig:EditingCore> <EditingClientEvents CellValueChanged="Grid_CellValueChanged"/> <Behaviors> <ig:CellEditing> <EditModeActions EnableOnActive="true" EnableOnKeyPress ="true" MouseClick="Single"/>
<ColumnSettings> <ig:EditingColumnSetting ColumnKey="SignatureTypeEnumValue" EditorID="ddpSignatureType" ReadOnly ="false"/> <ig:EditingColumnSetting ColumnKey="SignerRole" ReadOnly="true" /> <ig:EditingColumnSetting ColumnKey="SignerName" ReadOnly="true" /> <ig:EditingColumnSetting ColumnKey="SignatureFieldName" ReadOnly="true" /> </ColumnSettings> </ig:CellEditing> </Behaviors> </ig:EditingCore> </Behaviors> </ig:Band> </Bands>
<EditorProviders> <ig:DropDownProvider ID="ddpSignatureType"> <EditorControl ID="ecSignatureType" runat="server" StyleSetName="Office2007Blue" EnableRenderingAnchors="false" ClientEvents-ValueChanged="Grid_CellValueChanged" DisplayMode="DropDownList" DataKeyFields="Value" TextField="Description" ValueField="Value"/> </ig:DropDownProvider> </EditorProviders>
<EmptyRowsTemplate> <div style="text-align:center; "><br/><br/> <img src="../Common/Images/icon_information.gif" style="text-align: center" alt="No elements found."/> No records found. </div> </EmptyRowsTemplate> </ig:WebHierarchicalDataGrid>
Here is my code:
Public Sub PopulateOrganizeTab() Dim envelopes As DataSet = Nothing Try TraceMethodEntryMsg(System.Reflection.MethodInfo.GetCurrentMethod())
envelopes = New DataSet
Using dr As SqlDataReader = BusinessFacade.Externals.DocIT.GetLoanAppEnvelopeOrganize( _ ConfigMgr.Application.LOS_AppConnectionString, _ ConfigMgr.User.ClientRecID, _ ConfigMgr.User.InstitutionRecID, _ CurrentAppRecID, _ LoanAppEnvelopeRecID)
With envelopes .Tables.Add(New DataTable("Document")) .Tables.Add(New DataTable("Signature"))
.Relations.Clear()
.Tables("Document").Load(dr) .Tables("Signature").Load(dr)
Dim documentColumn As DataColumn = .Tables("Document").Columns("LoanAppEnvelopeDocumentRecID") Dim signatureColumn As DataColumn = .Tables("Signature").Columns("LoanAppEnvelopeDocumentRecID")
.Relations.Add(documentColumn, signatureColumn)
End With
whdgOrganize.DataSource = envelopes whdgOrganize.DataBind()
End Using
Finally Me.TraceMethodExitMsg(System.Reflection.MethodInfo.GetCurrentMethod()) End Try
End Sub