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
2045
webdatagrid DropDown, how to find second column text
posted

I have webdatagrid with drop down provider using ItemTemplate and table. On DropDownClosed I need to find second and third column text displayed on client site. (PersonNum and Job).

Here is the code:

<ig:WebDataGrid ID="WebDataGrid4" runat="server" Height="200px" DataSourceID="ObjectDataSource9" AutoGenerateColumns="false" BackColor="Window" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"
Font-Size="Large" ForeColor="Black" ShowFooter="false" ClientIDMode="Static" DataKeyFields="EmpId" >
<EditorProviders>
<ig:DropDownProvider ID="NameProvider">
<EditorControl ID="EditorControl2" runat="server" EnableAutoFiltering="Server" AutoFilterQueryType="StartsWith" AutoFilterSortOrder="Ascending" EnableAutoCompleteFirstMatch="false"
EnableCachingOnClient="true" EnableLoadOnDemand="true" DisplayMode="DropDown" DataSourceID="ObjectDataSource11" TextField="EmployeeName" ValueField="PersonNum" >

<ItemTemplate>
<table style="width: 100%" cellspacing="0" cellpadding="4">
<tr style="border-bottom: solid 1px #ff0000;">
<td style="width: 150px; border-bottom: solid 1px #E8E8E8;">
<%# DataBinder.Eval(Container.DataItem, "EmployeeName") %>
</td>
<td style="width: 100px; padding-left: 10px; border-bottom: solid 1px #E8E8E8;">
<%# DataBinder.Eval(Container.DataItem, "PersonNum")%>
</td>
<td style="width: 50px; text-align: left; padding-left: 25px; border-bottom: solid 1px #E8E8E8;">
<%# DataBinder.Eval(Container.DataItem, "Job")%>
</td>
</tr>
</table>
</ItemTemplate>
<ClientEvents DropDownClosed="NameProvider_Closed" />
</EditorControl>

</ig:DropDownProvider>
<ig:DropDownProvider ID="JobProvider">
<EditorControl ID="EditorControl1" runat="server" DisplayMode="DropDown" DataSourceID="ObjectDataSource14" TextField="Job" Width="110px" />
</ig:DropDownProvider>
</EditorProviders>
<Columns>

<ig:BoundDataField DataFieldName="Name" Key="Name" Width="200px" >
<Header Text="Name" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="EmpID" Key="EmpID" Width="80px" >
<Header Text="EmpID" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Job" Key="Job" Width="100px" >
<Header Text="Job" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Notes" Key="Notes" Width="90px" >
<Header Text="Notes" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="Hrs" Key="Hrs" Width="80px" >
<Header Text="Hrs" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="selected" Key="selected" Hidden="true" >
</ig:BoundDataField>

</Columns>
<Behaviors>
<%-- <ig:Activation Enabled="true" />--%>
<ig:Selection RowSelectType="Single" CellClickAction="Cell" />
<ig:EditingCore BatchUpdating="True" >
<Behaviors>
<ig:CellEditing Enabled="true" >
<EditModeActions MouseClick="Single" EnableOnActive="true" />
<ColumnSettings>

<ig:EditingColumnSetting ColumnKey="Name" EditorID="NameProvider" ReadOnly="false" />
<ig:EditingColumnSetting ColumnKey="EmpID" ReadOnly="true" />
<ig:EditingColumnSetting ColumnKey="Job" EditorID="JobProvider" ReadOnly="false" />
<ig:EditingColumnSetting ColumnKey="Hrs" ReadOnly="false" />
<ig:EditingColumnSetting ColumnKey="Notes" />
</ColumnSettings>
<CellEditingClientEvents ExitingEditMode="WebDataGrid4_ExitedEditMode" />
</ig:CellEditing>
<ig:RowAdding Alignment="Top" EditModeActions-EnableOnActive="true" EditModeActions-MouseClick="Single" Enabled="true" >
<ColumnSettings>
<ig:RowAddingColumnSetting ColumnKey="Name" EditorID="NameProvider" ReadOnly="false" />
<ig:RowAddingColumnSetting ColumnKey="EmpID" ReadOnly="true" />
<ig:RowAddingColumnSetting ColumnKey="Job" EditorID="JobProvider" ReadOnly="false" />
<ig:RowAddingColumnSetting ColumnKey="Hrs" ReadOnly="false" />
<ig:RowAddingColumnSetting ColumnKey="Notes" ReadOnly="false" />
</ColumnSettings>
<AddNewRowClientEvents ExitingEditMode="AddingRow_ExitingEditMode" />

</ig:RowAdding>
</Behaviors>
</ig:EditingCore>
</Behaviors>
<%-- <ClientEvents Click="CellButtonClick" />--%>
</ig:WebDataGrid>

Parents Reply Children