我的次元 WebDataGrid 当我双击一个单元格时不输入单元格编辑模式。 它不输入服务器模式 - 没有发生任何事件。 只有客户端事件才会发生, 但我怀疑这些事件是必要的 。 下面的 asp. net 段有什么问题?
<infra:WebDataGrid ID="wdgProjects" runat="server" EnableAjax="true" AutoGenerateColumns="False"
DataSourceID="sqlProjects" DataKeyFields="ProjectID"
OnInitializeRow="wdgProjects_InitializeRow"
OnCellSelectionChanged="wdgProjects_CellSelectionChanged"
OnActiveCellChanged="wdgProjects_ActiveCellChanged"
>
<Columns>
<infra:TemplateDataField Key="ProjectID" Header-Text="Project ID">
<ItemTemplate>
<asp:Label ID="lblProjectID" runat="server" />
</ItemTemplate>
</infra:TemplateDataField>
<infra:TemplateDataField Key="ProjectName" Header-Text="Project Name">
<ItemTemplate>
<asp:Label ID="lblProjectName" runat="server" />
</ItemTemplate>
</infra:TemplateDataField>
<infra:TemplateDataField Key="ReportingPeriod" Header-Text="Reporting Period">
<ItemTemplate>
<asp:Label ID="lblReportingPeriod" runat="server" />
</ItemTemplate>
</infra:TemplateDataField>
<infra:TemplateDataField Key="ProjectCreator" Header-Text="Project Creator">
<ItemTemplate>
<asp:Label ID="lblProjectCreator" runat="server" />
</ItemTemplate>
</infra:TemplateDataField>
<infra:TemplateDataField Key="ProjectCreation" Header-Text="Project Creation Date">
<ItemTemplate>
<asp:Label ID="lblProjectCreation" runat="server" />
</ItemTemplate>
</infra:TemplateDataField>
</Columns>
<Behaviors>
<infra:Activation Enabled="true" />
<infra:Selection RowSelectType="Single" CellClickAction="Cell" />
<infra:EditingCore AutoCRUD="false" Enabled="true" BatchUpdating="false">
<Behaviors>
<infra:CellEditing Enabled="true" EditModeActions-MouseClick="Double">
<ColumnSettings>
<infra:EditingColumnSetting ColumnKey="ProjectID" ReadOnly="true" />
<infra:EditingColumnSetting EditorID="txtProjectName" ColumnKey="ProjectName" />
<infra:EditingColumnSetting EditorID="ddlReportingPeriod" ColumnKey="ReportingPeriod"/>
<infra:EditingColumnSetting EditorID="txtProjectCreator" ColumnKey="ProjectCreator" />
<infra:EditingColumnSetting EditorID="calProjectCreation" ColumnKey="ProjectCreation" />
</ColumnSettings>
</infra:CellEditing>
<infra:RowAdding Alignment="Bottom" EditModeActions-MouseClick="Double"/>
<infra:RowDeleting Enabled="true" />
</Behaviors>
</infra:EditingCore>
<infra:Sorting>
<ColumnSettings>
<infra:SortingColumnSetting ColumnKey="ProjectID" />
<infra:SortingColumnSetting ColumnKey="ProjectName" />
<infra:SortingColumnSetting ColumnKey="ReportingPeriod" />
<infra:SortingColumnSetting ColumnKey="ProjectCreator" />
<infra:SortingColumnSetting ColumnKey="ProjectCreation" />
</ColumnSettings>
</infra:Sorting>
<infra:Paging PageSize="15" />
</Behaviors>
<EditorProviders>
<infra:TextEditorProvider ID="txtProjectName">
<EditorControl ClientIDMode="Predictable"/>
</infra:TextEditorProvider>
<infra:DropDownProvider ID="ddlReportingPeriod">
<EditorControl DataSourceID="sqlReportingPeriod" TextField="Name" ValueField="Value"
EnableDropDownAsChild="False" DisplayMode="DropDownList" ClientIDMode="Predictable" DropDownContainerMaxHeight="200px"
>
<DropDownItemBinding TextField="Name" ValueField="Value" />
</EditorControl>
</infra:DropDownProvider>
<infra:TextEditorProvider ID="txtProjectCreator">
<EditorControl ClientIDMode="Predictable"/>
</infra:TextEditorProvider>
<infra:WebDateChooserProvider ID="calProjectCreation"/>
</EditorProviders>
<AjaxIndicator Enabled="True" />
</infra:WebDataGrid>
<asp:SqlDataSource runat="server" ID="sqlProjects" ConnectionString="<%$ ConnectionStrings:HelloUranus %>"
SelectCommand="<%$ AppSettings:GetProjects %>" SelectCommandType="StoredProcedure"
InsertCommand="<%$ AppSettings:InsertProject %>" InsertCommandType="StoredProcedure"
UpdateCommand="<%$ AppSettings:UpdateProject %>" UpdateCommandType="StoredProcedure"
DeleteCommand="<%$ AppSettings:DeleteProject %>" DeleteCommandType="StoredProcedure"
OnSelecting="sqlProjects_Selecting"
OnUpdating="sqlProjects_Updating"
>
<SelectParameters>
<asp:Parameter Name="ProjectID" Type="Int32" />
<asp:Parameter Name="ProjectName" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="sqlReportingPeriod" ConnectionString="<%$ ConnectionStrings:Floobarf %>"
SelectCommand="<%$ AppSettings:ReportingPeriods %>"
/>