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
For the first problem, currently we are iterating through the rows and making fields editable.
But if large no. of rows are there it takes a lot of time to iterate through the rows and leads to performance issue.
Based on checkbox selection in the first column is it possible to directly get the rows which have first column checked?
For the second problem, i have tried using EnableViewState and EnableDataViewState and setting their properties to true.
But it didnt help.
Please help me out.
Hi Nilesh,
You can access templated CheckBoxes using the following syntax:
CheckBox cb = (CheckBox)WebHierarchicalDataGrid1.GridView.Rows[0].Items[0].FindControl("CheckBox1");
So you can iterate through the rows of the grid and see which rows have their CheckBox cell checked.
And about your second issue – I would suggest you to set EnableViewState and EnableDataViewState properties to true and see if the error still occurs.
Hope this helps.
Hi, Nikolay,
Thanks for your reply and co-operation.
I have changed my implementation because this is not possible. Now I have two different issues.
1. Performance issue.
2. WebDropDownProvider selection index changed (Java script).
Let me explain you both scenarios.
We are able to bind the grid of 100 Records in 20 sec. using WebDropDownProvider in WebHirarchicalDataGrid. after Grid Loads with all parent and two child bands, Now we want to edit some of the records so we select 1 record with its two level bands and click on Edit button. In Edit event we just bind six DropDownProviders and make selected rows editable this take more than 60 sec. actually we are traversing each and every row in the grid for making the selected rows editable. Please let me know is there an way to select only those rows which are checked for edit. We are not using default selection mechanism to select rows. we have a Checkbox control in ItemTemplateField.
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 details
I 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.
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.
Hello Nikolay,
The Check box column is "TemplateDataField"