我在 obout 网格编辑模板中遇到了 Obout 日历和文本框的问题。
这是我的网格的代码:
<obout2:Grid ID="grid1" runat="server" CallbackMode="false" Serialize="true"
ShowHeader="true" PageSize="10"
FolderStyle="~/styles/Grid/black_glass" AutoGenerateColumns="false" EnableRecordHover="true"
AllowAddingRecords="true" RowEditTemplateId="tplRowEdit">
<Columns>
<obout2:Column ID="Column1" DataField="ID_Nal" ReadOnly="true" Visible="false" HeaderText="ID_Nal"
Width="100" runat="server">
<TemplateSettings RowEditTemplateControlId="txtID_Nal" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column2" DataField="ID_Wpl" Visible="false" HeaderText="ID_Wpl"
Width="200" runat="server">
<TemplateSettings RowEditTemplateControlId="txtID_Wpl" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column3" DataField="Nazwa" HeaderText="Typ_Naleznosci" Width="150"
runat="server">
<TemplateSettings RowEditTemplateControlId="txtTyp" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column4" DataField="KwotaN" HeaderText="Kwota Nalezności" Width="150"
runat="server">
<TemplateSettings RowEditTemplateControlId="txtKwotaN" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column5" DataField="Termin_platnosci" HeaderText="Termin_platnosci"
Width="150" runat="server">
<TemplateSettings RowEditTemplateControlId="txtTermin" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column7" DataField="Opis" HeaderText="Opis nal." Width="150" runat="server">
<TemplateSettings RowEditTemplateControlId="txtOpis" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column8" DataField="KwotaW" HeaderText="Kwota wpłaty" Width="150"
runat="server">
<TemplateSettings RowEditTemplateControlId="txtKwotaW" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column9" DataField="DataW" HeaderText="Data wpłaty" Width="150"
runat="server">
<TemplateSettings RowEditTemplateControlId="txtDataW" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column10" DataField="OpisW" HeaderText="Opis wpłaty" Width="150"
runat="server">
<TemplateSettings RowEditTemplateControlId="txtOpisW" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column11" HeaderText="" Width="200" AllowEdit="true" Align="center"
AllowDelete="true" runat="server" />
</Columns>
<TemplateSettings RowEditTemplateId="tplRowEdit" />
<Templates>
<obout2:GridTemplate runat="server" ID="tplRowEdit">
<Template>
<div style="position: relative;">
<table class="rowEditTable">
<tr>
<td valign="top">
<fieldset style="width: 275px; height: 250px;">
<legend>Ship Information</legend>
<table>
<tr>
<td width="120">
ID Nal:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtID_Nal" Width="150" />
</td>
</tr>
<tr>
<td width="120">
Id Wpl:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtID_Wpl" Width="150" />
</td>
</tr>
<tr>
<td width="120">
Typ:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtTyp" Width="150" />
</td>
</tr>
<tr>
<td width="120">
Kwota:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtKwotaN" Width="150" />
</td>
</tr>
<tr>
<td width="120">
Termin płatności:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtTermin" Width="150" />
</td>
<td>
<obout:Calendar ID="Calendar1" runat="server" DatePickerMode="true" DatePickerImagePath="~/Styles/Calendar/icon2.gif"
StyleFolder="~/Styles/Calendar/default"
TextBoxId="txtTermin" CultureName="pl-PL" DateFormat="dd-MM-yyyy">
</obout:Calendar>
</td>
</tr>
<tr>
<td width="120">
Opis:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtOpis" Width="150" />
</td>
</tr>
<tr>
<td width="120">
Kwota wpłaty:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtKwotaW" Width="150" />
</td>
</tr>
<tr>
<td width="120">
Data wpłaty:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtDataW" Width="150" />
</td>
<td>
<obout:Calendar ID="Calendar2" runat="server" DatePickerMode="true" DatePickerImagePath="~/Styles/Calendar/icon2.gif"
StyleFolder="~/Styles/Calendar/default" CultureName="pl-PL" DateFormat="dd-MM-yyyy"
ShowHourSelector="False" ShowMinuteSelector="False" ShowSecondSelector="False"
TextBoxId="txtDataW">
</obout:Calendar>
</td>
</tr>
<tr>
<td width="120">
Opis wpłaty:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtOpisW" Width="150" />
</td>
</tr>
<tr>
<td colspan="2">
<br />
</td>
</tr>
</table> </fieldset> </td>
</tr>
<tr>
<td colspan="2" align="center">
<obout1:OboutButton ID="BtnSaveChanges" runat="server" Text="Save" OnClientClick="return saveChanges('BtnSaveChanges')" />
<obout1:OboutButton ID="BtnCancelChanges" runat="server" Text="Cancel" OnClientClick="return cancelChanges('BtnCancelChanges');" />
</td>
</tr>
</table>
<div class="loading-image-container" id="LoadingIndicator" style="display: none;">
<div class="loading-image">
</div>
</div>
</div>
</Template>
</obout2:GridTemplate>
</Templates>
</obout2:Grid>
当我运行代码并单击“txtTermin”附近的日历时,会显示日历,但是当我更改日历中的日期时,它在文本框(txtTermin)中没有更改。
但是当我更换
<obout1:OboutTextBox runat="server" ID="txtTermin" Width="150" />
和
<asp:TextBox runat="server" ID="txtTermin" Width="150" />
一切正常。
当然,txtDataW 也有同样的问题。
请帮忙,为什么日历不能与 OboutTextBox 一起使用,但可以与标准 ASP TextBox 一起使用?在此示例中:http : //www.obout.com/grid/grid_commands_row_template.aspx 它与 OboutTextBox'es 一起工作(订购日期,所需日期..)。