ASPxComboBox inside editForm template in ASPxGridView
in Template inside
2023-09-11 14:21:57 时间
ASPxComboBox inside editForm template in ASPxGridView
I am working on ASP.net web application, and I am new to DevExpress extensions, so i am having some problems on customize the new controls, I have a ASPxGridView , which will bind in the run time using a web service to get the data and bind them into a list or datatable then binding them into the gridView , in the Edit Form Template I have a related comboboxes which represent the CITY and the AREA and the REGION, the "AREA" combobox depends on the value of the "City" combobox, the "City " combobox is binding on the init event, I want to change set the values of the "Area" combobox using the selected value in the " CIty " combobox ..... the problem that I don't know what is the needed events to do that,
<dx:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server"
KeyFieldName="ID" AutoGenerateColumns="False" Width="100%"
onrowupdating="grid_RowUpdating"
>
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0" ShowSelectCheckbox="True">
<EditButton Visible="True" />
<NewButton Visible="True" />
<DeleteButton Visible="True">
</DeleteButton>
<ClearFilterButton Visible="True">
</ClearFilterButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn FieldName="ID" VisibleIndex="1" />
<dx:GridViewDataTextColumn FieldName="City" VisibleIndex="2" />
<dx:GridViewDataColumn FieldName="Area" VisibleIndex="3" />
<dx:GridViewDataColumn FieldName="Region" VisibleIndex="4" />
<dx:GridViewDataColumn FieldName="Description" Visible="False" />
</Columns>
<SettingsBehavior AllowSelectByRowClick="True" />
<SettingsPager AlwaysShowPager="True" PageSize="4" />
<Settings ShowFilterRow="True" />
<Templates>
<EditForm>
<table class="OptionsTable" >
<tr>
<td style="white-space: nowrap">
City
</td>
<td style="width: 50%">
<dx:ASPxComboBox ID="cityselect" runat="server" DropDownStyle="DropDownList" IncrementalFilteringMode="StartsWith"
TextField="Name" ValueField="ID"
EnableSynchronization="False" oninit="cityselect_Init">
</dx:ASPxComboBox>
</td>
</tr>
<tr>
<td>
Area
</td>
<td style="width: 100%"><dx:ASPxComboBox runat="server" ID="CmbArea" ClientInstanceName="cmbArea"
DropDownStyle="DropDown" TextField="Name"
ValueField="ID" IncrementalFilteringMode="StartsWith"
EnableSynchronization="False" >
</dx:ASPxComboBox>
</td>
</tr>
<tr>
<td>
Region
</td>
<td style="width: 100%">
<dx:ASPxComboBox ID="regionSelect"
runat="server">
</dx:ASPxComboBox>
</td>
</tr>
<tr>
<td style="white-space: nowrap">
Description
</td>
<td style="width: 50%">
<dx:ASPxTextBox runat="server" ID="Description" Value='<%# Eval("Description") %>' Width="100%">
</dx:ASPxTextBox>
</td>
</tr>
</table>
<div style="text-align: right; padding: 2px">
<dx:ASPxGridViewTemplateReplacement ID="UpdateButton" ReplacementType="EditFormUpdateButton"
runat="server">
</dx:ASPxGridViewTemplateReplacement>
<dx:ASPxGridViewTemplateReplacement ID="CancelButton" ReplacementType="EditFormCancelButton"
runat="server">
</dx:ASPxGridViewTemplateReplacement>
</div>
</EditForm>
</Templates>
</dx:ASPxGridView>
using <%# Bind("your field")%>
<dx:ASPxComboBox ID="cityselect" runat="server" Value='<%# Bind("City") %>'
DropDownStyle="DropDownList" IncrementalFilteringMode="StartsWith"
TextField="Name" ValueField="ID"
oninit="cityselect_Init">
</dx:ASPxComboBox>
相关文章
- 记一个mvn奇怪错误: Archive for required library: 'D:/mvn/repos/junit/junit/3.8.1/junit-3.8.1.jar' in project 'xxx' cannot be read or is not a valid ZIP file
- 问题-关于 in []使用过程中报错" Constant expression violates subrange bounds"
- [AWS] Using EC2 Roles and Instance Profiles in AWS
- [Angular 9] Built-in template syntax $any
- [AngularJS] Transforming raw JSON data to meaningful output in AngularJS
- [rxjs] Demystifying Cold and Hot Observables in RxJS
- [Javascript] Hoisting in JavaScript
- [AngularJS] Transclude -- using what existing in DOM to replace the template elements in directive
- mysql 8.0下的SELECT list is not in GROUP BY clause and contains nonaggregated column
- [Angular 9] Built-in template syntax $any
- [Maid] Write Tasks in Markdown with Maid
- [Vue-rx] Pass Template Data Through domStreams in Vue.js and RxJS
- [Angular] Create a custom validator for template driven forms in Angular
- [Python] Different ways to test multiple flags at once in Python
- [Angular 2] Share Template Content In Another Template With Content Projection <ng-content>
- [AngularJS] Transclude -- using what existing in DOM to replace the template elements in directive
- complete checkbox in Fiori
- Matlab:成功解决In an assignment A(I)=B,the number of elements in B and I must be the same
- AI:Algorithmia《2021 enterprise trends in machine learning 2021年机器学习的企业趋势》翻译与解读
- 已解决FutureWarning: The default value of regex will change from True to False in a future version. In
- VC2015提示warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is dep