DataSource和DataSourceID都在' MedicalSchemeDetailGrid'上定义。删除一个定义

时间:2017-11-01 10:42:23

标签: c# asp.net

我收到此错误" DataSource和DataSourceID都在' MedicalSchemeDetailGrid'上定义。删除一个定义"

下面是我的aspx页面,其中我有数据源

                <ContentTemplate>
                <ctls:SearchPanel ID="MedicalSchemeDetailSearchPanel" runat="server" GridID="MedicalSchemeDetailGrid"
                    SearchButtonText="Search" ClearButtonText="Clear" ExpressionLabel="Search Expression"
                    Visible="false" />
                <div class="vsep">
                </div>
                <rwg:BulkEditGridView ID="MedicalSchemeDetailGrid" runat="server" DataMember="MedicalSchemeDetail" OnPageIndexChanging="MedicalSchemeDetailGrid_PageIndexChanging"
                    AllowPaging="true" DataSourceID="DBDataSource1" AutoGenerateColumns="False" DataKeyNames="CompanyID,BranchID,DepartmentID,MedicalSchemeID,ItemID,PatientStatus">
                    <HeaderStyle Height="30px" /> here

1 个答案:

答案 0 :(得分:0)

你们俩都有

MedicalSchemeDetailGrid.DataSource = dbSrc;
MedicalSchemeDetailGrid.DataBind();

并且

<rwg:BulkEditGridView ID="MedicalSchemeDetailGrid" DataSourceID="DBDataSource1"

您不能同时删除一个(如错误消息所述)