Hi all,
I have one gridview with itemtemplate textboxes. in my gridview i have one textbox cell. in this cell for every row it behave some cells are different autocompleteextenders and some cells are normal textboxes only for example, i have one gridview like below,
<asp:GridView ID="GvSection1Data_Two" runat="server" AutoGenerateColumns="false" ShowHeader="false" GridLines="Both" Width="1170px">
<Columns>
<asp:BoundField DataField="Value_Key" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" ItemStyle-CssClass="hiddencol" HeaderStyle-CssClass="hiddencol" />
<asp:TemplateField HeaderText="Column1">
<ItemTemplate>
<asp:Label ID="Lbl_Section_Column1" runat="server" Text='<%# Eval("Section_Column1") %>' Width="200px" CssClass="lblPnts" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Column2">
<ItemTemplate>
<asp:TextBox runat="server" ID="Section_Column2" Text='<%# Eval("Section_Column2") %>' Width="970px" CssClass="MndtryTxtBox" Enabled="true" />
<asp:AutoCompleteExtender ID="TxtELF_ACE" runat="server" ServiceMethod="ELFID" MinimumPrefixLength="0" ServicePath="~/Autocomplete.asmx"
EnableCaching="false" TargetControlID="Section_Column2" OnClientItemSelected="" CompletionListCssClass="autocomplete_completionListElement"
CompletionListItemCssClass="autocomplete_listItem" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem">
</asp:AutoCompleteExtender>
<asp:AutoCompleteExtender ID="TxtGF_ACE" runat="server" ServiceMethod="GFID" MinimumPrefixLength="0" ServicePath="~/Autocomplete.asmx"
EnableCaching="false" TargetControlID="Section_Column2" UseContextKey="true" OnClientItemSelected="" CompletionListCssClass="autocomplete_completionListElement"
CompletionListItemCssClass="autocomplete_listItem" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem">
</asp:AutoCompleteExtender>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
The output gridview like,
Result |
|
Date |
|
Specs |
|
ELF ID |
|
GF_ID |
|
for this above gridview my conditions are,
first row - autocomplete is not required for this cell. so, dont show autocomplete.
second row - autocomplete is not required for this cell. so, dont show autocomplete.
Third row - autocomplete is not required for this cell. so, dont show autocomplete.
Fourth Row - Autocomplete is required for this cell, in this cell i require to call "TxtELF_ACE" extender
Fifth Row - Autocomplete is required for this cell, in this cell i require to call "TxtGF_ACE" extender
How to do it ?
Thanks in advance