HighTechTalks DotNet Forums  

USER CONTROL DATALIST PROBLEM

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss USER CONTROL DATALIST PROBLEM in the ASP.net Data Grid Control forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Savas Ates
 
Posts: n/a

Default USER CONTROL DATALIST PROBLEM - 09-07-2006 , 03:54 AM






I have a simple Data list control in my user control. When I run my main
page and i use response.write to see grid query it writes 2 times. I checked
my query results it is true. My datalist doesnt show anything. What can be
the problem ?

<cc1:RDBCartList id="RDBCartList1" runat="server"
BottomDefaultTypeID="CARTHIS_BOTTOM1" BottomTypeID="CARTHIS_BOTTOM1"
EmptyDefaultTypeID="CARTHIS_EMPTY1" EmptyTypeID="CARTHIS_EMPTY1"
TopDefaultTypeID="CARTHIS_TOP1"
TopTypeID="CARTHIS_TOP1" TopFormatID="CARTHIS" InnerFormatID="CARTHIS"
EmptyFormatID="CARTHIS"
BottomFormatID="CARTHIS"></cc1:RDBCartList>
<aspataList id="DataList1" runat="server">
<ItemTemplate>
<table>
<tr>
<td>
<%# DataBinder.Eval(Container, "DataItem.CI_Billing_Email")%>
</td>
<td>
<%# DataBinder.Eval(Container, "Cart_ID")%>
</td>
</tr>
</table>
</ItemTemplate>
</aspataList>


CODEBEHIND
/////////////////////////////
cmd="SELECT * FROM Carts,PaymentInformations,CartInformations where
Carts.MainCompany='Market' and CartInformations.MainCompany='Market' and
PaymentInformations.MainCompany='Market' and
Carts.Cart_ID=PaymentInformations.PI_ID and
Carts.Cart_ID=CartInformations.CI_ID and Carts.Cart_AccountCompany='Market'
and Carts.Cart_AccountID='1' order by Carts.Cart_RegisterTime desc ";

baglantim=new SqlConnection ();


baglantim.ConnectionString =data.Connection.ConnectionString;

baglantim.Open ();


SqlCommand mycmd=new SqlCommand(cmd,baglantim);

Response.Write (cmd);

SqlDataAdapter da = new SqlDataAdapter ();

DataSet ds =new DataSet();




da.SelectCommand =mycmd;

da.Fill (ds,"MyTable");


DataList1.DataSource =ds;

DataList1.DataBind ();







Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.