Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
CheckBoxes are Disabled in the WebHirarchicalDataGrid,How to Enable it ??
posted

i am Using WHDG, for Parent and Child Relationship. My Checkboxes are Disabled as i didn't want to Disabled them  . Here is My Code:


<ig:WebHierarchicalDataGrid ID="WebHierarchicalDataGrid1" runat="server" AutoGenerateBands="False"
AutoGenerateColumns="False" DataKeyFields="id" DataMember="Module" EnableAjax="False" InitialExpandDepth="-1" InitialDataBindDepth="-1"
Height="350px" Width="900px">
<Columns>
<ig:BoundDataField DataFieldName="id" Hidden="true" DataType="System.Int32" Key="id" Width="100px">
<Header Text="Module ID" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Item" DataType="System.String" Key="Item">
<Header Text="Module Description" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Data" Hidden="true" DataType="System.String" Key="Data">
<Header Text="Operations" />
</ig:BoundDataField>
<ig:BoundCheckBoxField DataFieldName="View" DataType="System.Boolean" Key="View">
<Header Text="View" />
</ig:BoundCheckBoxField>
<ig:BoundCheckBoxField DataFieldName="Update" DataType="System.Boolean" Key="Update">
<Header Text="Update" />
</ig:BoundCheckBoxField>
<ig:BoundCheckBoxField DataFieldName="Delete" DataType="System.Boolean" Key="Delete">
<Header Text="Delete" />
</ig:BoundCheckBoxField>
<ig:BoundCheckBoxField DataFieldName="Save" DataType="System.Boolean" Key="Save">
<Header Text="Save" />
</ig:BoundCheckBoxField>
</Columns>
<Bands>
<ig:Band AutoGenerateColumns="False" DataKeyFields="Item" DataMember="TRN_CODE" Key="ChildBand_0">
<Columns>
<ig:BoundDataField DataFieldName="id" Hidden="true" DataType="System.Int32" Key="idCh">
<Header Text="Child ID" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Item" DataType="System.String" Key="ItemCh">
<Header Text="Child Item" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Data" Hidden="true" DataType="System.String" Key="DataCh">
<Header Text="Child Data" />
</ig:BoundDataField>
<ig:BoundCheckBoxField DataFieldName="ChView" DataType="System.Boolean" Key="ChView">
<Header Text="View" />
</ig:BoundCheckBoxField>
<ig:BoundCheckBoxField DataFieldName="ChUpdate" DataType="System.Boolean" Key="ChUpdate">
<Header Text="Update" />
</ig:BoundCheckBoxField>
<ig:BoundCheckBoxField DataFieldName="ChDelete" DataType="System.Boolean" Key="ChDelete">
<Header Text="Delete" />
</ig:BoundCheckBoxField>
<ig:BoundCheckBoxField DataFieldName="ChSave" DataType="System.Boolean" Key="ChSave">
<Header Text="Save" />
</ig:BoundCheckBoxField>

</Columns>
<Behaviors>

</Behaviors>
</ig:Band>
</Bands>
<Behaviors>
<ig:Selection CellClickAction="Row" CellSelectType="None" RowSelectType="Single">
</ig:Selection>
<ig:Activation>
</ig:Activation>
</Behaviors>
</ig:WebHierarchicalDataGrid>

  • 1080
    Offline posted

    Hello,

    Thank you for posting in our community.

    In order to change the states of the checkboxes, the CellEditing behavior has to be enabled.

    <Behaviors>
    	<ig:Selection CellClickAction="Row" CellSelectType="None" RowSelectType="Single">
    	</ig:Selection>
    	<ig:Activation>
    	</ig:Activation>
    	<ig:EditingCore EnableInheritance="true">
    		<Behaviors>
    			<ig:CellEditing EnableInheritance="true">
    			</ig:CellEditing>
    		</Behaviors>
    	</ig:EditingCore>
    </Behaviors>

    I have attached a small sample for your reference. Please test it on your side and let me know whether it helps you achieve your requirement.

    18264.Sample.zip