This is a migrated thread and some comments may be shown as answers.
Control inside EditItemTemplate takes value from HiddenField which is in ItemTemplate
0 Answers 5 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Evgeny asked on 20 Mar 2018, 01:18 PM

I have the following html:

<sq8:GridTemplateColumn DataField="FieldToFillChoiceValue" FilterImageToolTip="" HeaderText="" SortExpression="FieldToFillChoiceValue" UniqueName="FieldToFillValue" FilterControlAltText="">
        <sq8:TextBox runat="server" ID="tbFieldToFill" ValidationGroup="DecisionGroup" />
        <sq:BindableControl runat="server" TargetControlID="tbFieldToFill" DataField="FieldToFillTextValue"></sq:BindableControl>
        <asp:CustomValidator runat="server" ErrorMessage="CustomValidator" ID="cvFieldToFill" ValidationGroup="DecisionGroup"></asp:CustomValidator>
        <sq8:ComboBox runat="server" ID="cmbFieldToFill" ValidationGroup="DecisionGroup">
            <Localization NoMatches="" ShowMoreFormatString="" AllItemsCheckedString="" ItemsCheckedString="" CheckAllString="" MoreItemsWithoutTotalRowCount="" NoMoreItemsWithoutTotalRowCount=""></Localization>
        <sq:BindableControl runat="server" TargetControlID="cmbFieldToFill" DataField="FieldToFillChoiceValue" />
        <asp:Literal runat="server" ID="FieldToFillChoiceValue" Mode="Encode" />
        <sq:BindableControl runat="server" TargetControlID="FieldToFillChoiceValue" DataField="FieldToFillChoiceValue" />
        <asp:HiddenField runat="server" ID="hfFieldType" />
        <sq:BindableControl runat="server" TargetControlID="hfFieldType" DataField="FieldToFillType"></sq:BindableControl>


And I'm signed to OnBatchEditOpening and OnBatchEditOpened events.

My problem is that when I get to the OnBatchEditOpened handler, the value of tbFieldToFill is "TextBox" (which is the value of the hidden field) without me setting or binding any value to the control.

In the OnBatchEditOpening handler, the text box still haven't been rendered.

How and why does the value get into the textbox control?

Thanks for any help.

No answers yet. Maybe you can help?

Asked by
Top achievements
Rank 1
Share this question