Hello
I have a hierarchical radgrid which my 2 sqldatasource come from a Ms Access table. (I use ms access db from web for the first time)
I can't link my detail table view with the master table view and I don't know why
if I put a select parameter in the sql statement in my sqldatasource (of the detail table) I got an error that it's waiting for 1 parameter...
If I don't put a select parameter in the sql statement in my sqldatasource (of the detail table once again) it display every records in my detail table for each item in the mastertableview.
I'm using Q1 2009 for the first time. I usually Qx 2008 version. Does I need to change something?
Here is my code
Thank you
I have a hierarchical radgrid which my 2 sqldatasource come from a Ms Access table. (I use ms access db from web for the first time)
I can't link my detail table view with the master table view and I don't know why
if I put a select parameter in the sql statement in my sqldatasource (of the detail table) I got an error that it's waiting for 1 parameter...
If I don't put a select parameter in the sql statement in my sqldatasource (of the detail table once again) it display every records in my detail table for each item in the mastertableview.
I'm using Q1 2009 for the first time. I usually Qx 2008 version. Does I need to change something?
Here is my code
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="FEN_IMPUTATION_DETAIL.aspx.vb" Inherits="Facturation_RT.FEN_IMPUTATION_DETAIL" %> |
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml" > |
<head runat="server"> |
<title>Page sans titre</title> |
</head> |
<body> |
<form id="form1" runat="server"> |
<div> |
<asp:SqlDataSource |
ID="SqlDSFile" |
runat="server" |
ConnectionString="<%$ ConnectionStrings:ConnectionString %>" |
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" |
SelectCommand="SELECT [FILE] FROM [Req_Somme_Imputation_Details] ORDER BY FILE"> |
</asp:SqlDataSource> |
<asp:SqlDataSource |
ID="SqlDsImputationDetail" |
runat="server" |
ConnectionString="<%$ ConnectionStrings:ConnectionString %>" |
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" |
SelectCommand="SELECT * FROM [Req_Somme_Imputation_Details] WHERE FILE=@FILE" > |
<SelectParameters> |
<asp:Parameter Name="FILE" Type="String" /> |
</SelectParameters> |
</asp:SqlDataSource> |
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
</asp:ScriptManager> |
<telerik:RadGrid |
ID="RadGrid1" |
runat="server" |
GridLines="None" |
Skin="Web20" DataSourceID="SqlDSFile" > |
<MasterTableView |
datasourceid="SqlDSFile" |
HierarchyDefaultExpanded=true |
ExpandCollapseColumn-HeaderStyle-Width="5px" |
ExpandCollapseColumn-HeaderStyle-HorizontalAlign="Left" AutoGenerateColumns=true DataKeyNames="FILE"> |
<DetailTables> |
<telerik:GridTableView |
DataSourceID="SqlDsImputationDetail" |
AutoGenerateColumns=false DataKeyNames="pdebit"> |
<ParentTableRelation> |
<telerik:GridRelationFields |
DetailKeyField="FILE" |
MasterKeyField="FILE" /> |
</ParentTableRelation> |
<Columns> |
<telerik:GridBoundColumn |
DataField="SommeDeCout" |
HeaderText="Cout" |
ReadOnly="True" |
SortExpression="SommeDeCout" /> |
</Columns> |
</telerik:GridTableView> |
</DetailTables> |
<ExpandCollapseColumn Visible="True"> |
<HeaderStyle HorizontalAlign="Left" Width="5px"></HeaderStyle> |
</ExpandCollapseColumn> |
</MasterTableView> |
</telerik:RadGrid> |
</div> |
</form> |
</body> |
</html> |