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
245
WebHierarchicalDataGrid
posted

I have this WebHierarchicalDataGrid below the user needs to be able to edit data at both the parent and child level. I have the parent level working. At the child level the data that needs to be edited is a dropdown list. I have added the DropDownProvider and set the EditorID. when clicking on the FIRST row in the child I can edit using the dropdown. The remaining rows in the child grid do not present the dropdown list. My parent grid, child grid and dropdown list are being populated by datasets, no issues with data load. Please let me know what I need to do to get all the rows in the child to present the dropdown list for editing. 

<ig:WebHierarchicalDataGrid ID="WHDG" runat="server" Height="350px" Width="400px" DataKeyFields="SecSubjectID" DataMember="t_SecSubject" AutoGenerateBands="False" AutoGenerateColumns="False" InitialDataBindDepth="-1" Key="Band1">
<EditorProviders>
<ig:DropDownProvider ID="WHDG_DropDownProvider1">
<EditorControl DropDownContainerMaxHeight="200px" EnableAnimations="False" EnableDropDownAsChild="False">
</EditorControl>
</ig:DropDownProvider>
</EditorProviders>
<Columns>
<ig:BoundDataField DataFieldName="SecSubjectID" Key="SecSubjectID">
<Header Text="SecSubjectID" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="SecSubjectName" Key="SecSubjectName">
<Header Text="Subject"></Header>
</ig:BoundDataField>
<ig:BoundCheckBoxField DataFieldName="AllowUpdate" Key="AllowUpdate" Width="50px">
<Header Text="Allow Update"></Header>
</ig:BoundCheckBoxField>
<ig:BoundDataField DataFieldName="ShowDeleteOption" Key="ShowDeleteOption">
<Header Text="ShowDeleteOption"></Header>
</ig:BoundDataField>
<ig:BoundCheckBoxField DataFieldName="AllowDelete" Key="AllowDelete" Width="50px">
<Header Text="Allow Delete"></Header>
</ig:BoundCheckBoxField>
</Columns>
<Bands>
<ig:Band DataKeyFields="SecSubjectID" AutoGenerateColumns="false" DataMember="t_SecSubjectField" Key="Band2">
<Columns>
<ig:BoundDataField DataFieldName="SubjectFieldName" Key="SubjectFieldName">
<Header Text="Field Name" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="RestrictType" Key="RestrictType">
<Header Text="RestrictType"></Header>
</ig:BoundDataField>
</Columns>
<Behaviors>
<ig:EditingCore AutoCRUD="false">
<Behaviors>
<ig:CellEditing>
<ColumnSettings>
<ig:EditingColumnSetting ColumnKey="SubjectFieldName" ReadOnly="true" />
<ig:EditingColumnSetting ColumnKey="RestrictType" EditorID="WHDG_DropDownProvider1" />
</ColumnSettings>
</ig:CellEditing>
</Behaviors>
</ig:EditingCore>
</Behaviors>
</ig:Band>
</Bands>
<Behaviors>
<ig:EditingCore AutoCRUD="false">
<Behaviors>
<ig:CellEditing>
<ColumnSettings>
<ig:EditingColumnSetting ColumnKey="SecSubjectName" ReadOnly="true" />
<ig:EditingColumnSetting ColumnKey="ShowDeleteOption" ReadOnly="true" />
</ColumnSettings>
</ig:CellEditing>
</Behaviors>
</ig:EditingCore>
<ig:RowSelectors>
</ig:RowSelectors>
<ig:Selection CellClickAction="Row" RowSelectType="Single" CellSelectType="Single">
</ig:Selection>
</Behaviors>
</ig:WebHierarchicalDataGrid>

Here is the code for the dropdown list:

Dim DDPRT As DropDownProvider = CType(WHDG.EditorProviders("WHDG_DropDownProvider1"), DropDownProvider)
DDPRT.EditorControl.DataSource = dsRT
DDPRT.EditorControl.TextField = "RestrictType"
DDPRT.EditorControl.ValueField = "RestrictType"

Thank you, Pat

Parents
No Data
Reply
  • 1200
    Offline posted

    Hello Pat,

    By looking at the provided code sample, I wasn’t able to determine any issues with it, to me it seems that it should be working as expected. This is the reason why I decided to create a small sample, in order to see if I am able to reproduce the issue you are having. I am using version 21.2 and on my side everything seems to work as expected, the DropDownProvider is set for the child band and each of the child rows has it as its editor provider.

    Attached you will find my sample for your reference. In order to run the sample, all you need to do is add the ig_res folder to it (I have removed it to reduce the size of the zip file). Please test the sample on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve, please feel free to modify it and send it back to me along with steps to reproduce.

    Looking forward to hearing from you.

    Regards,
    Ivan Kitanov

    HierarchicalGridEditorInChildBand.zip

Children
No Data