问题描述
我在项目中使用的是DevExpress(ASP.NET开发人员的第三方控件)控件.
我正在使用Aspx DataView控件删除我的数据.在同一个DataView控件中,我正在使用Aspx Grid控件.因此,我在使用不同的linq数据源来绑定DataView和Grid.基于来自dataview的id,我将其存储在会话中,并基于每次存储在session中的id绑定网格.对于网格,这里的数据绑定是不绑定的.有谁能够帮助我?这是我的代码,如下所示:
I am using a DevExpress( third party controls for ASP.NET Developers) controls in my project.
I am using Aspx DataView control to disolay my data. Within the same DataView control I am using Aspx Grid control.so,I am using different linq datasources to bind the DataView and Grid. based on the id coming from dataview I am storing it in session and binding the grid based on the id stored in session each time. Here for the grid databinding is not binding. can any body help me? here is my code as follows:
<dx:ASPxDataView ID="ASPxDataView1" DataSourceID="SqgetJobDetails" runat="server"
ItemSpacing="4px" PagerAlign="Justify" PagerPanelSpacing="2px" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
CssPostfix="DevEx" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" önDataBound="ASPxDataView1_DataBound">
<ItemTemplate>
<table width="100%" border="1">
<tr>
<td colspan="6">
<h3>
<dx:ASPxLabel runat="server" Text='<%#Eval("Clnt_Name") %>' ID="lblClientname">
</dx:ASPxLabel>
</h3>
</td>
</tr>
<tr>
<td>
Mob.Date
</td>
<td>
:
</td>
<td>
<dx:ASPxLabel runat="server" Text='<%#Eval("MobDate")%>' ID="lblMobdate">
</dx:ASPxLabel>
</td>
<td>
Job#
</td>
<td>
:
</td>
<td>
<%#Session["JID"] = Eval("JobID")%>
</td>
</tr>
<tr>
<td>
Rig UP.Date
</td>
<td>
:
</td>
<td>
<dx:ASPxLabel runat="server" Text='<%#Eval("RigUpDate")%>' ID="lblRigUpdate">
</dx:ASPxLabel>
</td>
<td>
Unit No
</td>
<td>
:
</td>
<td>
<dx:ASPxLabel runat="server" Text='<%#Eval("UnitNo")%>' ID="lblUnitno">
</dx:ASPxLabel>
</td>
</tr>
<tr>
<td>
End Date
</td>
<td>
:
</td>
<td>
<dx:ASPxLabel runat="server" Text='<%#Eval("EndDate")%>' ID="ASPxLabel1">
</dx:ASPxLabel>
</td>
<td colspan="2">
</td>
<td align="right">
<dx:ASPxHyperLink ID="link" Text="Details" NavigateUrl="#" runat="server">
</dx:ASPxHyperLink>
</td>
</tr>
<tr>
<td colspan="6">
<dx:ASPxGridView ID="DisplayClientDetails" DataSourceID="lQEquipment" runat="server"
Width="100%">
<Columns>
<dx:GridViewDataTextColumn FieldName="EquipmentName" VisibleIndex="0" Caption="Equipment Name">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="Equip_Category" VisibleIndex="1" Caption="Equipment Category">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="ID" VisibleIndex="3" Visible="false">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="Job_ID" Caption="Job#" VisibleIndex="4">
</dx:GridViewDataTextColumn>
</Columns>
</dx:ASPxGridView>
</td>
</tr>
</table>
</ItemTemplate>
<LoadingPanelImage Url="~/App_Themes/DevEx/Web/Loading.gif">
</LoadingPanelImage>
<LoadingPanelStyle ImageSpacing="5px">
</LoadingPanelStyle>
<DisabledStyle ForeColor="#B1B1B8">
</DisabledStyle>
</dx:ASPxDataView>
<asp:SqlDataSource ID="SqgetJobDetails" SelectCommandType="StoredProcedure" SelectCommand="getJobDetailByID"
ConnectionString="<%$ ConnectionStrings:EquipmentEchartDevConnectionString %>"
runat="server"></asp:SqlDataSource>
<asp:LinqDataSource ID="lQEquipment" runat="server" ContextTypeName="EquipDataDataContext"
TableName="vwJobs" Where="Job_ID == @Job_ID">
<WhereParameters>
<asp:SessionParameter Name="Job_ID" SessionField="JID" DefaultValue="0" Type="Int32" />
</WhereParameters>
</asp:LinqDataSource>
推荐答案
这篇关于开发人员Express DataView&网格控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!