-
Datagrid within a user control
Hi
Here is the situation, I have an aspx page with 10 buttons on it, when each button is clicked I load a user control using the following statement,
Me.DGPanel.Controls.Add(LoadControl("Controls/AmexUC.ascx"))
In each control there is a Label a Textbox and a Datagrid, When the contol loads to the page, Both the label and textbox display fine but there is no datagrid, Here is the code that I am using in the Page_Load of the user control
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
logPath = Request.MapPath("~\\Log\\")
dateFrom = Convert.ToDateTime(Request.QueryString("DateFrom"))
dateTo = Convert.ToDateTime(Request.QueryString("DateTo"))
AmexDataMgr.ListForCollection(dsn, uid, pwd, PriBox, SecBox, Sys, Prod, Serv, db_app, dateFrom, dateTo, "A", "A", coll, logPath)
coll = Me.LoadCollection(coll)
If Not Page.IsPostBack Then
Me.BindData()
End If
End Sub
And the code for BindData():-
Private Sub BindData()
Me.DataGridCtrl.DataSource = coll
Me.DataGridCtrl.DataBind()
End Sub
What am I doing wrong here?? any help would be really appreciated,
Thanks in advance
Srikanth
Similar Threads
-
By Magdalene in forum ASP.NET
Replies: 1
Last Post: 07-05-2005, 06:16 AM
-
By npswarna_13 in forum ASP.NET
Replies: 0
Last Post: 06-27-2005, 06:09 AM
-
By Hunterlmc in forum Web
Replies: 0
Last Post: 06-15-2005, 10:29 AM
-
By kei in forum VB Classic
Replies: 7
Last Post: 12-04-2000, 04:38 AM
-
By Jamie Harsevoort in forum VB Classic
Replies: 4
Last Post: 06-12-2000, 06:56 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks