Hi,
I have requirement of adding a dropdown provider in Edit mode in child bands.
The dropdown provider comes in the parent row but is not coming in 2nd and 3rd child bands.
Please assist.
PFB the sample aspx code.
<ig:WebHierarchicalDataGrid ID="igWHGCommon" runat="server" ViewStateMode="Enabled"
EnableDataViewState="True" EnableAjax="False" EnableAjaxViewState="False" AutoGenerateBands="False"
HeaderCaptionCssClass="gridHeader" AutoGenerateColumns="False" DataKeyFields="UniqueId"
InitialDataBindDepth="3" ClientIDMode="Static" Width="99.1%" Height="410px">
<EmptyRowsTemplate>
<div align="center" style="width: 100%">
No Data Found</div>
</EmptyRowsTemplate>
<ClientEvents Click="ClickHandler" MouseUp="WebHierarchicalDataGridMouseDown" />
<Bands>
<ig:Band DataMember="ListofDispatchLog" Key="DispatchLogUniqueId" DataKeyFields="UniqueId"
AutoGenerateColumns="false">
<Columns>
<ig:BoundDataField Key="DispatchStatus" Header-Text="Status" DataFieldName="Status"
Width="200px">
<Header Text="Status"></Header>
</ig:BoundDataField>
</Columns>
<Behaviors >
<ig:EditingCore>
<Behaviors>
<ig:CellEditing>
<ColumnSettings>
<ig:EditingColumnSetting ColumnKey="DispatchStatus" EditorID="igDispatchStatus" />
</ColumnSettings>
</ig:CellEditing>
</Behaviors>
</ig:EditingCore>
<ig:Band DataMember="ActivityLog" Key="ActivityLogUniqueId" DataKeyFields="UniqueId"
<ig:BoundDataField Key="GenerateStatus" Header-Text="Status" DataFieldName="Status"
<ig:EditingColumnSetting ColumnKey="GenerateStatus" EditorID="igGenerateStatus" />
</ig:Band>
</Bands>
<ig:BoundDataField Header-Text="Status" Key="Status" DataFieldName="Status" Width="200px">
<ig:EditingCore AutoCRUD="true">
<EditingClientEvents CellValueChanging="EnableDisableCheckbox" />
<CellEditingClientEvents EnteringEditMode="EnableDisableEditing" />
<ig:EditingColumnSetting ColumnKey="Status" EditorID="igWDDStatus" ReadOnly="true" />
<ig:Selection CellClickAction="Cell" RowSelectType="Single">
</ig:Selection>
<ig:Filtering Enabled="true">
</ig:Filtering>
<ig:Sorting Enabled="true">
</ig:Sorting>
<ig:ColumnResizing Enabled="true">
</ig:ColumnResizing>
<ig:ColumnMoving Enabled="true">
</ig:ColumnMoving>
<EditorProviders>
<ig:DropDownProvider ID="igWDDStatus">
<EditorControl ID="DropdownProviderStatus" runat="server" DisplayMode="DropDownList"
Width="180px">
<AutoPostBackFlags ValueChanged="Async" />
</EditorControl>
</ig:DropDownProvider>
<ig:DropDownProvider ID="igDispatchStatus">
<EditorControl ID="DropdownProviderDispatchStatus" runat="server" DisplayMode="DropDownList"
Width="180px" EditorID="igDispatchStatus">
<ig:DropDownProvider ID="igGenerateStatus">
<EditorControl ID="DropdownProviderGenerateStatus" runat="server" DisplayMode="DropDownList"
</EditorProviders>
<GroupingSettings GroupAreaCssClass="TextAlignCenter" EnableColumnGrouping="True"
InitialRowExpandState="Collapsed" GroupAreaVisibility="Visible" EmptyGroupAreaText="Drag a column header here to group by that column."
GroupByAreaLocation="Top">
</GroupingSettings>
</ig:WebHierarchicalDataGrid>
Regards,
Nilesh
Hello Team,
It has been two days that I am waiting for the reply.
Please revert me back ASAP, as we have a scheduled deliverables next week.
Hello Nilesh,
Your markup seems to be correct. Can you provide me with a sample which I can run and try to figure what is causing the issue, and the exact version of controls you are using.
Thank you.
Hi Nikolay,
My above mentioned problem is solved.
I am facing one more issue.
In my WHDG, i have 3 child bands. I am using Manual Load On Demand.
I have checkbox in the first column at parent row and all child bands.
When i click my parent row checkbox, my requirement is to expand all 3 child bands and display.
On Init event of page i am assigning datasource of grid.
This expands 2nd level when i click on first level and expands 3rd level when i click 2nd level.
But i need to expand all 3 band level on clicking on parent level and display all 3 levels.
I have tried using RowIslandPopulating and RowExpanded events for the same. But it didnt help.
Please help me achieve this functionality.
Please reply at earliest as its very urgent.
What type is your checkbox column - UnboundCheckBoxField, BoundCheckBoxField or you have CheckBox in TemplateDataField?
Hello Nikolay,
The Check box column is "TemplateDataField"
Hi Nilesh,
I made some research and it seems that this is not possible when using load on demand. In order to be able to expand all children of a particular row, they should be already loaded.
I'm just checking if you have resolved your issue.
Can you share your code for setting the value of the dropdown provider?
Hello Nikolay
We had a discussion on WebDropDownProvider selection index change please refer the below text.
"2. WebDropDownProvider Selection index changed (Java script)In this scenario we achieved the functionality to change the values of parent child BoundDataFileds on selection change of any dropdown item. Let me explain this in detailsI have three level Grid, in each level I have three WebDropDownProviders. In selection index change of First i.e. Parent dropdown I have to change value for child dropdown. I have achieved this. Now In selection of Child 3rd level dropdown selection index changed I have to change value of parent 1st level dropdown. I have also achieved it through java script. After changing the values of dropdown and set it to the BoundDataFiled cells which is used for dropdowns, I clicked on save button I got the below error”
Infragistics.Web.UI.GridControls.MissingRecordException: Requested record cannot be found by key.
". This happened only when I changed value of child band dropdown to set the value for parent cell dropdown then this error occurs and save button event not fired.
Please suggest me the solutions for the same as soon as possible.”
We have changed the java script approach now and working on Server side so we are able to solve the issue of MissingRecordException, but now we are facing the new issue of setting the selected index for dropdown
Let me explain the scenario:As you know I have dropdown providers in WHDG on three levels.When I changed the selected index of any dropdown has changed the status of other dropdowns. Parent dropdown can change status of the child dropdowns or child can change status of parent dropdown. I am able to achieve this functionality, my dropdown value changes the status and set it to the BoundDataFiled cell value. I can see the changed value on BoundDataFiled cell, but when I click on that cell dropdown shows the previous value as selected.
I have tried java script for setting the selected index and value for dropdown, also tried to set the value from server side, but both scenario not working. Could you please suggest the possible ways to set the dropdown values.
I'm following up to see if you have resolved your issues.
It is not possible to get directly the checked rows.
About the exception you are getting - I would suggest you to check the threads listed here - http://ko.infragistics.com/community/forums/t/65625.aspx for possible solutions. If this doesn't help, please provide a small sample, reproducing this error or at least a code snippet.