472,973 Members | 2,230 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 software developers and data experts.

2.0 controlling Databinding

We have been noticing that questions on vs.2005/2.0 don't appear to get much
in answers so I'm reposting some questions posted by some of the programmers
here in our organization that never got answered...

In 1.1 we always did our own myDataAdapter.fills and we liked that control
for lots of good reasons. Now the new DataSource (or is it a
TableAdapter:Dataset) automatically fills the Gridview. How can we control
that fill?

In a forms app there is a Form1.vb that has.....
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

'TODO: This line of code loads data into the
'NorthwindDataSet.Order_Details' table. You can move, or remove it, as
needed.

Me.Order_DetailsTableAdapter.Fill(Me.NorthwindData Set.Order_Details)

'TODO: This line of code loads data into the 'NorthwindDataSet.Orders'
table. You can move, or remove it, as needed.

Me.OrdersTableAdapter1.Fill(Me.NorthwindDataSet.Or ders)

End Sub

Here we can remove or place the code where we want but we can't find that
opportunity in asp apps.
--
Regards,
Gary Blakely
Dec 31 '05 #1
8 2124
Hi Gary,

Welcome.
I've also seen your another thread in this group

Subject: 2.0 DataSources vs. TableAdapter/Datasets

and posted my response there. As I've mentioned there. In ASP.NET
application the page instances are not persisted in memory, each time a
request has been processed (finished..), the page instance and other
related resources will be disposed... So maintain a member dataset or
tableadpater is not quite usable as in winform form class.... If you do
need global object, you can create and store them in ApplciationState /
Cache (or session if user specific...), and then we can reference them in
other pages' code....

We can surely perform the same operation on those DataSet and TableAdapters
like in winform app. e.g:

taOD = Application("ta_order_details")
dsOD = Application("ds_order_details")

taOD.Fill(dsOD.Order_Details)

..............

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "GaryDean" <Ga******@newsgroups.nospam>
| Subject: 2.0 controlling Databinding
| Date: Sat, 31 Dec 2005 14:23:37 -0800
| Lines: 33
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <e8**************@TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: user-vcaur7q.dsl.mindspring.com 216.175.108.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:367881
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| We have been noticing that questions on vs.2005/2.0 don't appear to get
much
| in answers so I'm reposting some questions posted by some of the
programmers
| here in our organization that never got answered...
|
| In 1.1 we always did our own myDataAdapter.fills and we liked that
control
| for lots of good reasons. Now the new DataSource (or is it a
| TableAdapter:Dataset) automatically fills the Gridview. How can we
control
| that fill?
|
| In a forms app there is a Form1.vb that has.....
| Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
| System.EventArgs) Handles MyBase.Load
|
| 'TODO: This line of code loads data into the
| 'NorthwindDataSet.Order_Details' table. You can move, or remove it, as
| needed.
|
| Me.Order_DetailsTableAdapter.Fill(Me.NorthwindData Set.Order_Details)
|
| 'TODO: This line of code loads data into the 'NorthwindDataSet.Orders'
| table. You can move, or remove it, as needed.
|
| Me.OrdersTableAdapter1.Fill(Me.NorthwindDataSet.Or ders)
|
| End Sub
|
| Here we can remove or place the code where we want but we can't find that
| opportunity in asp apps.
| --
| Regards,
| Gary Blakely
|
|
|

Jan 3 '06 #2
let me be more specific.....

If I drop a GridView on an aspx page and then create a datasource for it and
then run the page, it will bind automatically.

I DON'T WANT IT TO BIND AUTOMATICALLY. I want it to bind when button1 is
pushed and not until.

How can I do that? In other words, how can I control my binding
automatically?

Thanks,
Gary

"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:VE****************@TK2MSFTNGXA02.phx.gbl...
Hi Gary,

Welcome.
I've also seen your another thread in this group

Subject: 2.0 DataSources vs. TableAdapter/Datasets

and posted my response there. As I've mentioned there. In ASP.NET
application the page instances are not persisted in memory, each time a
request has been processed (finished..), the page instance and other
related resources will be disposed... So maintain a member dataset or
tableadpater is not quite usable as in winform form class.... If you do
need global object, you can create and store them in ApplciationState /
Cache (or session if user specific...), and then we can reference them in
other pages' code....

We can surely perform the same operation on those DataSet and
TableAdapters
like in winform app. e.g:

taOD = Application("ta_order_details")
dsOD = Application("ds_order_details")

taOD.Fill(dsOD.Order_Details)

.............

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "GaryDean" <Ga******@newsgroups.nospam>
| Subject: 2.0 controlling Databinding
| Date: Sat, 31 Dec 2005 14:23:37 -0800
| Lines: 33
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <e8**************@TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: user-vcaur7q.dsl.mindspring.com 216.175.108.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:367881
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| We have been noticing that questions on vs.2005/2.0 don't appear to get
much
| in answers so I'm reposting some questions posted by some of the
programmers
| here in our organization that never got answered...
|
| In 1.1 we always did our own myDataAdapter.fills and we liked that
control
| for lots of good reasons. Now the new DataSource (or is it a
| TableAdapter:Dataset) automatically fills the Gridview. How can we
control
| that fill?
|
| In a forms app there is a Form1.vb that has.....
| Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
| System.EventArgs) Handles MyBase.Load
|
| 'TODO: This line of code loads data into the
| 'NorthwindDataSet.Order_Details' table. You can move, or remove it, as
| needed.
|
| Me.Order_DetailsTableAdapter.Fill(Me.NorthwindData Set.Order_Details)
|
| 'TODO: This line of code loads data into the 'NorthwindDataSet.Orders'
| table. You can move, or remove it, as needed.
|
| Me.OrdersTableAdapter1.Fill(Me.NorthwindDataSet.Or ders)
|
| End Sub
|
| Here we can remove or place the code where we want but we can't find
that
| opportunity in asp apps.
| --
| Regards,
| Gary Blakely
|
|
|

Jan 3 '06 #3
I mean "manually"

"GaryDean" <Ga******@newsgroups.nospam> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
let me be more specific.....

If I drop a GridView on an aspx page and then create a datasource for it
and then run the page, it will bind automatically.

I DON'T WANT IT TO BIND AUTOMATICALLY. I want it to bind when button1 is
pushed and not until.

How can I do that? In other words, how can I control my binding
automatically?

Thanks,
Gary

"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:VE****************@TK2MSFTNGXA02.phx.gbl...
Hi Gary,

Welcome.
I've also seen your another thread in this group

Subject: 2.0 DataSources vs. TableAdapter/Datasets

and posted my response there. As I've mentioned there. In ASP.NET
application the page instances are not persisted in memory, each time a
request has been processed (finished..), the page instance and other
related resources will be disposed... So maintain a member dataset or
tableadpater is not quite usable as in winform form class.... If you do
need global object, you can create and store them in ApplciationState /
Cache (or session if user specific...), and then we can reference them
in
other pages' code....

We can surely perform the same operation on those DataSet and
TableAdapters
like in winform app. e.g:

taOD = Application("ta_order_details")
dsOD = Application("ds_order_details")

taOD.Fill(dsOD.Order_Details)

.............

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "GaryDean" <Ga******@newsgroups.nospam>
| Subject: 2.0 controlling Databinding
| Date: Sat, 31 Dec 2005 14:23:37 -0800
| Lines: 33
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <e8**************@TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: user-vcaur7q.dsl.mindspring.com 216.175.108.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:367881
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| We have been noticing that questions on vs.2005/2.0 don't appear to get
much
| in answers so I'm reposting some questions posted by some of the
programmers
| here in our organization that never got answered...
|
| In 1.1 we always did our own myDataAdapter.fills and we liked that
control
| for lots of good reasons. Now the new DataSource (or is it a
| TableAdapter:Dataset) automatically fills the Gridview. How can we
control
| that fill?
|
| In a forms app there is a Form1.vb that has.....
| Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
| System.EventArgs) Handles MyBase.Load
|
| 'TODO: This line of code loads data into the
| 'NorthwindDataSet.Order_Details' table. You can move, or remove it, as
| needed.
|
| Me.Order_DetailsTableAdapter.Fill(Me.NorthwindData Set.Order_Details)
|
| 'TODO: This line of code loads data into the 'NorthwindDataSet.Orders'
| table. You can move, or remove it, as needed.
|
| Me.OrdersTableAdapter1.Fill(Me.NorthwindDataSet.Or ders)
|
| End Sub
|
| Here we can remove or place the code where we want but we can't find
that
| opportunity in asp apps.
| --
| Regards,
| Gary Blakely
|
|
|


Jan 3 '06 #4
Hi Gary,

DataBound control automatically retrieve datas from the DataSource control
is because you assign the DataSourceID of the databound control at
design-time, and the asp.net 2.0 databound controls will automatically do
the databinding when the DataSourceID is configured... Also, this
automatic databinding is performed during the PreRender event......

If you do not want such automatic databinding, you can consider either of
the following means:

1. Assign the DataSourceID at runtime (in a certain of your control's
postback event) and call databind method....

2. Call DataSourceControl.Select method to get the IEnumerable collection
(datasource object) and assign it to DataBoundControl.DataSource property
and call databind method....

Here is a simple test page which have three buttons, two of them use the
above two means and another used for clear the databinding:

============================
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:LocalNorthWind %>"
SelectCommand="SELECT [CategoryID], [CategoryName],
[Description] FROM [Categories]">
</asp:SqlDataSource>
<asp:Button ID="btnDetach" runat="server" OnClick="btnDetach_Click"
Text="Detach" />
<asp:Button ID="btnBindDS" runat="server" OnClick="btnBindDS_Click"
Text="Bind DataSource Object" />
<asp:Button ID="btnBindDSC" runat="server"
OnClick="btnBindDSC_Click" Text="BindDataSourceControl" />
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>

</div>
</form>
</body>
=============================================
public partial class GridView_GridViewPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void btnDetach_Click(object sender, EventArgs e)
{
GridView1.DataSourceID = string.Empty;
GridView1.DataSource = null;
GridView1.DataBind();
}
protected void btnBindDS_Click(object sender, EventArgs e)
{
GridView1.DataSourceID = string.Empty;
GridView1.DataSource =
SqlDataSource1.Select(DataSourceSelectArguments.Em pty);

GridView1.DataBind();
}
protected void btnBindDSC_Click(object sender, EventArgs e)
{
GridView1.DataSource = null;
GridView1.DataSourceID = "SqlDataSource1";
GridView1.DataBind();
}
}
==========================

So ASP.NET 2.0 provide both ondemand or automatic (declarative means)
databinding... And usually the IDE design-time will help do most of the
work, however when we need advanced functions or more flexible design, we
can still add our code to do it whatever means we like....

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "GaryDean" <Ga******@newsgroups.nospam>
| References: <e8**************@TK2MSFTNGP14.phx.gbl>
<VE**************@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: 2.0 controlling Databinding
| Date: Tue, 3 Jan 2006 10:02:58 -0800
| Lines: 114
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <#K*************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: user-vcauk40.dsl.mindspring.com 216.175.80.128
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:368322
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| let me be more specific.....
|
| If I drop a GridView on an aspx page and then create a datasource for it
and
| then run the page, it will bind automatically.
|
| I DON'T WANT IT TO BIND AUTOMATICALLY. I want it to bind when button1 is
| pushed and not until.
|
| How can I do that? In other words, how can I control my binding
| automatically?
|
| Thanks,
| Gary
|
| "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| news:VE****************@TK2MSFTNGXA02.phx.gbl...
| > Hi Gary,
| >
| > Welcome.
| > I've also seen your another thread in this group
| >
| > Subject: 2.0 DataSources vs. TableAdapter/Datasets
| >
| > and posted my response there. As I've mentioned there. In ASP.NET
| > application the page instances are not persisted in memory, each time a
| > request has been processed (finished..), the page instance and other
| > related resources will be disposed... So maintain a member dataset or
| > tableadpater is not quite usable as in winform form class.... If you
do
| > need global object, you can create and store them in ApplciationState /
| > Cache (or session if user specific...), and then we can reference them
in
| > other pages' code....
| >
| > We can surely perform the same operation on those DataSet and
| > TableAdapters
| > like in winform app. e.g:
| >
| > taOD = Application("ta_order_details")
| > dsOD = Application("ds_order_details")
| >
| > taOD.Fill(dsOD.Order_Details)
| >
| > .............
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| > --------------------
| > | From: "GaryDean" <Ga******@newsgroups.nospam>
| > | Subject: 2.0 controlling Databinding
| > | Date: Sat, 31 Dec 2005 14:23:37 -0800
| > | Lines: 33
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| > | X-RFC2646: Format=Flowed; Original
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| > | Message-ID: <e8**************@TK2MSFTNGP14.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: user-vcaur7q.dsl.mindspring.com 216.175.108.250
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:367881
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | We have been noticing that questions on vs.2005/2.0 don't appear to
get
| > much
| > | in answers so I'm reposting some questions posted by some of the
| > programmers
| > | here in our organization that never got answered...
| > |
| > | In 1.1 we always did our own myDataAdapter.fills and we liked that
| > control
| > | for lots of good reasons. Now the new DataSource (or is it a
| > | TableAdapter:Dataset) automatically fills the Gridview. How can we
| > control
| > | that fill?
| > |
| > | In a forms app there is a Form1.vb that has.....
| > | Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
| > | System.EventArgs) Handles MyBase.Load
| > |
| > | 'TODO: This line of code loads data into the
| > | 'NorthwindDataSet.Order_Details' table. You can move, or remove it, as
| > | needed.
| > |
| > | Me.Order_DetailsTableAdapter.Fill(Me.NorthwindData Set.Order_Details)
| > |
| > | 'TODO: This line of code loads data into the 'NorthwindDataSet.Orders'
| > | table. You can move, or remove it, as needed.
| > |
| > | Me.OrdersTableAdapter1.Fill(Me.NorthwindDataSet.Or ders)
| > |
| > | End Sub
| > |
| > | Here we can remove or place the code where we want but we can't find
| > that
| > | opportunity in asp apps.
| > | --
| > | Regards,
| > | Gary Blakely
| > |
| > |
| > |
| >
|
|
|

Jan 4 '06 #5
Steven,
What you say works ok but it does not provide the control we had with the
old dataGrid and Dataset...

With the datagrid I could add and edit columns at design time from a dataset
(maybe just a template dataset). I could apply edits to dates i.e. {0:d},
provide custom headings, etc. The dataset remained assigned but no fill
was done.

At run time I could do the fill on a button click event and my grid would
appear with all custom headings and edits in place. However in 2.0 if I do
all of those custom headings and edits at design time and then remove the
datasourceID I get a dialog box that says all columns will be removed and
therefore all of my edits and headings.

Being able to control the .fill in 1.1 gave us control at a lower level of
granularity than we have now. BTW, I see that I can control the fill in
Forms apps still in 2.0 as the .fills are done in the form1.vb file and I
can move those anywhere I want.

Is there anyway to control the timing of just the fill in asp?
--
Regards,
Gary Blakely
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:I8**************@TK2MSFTNGXA02.phx.gbl...
Hi Gary,

DataBound control automatically retrieve datas from the DataSource control
is because you assign the DataSourceID of the databound control at
design-time, and the asp.net 2.0 databound controls will automatically do
the databinding when the DataSourceID is configured... Also, this
automatic databinding is performed during the PreRender event......

If you do not want such automatic databinding, you can consider either of
the following means:

1. Assign the DataSourceID at runtime (in a certain of your control's
postback event) and call databind method....

2. Call DataSourceControl.Select method to get the IEnumerable collection
(datasource object) and assign it to DataBoundControl.DataSource property
and call databind method....

Here is a simple test page which have three buttons, two of them use the
above two means and another used for clear the databinding:

============================
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:LocalNorthWind %>"
SelectCommand="SELECT [CategoryID], [CategoryName],
[Description] FROM [Categories]">
</asp:SqlDataSource>
<asp:Button ID="btnDetach" runat="server" OnClick="btnDetach_Click"
Text="Detach" />
<asp:Button ID="btnBindDS" runat="server" OnClick="btnBindDS_Click"
Text="Bind DataSource Object" />
<asp:Button ID="btnBindDSC" runat="server"
OnClick="btnBindDSC_Click" Text="BindDataSourceControl" />
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>

</div>
</form>
</body>
=============================================
public partial class GridView_GridViewPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void btnDetach_Click(object sender, EventArgs e)
{
GridView1.DataSourceID = string.Empty;
GridView1.DataSource = null;
GridView1.DataBind();
}
protected void btnBindDS_Click(object sender, EventArgs e)
{
GridView1.DataSourceID = string.Empty;
GridView1.DataSource =
SqlDataSource1.Select(DataSourceSelectArguments.Em pty);

GridView1.DataBind();
}
protected void btnBindDSC_Click(object sender, EventArgs e)
{
GridView1.DataSource = null;
GridView1.DataSourceID = "SqlDataSource1";
GridView1.DataBind();
}
}
==========================

So ASP.NET 2.0 provide both ondemand or automatic (declarative means)
databinding... And usually the IDE design-time will help do most of the
work, however when we need advanced functions or more flexible design, we
can still add our code to do it whatever means we like....

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "GaryDean" <Ga******@newsgroups.nospam>
| References: <e8**************@TK2MSFTNGP14.phx.gbl>
<VE**************@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: 2.0 controlling Databinding
| Date: Tue, 3 Jan 2006 10:02:58 -0800
| Lines: 114
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <#K*************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: user-vcauk40.dsl.mindspring.com 216.175.80.128
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:368322
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| let me be more specific.....
|
| If I drop a GridView on an aspx page and then create a datasource for it
and
| then run the page, it will bind automatically.
|
| I DON'T WANT IT TO BIND AUTOMATICALLY. I want it to bind when button1
is
| pushed and not until.
|
| How can I do that? In other words, how can I control my binding
| automatically?
|
| Thanks,
| Gary
|
| "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| news:VE****************@TK2MSFTNGXA02.phx.gbl...
| > Hi Gary,
| >
| > Welcome.
| > I've also seen your another thread in this group
| >
| > Subject: 2.0 DataSources vs. TableAdapter/Datasets
| >
| > and posted my response there. As I've mentioned there. In ASP.NET
| > application the page instances are not persisted in memory, each time
a
| > request has been processed (finished..), the page instance and other
| > related resources will be disposed... So maintain a member dataset or
| > tableadpater is not quite usable as in winform form class.... If you
do
| > need global object, you can create and store them in ApplciationState
/
| > Cache (or session if user specific...), and then we can reference
them
in
| > other pages' code....
| >
| > We can surely perform the same operation on those DataSet and
| > TableAdapters
| > like in winform app. e.g:
| >
| > taOD = Application("ta_order_details")
| > dsOD = Application("ds_order_details")
| >
| > taOD.Fill(dsOD.Order_Details)
| >
| > .............
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| > --------------------
| > | From: "GaryDean" <Ga******@newsgroups.nospam>
| > | Subject: 2.0 controlling Databinding
| > | Date: Sat, 31 Dec 2005 14:23:37 -0800
| > | Lines: 33
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| > | X-RFC2646: Format=Flowed; Original
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| > | Message-ID: <e8**************@TK2MSFTNGP14.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: user-vcaur7q.dsl.mindspring.com 216.175.108.250
| > | Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:367881
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | We have been noticing that questions on vs.2005/2.0 don't appear to
get
| > much
| > | in answers so I'm reposting some questions posted by some of the
| > programmers
| > | here in our organization that never got answered...
| > |
| > | In 1.1 we always did our own myDataAdapter.fills and we liked that
| > control
| > | for lots of good reasons. Now the new DataSource (or is it a
| > | TableAdapter:Dataset) automatically fills the Gridview. How can we
| > control
| > | that fill?
| > |
| > | In a forms app there is a Form1.vb that has.....
| > | Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
| > | System.EventArgs) Handles MyBase.Load
| > |
| > | 'TODO: This line of code loads data into the
| > | 'NorthwindDataSet.Order_Details' table. You can move, or remove it,
as
| > | needed.
| > |
| > | Me.Order_DetailsTableAdapter.Fill(Me.NorthwindData Set.Order_Details)
| > |
| > | 'TODO: This line of code loads data into the
'NorthwindDataSet.Orders'
| > | table. You can move, or remove it, as needed.
| > |
| > | Me.OrdersTableAdapter1.Fill(Me.NorthwindDataSet.Or ders)
| > |
| > | End Sub
| > |
| > | Here we can remove or place the code where we want but we can't find
| > that
| > | opportunity in asp apps.
| > | --
| > | Regards,
| > | Gary Blakely
| > |
| > |
| > |
| >
|
|
|

Jan 9 '06 #6
Hi Gary,

When you detach a DataSource control from Gridview, you can choose not to
clear the schema so that those defined columns still there and we can
choose to assign the datasource control to completely at runtime....

And for the new DataSource model, which no longer use vs 2003's data
component +DataGrid(which rely on designer genrated code) is also going to
resolve many problem which exists in vs 2003 since those designer generated
code is easy to be auto modifed and not easy to control....

For SqlDataSource, it's a very simple one which is suitable for RAD or
create application prototype. As far as I known most advanced developers
will create their own data access components and used with object
datasource or still use programmatically databinding through code. We're
not forced to use any of them...

In addition, we're still open to VS 2003 + ASP.NET 1.1 since asp.net 2.0 is
targeting .net framework 2.0 and new compilation model... If you do feel
the old asp.net 1.1 model is more suitable for developing, we can just use
vs 2003 to dev our application in 1.1 version and IIS server can support
both version deployed side by side...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "GaryDean" <Ga******@newsgroups.nospam>
| References: <e8**************@TK2MSFTNGP14.phx.gbl>
<VE**************@TK2MSFTNGXA02.phx.gbl>
<#K*************@TK2MSFTNGP10.phx.gbl>
<I8**************@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: 2.0 controlling Databinding
| Date: Mon, 9 Jan 2006 10:35:23 -0800
| Lines: 268
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <Ow**************@TK2MSFTNGP15.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 216.244.8.41
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:369565
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Steven,
| What you say works ok but it does not provide the control we had with the
| old dataGrid and Dataset...
|
| With the datagrid I could add and edit columns at design time from a
dataset
| (maybe just a template dataset). I could apply edits to dates i.e.
{0:d},
| provide custom headings, etc. The dataset remained assigned but no fill
| was done.
|
| At run time I could do the fill on a button click event and my grid would
| appear with all custom headings and edits in place. However in 2.0 if I
do
| all of those custom headings and edits at design time and then remove the
| datasourceID I get a dialog box that says all columns will be removed and
| therefore all of my edits and headings.
|
| Being able to control the .fill in 1.1 gave us control at a lower level
of
| granularity than we have now. BTW, I see that I can control the fill in
| Forms apps still in 2.0 as the .fills are done in the form1.vb file and I
| can move those anywhere I want.
|
| Is there anyway to control the timing of just the fill in asp?
|
|
| --
| Regards,
| Gary Blakely
| "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| news:I8**************@TK2MSFTNGXA02.phx.gbl...
| > Hi Gary,
| >
| > DataBound control automatically retrieve datas from the DataSource
control
| > is because you assign the DataSourceID of the databound control at
| > design-time, and the asp.net 2.0 databound controls will automatically
do
| > the databinding when the DataSourceID is configured... Also, this
| > automatic databinding is performed during the PreRender event......
| >
| > If you do not want such automatic databinding, you can consider either
of
| > the following means:
| >
| > 1. Assign the DataSourceID at runtime (in a certain of your control's
| > postback event) and call databind method....
| >
| > 2. Call DataSourceControl.Select method to get the IEnumerable
collection
| > (datasource object) and assign it to DataBoundControl.DataSource
property
| > and call databind method....
| >
| > Here is a simple test page which have three buttons, two of them use the
| > above two means and another used for clear the databinding:
| >
| > ============================
| > <html xmlns="http://www.w3.org/1999/xhtml" >
| > <head runat="server">
| > <title>Untitled Page</title>
| > </head>
| > <body>
| > <form id="form1" runat="server">
| > <div>
| > <asp:SqlDataSource ID="SqlDataSource1" runat="server"
| > ConnectionString="<%$ ConnectionStrings:LocalNorthWind %>"
| > SelectCommand="SELECT [CategoryID], [CategoryName],
| > [Description] FROM [Categories]">
| > </asp:SqlDataSource>
| > <asp:Button ID="btnDetach" runat="server"
OnClick="btnDetach_Click"
| > Text="Detach" />
| > <asp:Button ID="btnBindDS" runat="server"
OnClick="btnBindDS_Click"
| > Text="Bind DataSource Object" />
| > <asp:Button ID="btnBindDSC" runat="server"
| > OnClick="btnBindDSC_Click" Text="BindDataSourceControl" />
| > <asp:GridView ID="GridView1" runat="server">
| > </asp:GridView>
| >
| > </div>
| > </form>
| > </body>
| >
| >
| > =============================================
| > public partial class GridView_GridViewPage : System.Web.UI.Page
| > {
| > protected void Page_Load(object sender, EventArgs e)
| > {
| >
| > }
| > protected void btnDetach_Click(object sender, EventArgs e)
| > {
| > GridView1.DataSourceID = string.Empty;
| > GridView1.DataSource = null;
| > GridView1.DataBind();
| > }
| > protected void btnBindDS_Click(object sender, EventArgs e)
| > {
| > GridView1.DataSourceID = string.Empty;
| > GridView1.DataSource =
| > SqlDataSource1.Select(DataSourceSelectArguments.Em pty);
| >
| > GridView1.DataBind();
| > }
| > protected void btnBindDSC_Click(object sender, EventArgs e)
| > {
| > GridView1.DataSource = null;
| > GridView1.DataSourceID = "SqlDataSource1";
| > GridView1.DataBind();
| > }
| > }
| > ==========================
| >
| > So ASP.NET 2.0 provide both ondemand or automatic (declarative means)
| > databinding... And usually the IDE design-time will help do most of the
| > work, however when we need advanced functions or more flexible design,
we
| > can still add our code to do it whatever means we like....
| >
| > Hope helps. Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | From: "GaryDean" <Ga******@newsgroups.nospam>
| > | References: <e8**************@TK2MSFTNGP14.phx.gbl>
| > <VE**************@TK2MSFTNGXA02.phx.gbl>
| > | Subject: Re: 2.0 controlling Databinding
| > | Date: Tue, 3 Jan 2006 10:02:58 -0800
| > | Lines: 114
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| > | X-RFC2646: Format=Flowed; Original
| > | Message-ID: <#K*************@TK2MSFTNGP10.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: user-vcauk40.dsl.mindspring.com 216.175.80.128
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:368322
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | let me be more specific.....
| > |
| > | If I drop a GridView on an aspx page and then create a datasource for
it
| > and
| > | then run the page, it will bind automatically.
| > |
| > | I DON'T WANT IT TO BIND AUTOMATICALLY. I want it to bind when
button1
| > is
| > | pushed and not until.
| > |
| > | How can I do that? In other words, how can I control my binding
| > | automatically?
| > |
| > | Thanks,
| > | Gary
| > |
| > | "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| > | news:VE****************@TK2MSFTNGXA02.phx.gbl...
| > | > Hi Gary,
| > | >
| > | > Welcome.
| > | > I've also seen your another thread in this group
| > | >
| > | > Subject: 2.0 DataSources vs. TableAdapter/Datasets
| > | >
| > | > and posted my response there. As I've mentioned there. In ASP.NET
| > | > application the page instances are not persisted in memory, each
time
| > a
| > | > request has been processed (finished..), the page instance and other
| > | > related resources will be disposed... So maintain a member dataset
or
| > | > tableadpater is not quite usable as in winform form class.... If
you
| > do
| > | > need global object, you can create and store them in
ApplciationState
| > /
| > | > Cache (or session if user specific...), and then we can reference
| > them
| > in
| > | > other pages' code....
| > | >
| > | > We can surely perform the same operation on those DataSet and
| > | > TableAdapters
| > | > like in winform app. e.g:
| > | >
| > | > taOD = Application("ta_order_details")
| > | > dsOD = Application("ds_order_details")
| > | >
| > | > taOD.Fill(dsOD.Order_Details)
| > | >
| > | > .............
| > | >
| > | > Thanks,
| > | >
| > | > Steven Cheng
| > | > Microsoft Online Support
| > | >
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > | >
| > | >
| > | >
| > | > --------------------
| > | > | From: "GaryDean" <Ga******@newsgroups.nospam>
| > | > | Subject: 2.0 controlling Databinding
| > | > | Date: Sat, 31 Dec 2005 14:23:37 -0800
| > | > | Lines: 33
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| > | > | X-RFC2646: Format=Flowed; Original
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| > | > | Message-ID: <e8**************@TK2MSFTNGP14.phx.gbl>
| > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | > | NNTP-Posting-Host: user-vcaur7q.dsl.mindspring.com 216.175.108.250
| > | > | Path:
| > TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| > | > | Xref: TK2MSFTNGXA02.phx.gbl
| > | > microsoft.public.dotnet.framework.aspnet:367881
| > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | > |
| > | > | We have been noticing that questions on vs.2005/2.0 don't appear
to
| > get
| > | > much
| > | > | in answers so I'm reposting some questions posted by some of the
| > | > programmers
| > | > | here in our organization that never got answered...
| > | > |
| > | > | In 1.1 we always did our own myDataAdapter.fills and we liked that
| > | > control
| > | > | for lots of good reasons. Now the new DataSource (or is it a
| > | > | TableAdapter:Dataset) automatically fills the Gridview. How can
we
| > | > control
| > | > | that fill?
| > | > |
| > | > | In a forms app there is a Form1.vb that has.....
| > | > | Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
| > | > | System.EventArgs) Handles MyBase.Load
| > | > |
| > | > | 'TODO: This line of code loads data into the
| > | > | 'NorthwindDataSet.Order_Details' table. You can move, or remove
it,
| > as
| > | > | needed.
| > | > |
| > | > |
Me.Order_DetailsTableAdapter.Fill(Me.NorthwindData Set.Order_Details)
| > | > |
| > | > | 'TODO: This line of code loads data into the
| > 'NorthwindDataSet.Orders'
| > | > | table. You can move, or remove it, as needed.
| > | > |
| > | > | Me.OrdersTableAdapter1.Fill(Me.NorthwindDataSet.Or ders)
| > | > |
| > | > | End Sub
| > | > |
| > | > | Here we can remove or place the code where we want but we can't
find
| > | > that
| > | > | opportunity in asp apps.
| > | > | --
| > | > | Regards,
| > | > | Gary Blakely
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Jan 10 '06 #7
Steven,
I actually was decoupling the DataSet from the ObjectDataSource where it
destroyed all the columns. You are right, that I can opt to keep the
columns when decoupling the Gridview from the ObjectDatasource.

I still wish we could control the fill like we can in asp 2003 and Forms
2005 :)

Thanks for clearing this up.
--
Regards,
Gary Blakely
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:lw**************@TK2MSFTNGXA02.phx.gbl...
Hi Gary,

When you detach a DataSource control from Gridview, you can choose not to
clear the schema so that those defined columns still there and we can
choose to assign the datasource control to completely at runtime....

And for the new DataSource model, which no longer use vs 2003's data
component +DataGrid(which rely on designer genrated code) is also going to
resolve many problem which exists in vs 2003 since those designer
generated
code is easy to be auto modifed and not easy to control....

For SqlDataSource, it's a very simple one which is suitable for RAD or
create application prototype. As far as I known most advanced developers
will create their own data access components and used with object
datasource or still use programmatically databinding through code. We're
not forced to use any of them...

In addition, we're still open to VS 2003 + ASP.NET 1.1 since asp.net 2.0
is
targeting .net framework 2.0 and new compilation model... If you do feel
the old asp.net 1.1 model is more suitable for developing, we can just use
vs 2003 to dev our application in 1.1 version and IIS server can support
both version deployed side by side...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "GaryDean" <Ga******@newsgroups.nospam>
| References: <e8**************@TK2MSFTNGP14.phx.gbl>
<VE**************@TK2MSFTNGXA02.phx.gbl>
<#K*************@TK2MSFTNGP10.phx.gbl>
<I8**************@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: 2.0 controlling Databinding
| Date: Mon, 9 Jan 2006 10:35:23 -0800
| Lines: 268
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <Ow**************@TK2MSFTNGP15.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 216.244.8.41
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:369565
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Steven,
| What you say works ok but it does not provide the control we had with
the
| old dataGrid and Dataset...
|
| With the datagrid I could add and edit columns at design time from a
dataset
| (maybe just a template dataset). I could apply edits to dates i.e.
{0:d},
| provide custom headings, etc. The dataset remained assigned but no
fill
| was done.
|
| At run time I could do the fill on a button click event and my grid
would
| appear with all custom headings and edits in place. However in 2.0 if I
do
| all of those custom headings and edits at design time and then remove
the
| datasourceID I get a dialog box that says all columns will be removed
and
| therefore all of my edits and headings.
|
| Being able to control the .fill in 1.1 gave us control at a lower level
of
| granularity than we have now. BTW, I see that I can control the fill in
| Forms apps still in 2.0 as the .fills are done in the form1.vb file and
I
| can move those anywhere I want.
|
| Is there anyway to control the timing of just the fill in asp?
|
|
| --
| Regards,
| Gary Blakely
| "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| news:I8**************@TK2MSFTNGXA02.phx.gbl...
| > Hi Gary,
| >
| > DataBound control automatically retrieve datas from the DataSource
control
| > is because you assign the DataSourceID of the databound control at
| > design-time, and the asp.net 2.0 databound controls will automatically
do
| > the databinding when the DataSourceID is configured... Also, this
| > automatic databinding is performed during the PreRender event......
| >
| > If you do not want such automatic databinding, you can consider either
of
| > the following means:
| >
| > 1. Assign the DataSourceID at runtime (in a certain of your control's
| > postback event) and call databind method....
| >
| > 2. Call DataSourceControl.Select method to get the IEnumerable
collection
| > (datasource object) and assign it to DataBoundControl.DataSource
property
| > and call databind method....
| >
| > Here is a simple test page which have three buttons, two of them use
the
| > above two means and another used for clear the databinding:
| >
| > ============================
| > <html xmlns="http://www.w3.org/1999/xhtml" >
| > <head runat="server">
| > <title>Untitled Page</title>
| > </head>
| > <body>
| > <form id="form1" runat="server">
| > <div>
| > <asp:SqlDataSource ID="SqlDataSource1" runat="server"
| > ConnectionString="<%$ ConnectionStrings:LocalNorthWind %>"
| > SelectCommand="SELECT [CategoryID], [CategoryName],
| > [Description] FROM [Categories]">
| > </asp:SqlDataSource>
| > <asp:Button ID="btnDetach" runat="server"
OnClick="btnDetach_Click"
| > Text="Detach" />
| > <asp:Button ID="btnBindDS" runat="server"
OnClick="btnBindDS_Click"
| > Text="Bind DataSource Object" />
| > <asp:Button ID="btnBindDSC" runat="server"
| > OnClick="btnBindDSC_Click" Text="BindDataSourceControl" />
| > <asp:GridView ID="GridView1" runat="server">
| > </asp:GridView>
| >
| > </div>
| > </form>
| > </body>
| >
| >
| > =============================================
| > public partial class GridView_GridViewPage : System.Web.UI.Page
| > {
| > protected void Page_Load(object sender, EventArgs e)
| > {
| >
| > }
| > protected void btnDetach_Click(object sender, EventArgs e)
| > {
| > GridView1.DataSourceID = string.Empty;
| > GridView1.DataSource = null;
| > GridView1.DataBind();
| > }
| > protected void btnBindDS_Click(object sender, EventArgs e)
| > {
| > GridView1.DataSourceID = string.Empty;
| > GridView1.DataSource =
| > SqlDataSource1.Select(DataSourceSelectArguments.Em pty);
| >
| > GridView1.DataBind();
| > }
| > protected void btnBindDSC_Click(object sender, EventArgs e)
| > {
| > GridView1.DataSource = null;
| > GridView1.DataSourceID = "SqlDataSource1";
| > GridView1.DataBind();
| > }
| > }
| > ==========================
| >
| > So ASP.NET 2.0 provide both ondemand or automatic (declarative means)
| > databinding... And usually the IDE design-time will help do most of
the
| > work, however when we need advanced functions or more flexible design,
we
| > can still add our code to do it whatever means we like....
| >
| > Hope helps. Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | From: "GaryDean" <Ga******@newsgroups.nospam>
| > | References: <e8**************@TK2MSFTNGP14.phx.gbl>
| > <VE**************@TK2MSFTNGXA02.phx.gbl>
| > | Subject: Re: 2.0 controlling Databinding
| > | Date: Tue, 3 Jan 2006 10:02:58 -0800
| > | Lines: 114
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| > | X-RFC2646: Format=Flowed; Original
| > | Message-ID: <#K*************@TK2MSFTNGP10.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: user-vcauk40.dsl.mindspring.com 216.175.80.128
| > | Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:368322
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | let me be more specific.....
| > |
| > | If I drop a GridView on an aspx page and then create a datasource
for
it
| > and
| > | then run the page, it will bind automatically.
| > |
| > | I DON'T WANT IT TO BIND AUTOMATICALLY. I want it to bind when
button1
| > is
| > | pushed and not until.
| > |
| > | How can I do that? In other words, how can I control my binding
| > | automatically?
| > |
| > | Thanks,
| > | Gary
| > |
| > | "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| > | news:VE****************@TK2MSFTNGXA02.phx.gbl...
| > | > Hi Gary,
| > | >
| > | > Welcome.
| > | > I've also seen your another thread in this group
| > | >
| > | > Subject: 2.0 DataSources vs. TableAdapter/Datasets
| > | >
| > | > and posted my response there. As I've mentioned there. In ASP.NET
| > | > application the page instances are not persisted in memory, each
time
| > a
| > | > request has been processed (finished..), the page instance and
other
| > | > related resources will be disposed... So maintain a member dataset
or
| > | > tableadpater is not quite usable as in winform form class.... If
you
| > do
| > | > need global object, you can create and store them in
ApplciationState
| > /
| > | > Cache (or session if user specific...), and then we can reference
| > them
| > in
| > | > other pages' code....
| > | >
| > | > We can surely perform the same operation on those DataSet and
| > | > TableAdapters
| > | > like in winform app. e.g:
| > | >
| > | > taOD = Application("ta_order_details")
| > | > dsOD = Application("ds_order_details")
| > | >
| > | > taOD.Fill(dsOD.Order_Details)
| > | >
| > | > .............
| > | >
| > | > Thanks,
| > | >
| > | > Steven Cheng
| > | > Microsoft Online Support
| > | >
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > | >
| > | >
| > | >
| > | > --------------------
| > | > | From: "GaryDean" <Ga******@newsgroups.nospam>
| > | > | Subject: 2.0 controlling Databinding
| > | > | Date: Sat, 31 Dec 2005 14:23:37 -0800
| > | > | Lines: 33
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| > | > | X-RFC2646: Format=Flowed; Original
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| > | > | Message-ID: <e8**************@TK2MSFTNGP14.phx.gbl>
| > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | > | NNTP-Posting-Host: user-vcaur7q.dsl.mindspring.com
216.175.108.250
| > | > | Path:
| > TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| > | > | Xref: TK2MSFTNGXA02.phx.gbl
| > | > microsoft.public.dotnet.framework.aspnet:367881
| > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | > |
| > | > | We have been noticing that questions on vs.2005/2.0 don't appear
to
| > get
| > | > much
| > | > | in answers so I'm reposting some questions posted by some of the
| > | > programmers
| > | > | here in our organization that never got answered...
| > | > |
| > | > | In 1.1 we always did our own myDataAdapter.fills and we liked
that
| > | > control
| > | > | for lots of good reasons. Now the new DataSource (or is it a
| > | > | TableAdapter:Dataset) automatically fills the Gridview. How can
we
| > | > control
| > | > | that fill?
| > | > |
| > | > | In a forms app there is a Form1.vb that has.....
| > | > | Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
| > | > | System.EventArgs) Handles MyBase.Load
| > | > |
| > | > | 'TODO: This line of code loads data into the
| > | > | 'NorthwindDataSet.Order_Details' table. You can move, or remove
it,
| > as
| > | > | needed.
| > | > |
| > | > |
Me.Order_DetailsTableAdapter.Fill(Me.NorthwindData Set.Order_Details)
| > | > |
| > | > | 'TODO: This line of code loads data into the
| > 'NorthwindDataSet.Orders'
| > | > | table. You can move, or remove it, as needed.
| > | > |
| > | > | Me.OrdersTableAdapter1.Fill(Me.NorthwindDataSet.Or ders)
| > | > |
| > | > | End Sub
| > | > |
| > | > | Here we can remove or place the code where we want but we can't
find
| > | > that
| > | > | opportunity in asp apps.
| > | > | --
| > | > | Regards,
| > | > | Gary Blakely
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Jan 11 '06 #8
For control the fill like in vs 2003/ asp.net 1.1, another option is add
all the code (generated in vs 2003) in our own custom function, but do not
use the design-time interface since VS 2005 is not targeting the vs 2003
component based data access model. We need to maintain those code ourself.
At runtime, we create the DataSet and Adpater and fill the dataset to bind
to GridView or DataList....

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "GaryDean" <Ga******@newsgroups.nospam>
| References: <e8**************@TK2MSFTNGP14.phx.gbl>
<VE**************@TK2MSFTNGXA02.phx.gbl>
<#K*************@TK2MSFTNGP10.phx.gbl>
<I8**************@TK2MSFTNGXA02.phx.gbl>
<Ow**************@TK2MSFTNGP15.phx.gbl>
<lw**************@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: 2.0 controlling Databinding
| Date: Tue, 10 Jan 2006 17:03:27 -0800
| Lines: 380
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <ea**************@tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: user-3cf8219.dsl.mindspring.com 216.244.8.41
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:369955
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Steven,
| I actually was decoupling the DataSet from the ObjectDataSource where it
| destroyed all the columns. You are right, that I can opt to keep the
| columns when decoupling the Gridview from the ObjectDatasource.
|
| I still wish we could control the fill like we can in asp 2003 and Forms
| 2005 :)
|
| Thanks for clearing this up.
| --
| Regards,
| Gary Blakely
| "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| news:lw**************@TK2MSFTNGXA02.phx.gbl...
| > Hi Gary,
| >
| > When you detach a DataSource control from Gridview, you can choose not
to
| > clear the schema so that those defined columns still there and we can
| > choose to assign the datasource control to completely at runtime....
| >
| > And for the new DataSource model, which no longer use vs 2003's data
| > component +DataGrid(which rely on designer genrated code) is also going
to
| > resolve many problem which exists in vs 2003 since those designer
| > generated
| > code is easy to be auto modifed and not easy to control....
| >
| > For SqlDataSource, it's a very simple one which is suitable for RAD or
| > create application prototype. As far as I known most advanced developers
| > will create their own data access components and used with object
| > datasource or still use programmatically databinding through code. We're
| > not forced to use any of them...
| >
| > In addition, we're still open to VS 2003 + ASP.NET 1.1 since asp.net
2.0
| > is
| > targeting .net framework 2.0 and new compilation model... If you do feel
| > the old asp.net 1.1 model is more suitable for developing, we can just
use
| > vs 2003 to dev our application in 1.1 version and IIS server can support
| > both version deployed side by side...
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| > --------------------
| > | From: "GaryDean" <Ga******@newsgroups.nospam>
| > | References: <e8**************@TK2MSFTNGP14.phx.gbl>
| > <VE**************@TK2MSFTNGXA02.phx.gbl>
| > <#K*************@TK2MSFTNGP10.phx.gbl>
| > <I8**************@TK2MSFTNGXA02.phx.gbl>
| > | Subject: Re: 2.0 controlling Databinding
| > | Date: Mon, 9 Jan 2006 10:35:23 -0800
| > | Lines: 268
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| > | X-RFC2646: Format=Flowed; Original
| > | Message-ID: <Ow**************@TK2MSFTNGP15.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: 216.244.8.41
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:369565
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Steven,
| > | What you say works ok but it does not provide the control we had with
| > the
| > | old dataGrid and Dataset...
| > |
| > | With the datagrid I could add and edit columns at design time from a
| > dataset
| > | (maybe just a template dataset). I could apply edits to dates i.e.
| > {0:d},
| > | provide custom headings, etc. The dataset remained assigned but no
| > fill
| > | was done.
| > |
| > | At run time I could do the fill on a button click event and my grid
| > would
| > | appear with all custom headings and edits in place. However in 2.0
if I
| > do
| > | all of those custom headings and edits at design time and then remove
| > the
| > | datasourceID I get a dialog box that says all columns will be removed
| > and
| > | therefore all of my edits and headings.
| > |
| > | Being able to control the .fill in 1.1 gave us control at a lower
level
| > of
| > | granularity than we have now. BTW, I see that I can control the fill
in
| > | Forms apps still in 2.0 as the .fills are done in the form1.vb file
and
| > I
| > | can move those anywhere I want.
| > |
| > | Is there anyway to control the timing of just the fill in asp?
| > |
| > |
| > | --
| > | Regards,
| > | Gary Blakely
| > | "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| > | news:I8**************@TK2MSFTNGXA02.phx.gbl...
| > | > Hi Gary,
| > | >
| > | > DataBound control automatically retrieve datas from the DataSource
| > control
| > | > is because you assign the DataSourceID of the databound control at
| > | > design-time, and the asp.net 2.0 databound controls will
automatically
| > do
| > | > the databinding when the DataSourceID is configured... Also, this
| > | > automatic databinding is performed during the PreRender event......
| > | >
| > | > If you do not want such automatic databinding, you can consider
either
| > of
| > | > the following means:
| > | >
| > | > 1. Assign the DataSourceID at runtime (in a certain of your
control's
| > | > postback event) and call databind method....
| > | >
| > | > 2. Call DataSourceControl.Select method to get the IEnumerable
| > collection
| > | > (datasource object) and assign it to DataBoundControl.DataSource
| > property
| > | > and call databind method....
| > | >
| > | > Here is a simple test page which have three buttons, two of them
use
| > the
| > | > above two means and another used for clear the databinding:
| > | >
| > | > ============================
| > | > <html xmlns="http://www.w3.org/1999/xhtml" >
| > | > <head runat="server">
| > | > <title>Untitled Page</title>
| > | > </head>
| > | > <body>
| > | > <form id="form1" runat="server">
| > | > <div>
| > | > <asp:SqlDataSource ID="SqlDataSource1" runat="server"
| > | > ConnectionString="<%$ ConnectionStrings:LocalNorthWind %>"
| > | > SelectCommand="SELECT [CategoryID], [CategoryName],
| > | > [Description] FROM [Categories]">
| > | > </asp:SqlDataSource>
| > | > <asp:Button ID="btnDetach" runat="server"
| > OnClick="btnDetach_Click"
| > | > Text="Detach" />
| > | > <asp:Button ID="btnBindDS" runat="server"
| > OnClick="btnBindDS_Click"
| > | > Text="Bind DataSource Object" />
| > | > <asp:Button ID="btnBindDSC" runat="server"
| > | > OnClick="btnBindDSC_Click" Text="BindDataSourceControl" />
| > | > <asp:GridView ID="GridView1" runat="server">
| > | > </asp:GridView>
| > | >
| > | > </div>
| > | > </form>
| > | > </body>
| > | >
| > | >
| > | > =============================================
| > | > public partial class GridView_GridViewPage : System.Web.UI.Page
| > | > {
| > | > protected void Page_Load(object sender, EventArgs e)
| > | > {
| > | >
| > | > }
| > | > protected void btnDetach_Click(object sender, EventArgs e)
| > | > {
| > | > GridView1.DataSourceID = string.Empty;
| > | > GridView1.DataSource = null;
| > | > GridView1.DataBind();
| > | > }
| > | > protected void btnBindDS_Click(object sender, EventArgs e)
| > | > {
| > | > GridView1.DataSourceID = string.Empty;
| > | > GridView1.DataSource =
| > | > SqlDataSource1.Select(DataSourceSelectArguments.Em pty);
| > | >
| > | > GridView1.DataBind();
| > | > }
| > | > protected void btnBindDSC_Click(object sender, EventArgs e)
| > | > {
| > | > GridView1.DataSource = null;
| > | > GridView1.DataSourceID = "SqlDataSource1";
| > | > GridView1.DataBind();
| > | > }
| > | > }
| > | > ==========================
| > | >
| > | > So ASP.NET 2.0 provide both ondemand or automatic (declarative
means)
| > | > databinding... And usually the IDE design-time will help do most of
| > the
| > | > work, however when we need advanced functions or more flexible
design,
| > we
| > | > can still add our code to do it whatever means we like....
| > | >
| > | > Hope helps. Thanks,
| > | >
| > | > Steven Cheng
| > | > Microsoft Online Support
| > | >
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > | > --------------------
| > | > | From: "GaryDean" <Ga******@newsgroups.nospam>
| > | > | References: <e8**************@TK2MSFTNGP14.phx.gbl>
| > | > <VE**************@TK2MSFTNGXA02.phx.gbl>
| > | > | Subject: Re: 2.0 controlling Databinding
| > | > | Date: Tue, 3 Jan 2006 10:02:58 -0800
| > | > | Lines: 114
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| > | > | X-RFC2646: Format=Flowed; Original
| > | > | Message-ID: <#K*************@TK2MSFTNGP10.phx.gbl>
| > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | > | NNTP-Posting-Host: user-vcauk40.dsl.mindspring.com 216.175.80.128
| > | > | Path:
| > TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| > | > | Xref: TK2MSFTNGXA02.phx.gbl
| > | > microsoft.public.dotnet.framework.aspnet:368322
| > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | > |
| > | > | let me be more specific.....
| > | > |
| > | > | If I drop a GridView on an aspx page and then create a datasource
| > for
| > it
| > | > and
| > | > | then run the page, it will bind automatically.
| > | > |
| > | > | I DON'T WANT IT TO BIND AUTOMATICALLY. I want it to bind when
| > button1
| > | > is
| > | > | pushed and not until.
| > | > |
| > | > | How can I do that? In other words, how can I control my binding
| > | > | automatically?
| > | > |
| > | > | Thanks,
| > | > | Gary
| > | > |
| > | > | "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in
message
| > | > | news:VE****************@TK2MSFTNGXA02.phx.gbl...
| > | > | > Hi Gary,
| > | > | >
| > | > | > Welcome.
| > | > | > I've also seen your another thread in this group
| > | > | >
| > | > | > Subject: 2.0 DataSources vs. TableAdapter/Datasets
| > | > | >
| > | > | > and posted my response there. As I've mentioned there. In
ASP.NET
| > | > | > application the page instances are not persisted in memory, each
| > time
| > | > a
| > | > | > request has been processed (finished..), the page instance and
| > other
| > | > | > related resources will be disposed... So maintain a member
dataset
| > or
| > | > | > tableadpater is not quite usable as in winform form class....
If
| > you
| > | > do
| > | > | > need global object, you can create and store them in
| > ApplciationState
| > | > /
| > | > | > Cache (or session if user specific...), and then we can
reference
| > | > them
| > | > in
| > | > | > other pages' code....
| > | > | >
| > | > | > We can surely perform the same operation on those DataSet and
| > | > | > TableAdapters
| > | > | > like in winform app. e.g:
| > | > | >
| > | > | > taOD = Application("ta_order_details")
| > | > | > dsOD = Application("ds_order_details")
| > | > | >
| > | > | > taOD.Fill(dsOD.Order_Details)
| > | > | >
| > | > | > .............
| > | > | >
| > | > | > Thanks,
| > | > | >
| > | > | > Steven Cheng
| > | > | > Microsoft Online Support
| > | > | >
| > | > | > Get Secure! www.microsoft.com/security
| > | > | > (This posting is provided "AS IS", with no warranties, and
confers
| > no
| > | > | > rights.)
| > | > | >
| > | > | >
| > | > | >
| > | > | > --------------------
| > | > | > | From: "GaryDean" <Ga******@newsgroups.nospam>
| > | > | > | Subject: 2.0 controlling Databinding
| > | > | > | Date: Sat, 31 Dec 2005 14:23:37 -0800
| > | > | > | Lines: 33
| > | > | > | X-Priority: 3
| > | > | > | X-MSMail-Priority: Normal
| > | > | > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| > | > | > | X-RFC2646: Format=Flowed; Original
| > | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| > | > | > | Message-ID: <e8**************@TK2MSFTNGP14.phx.gbl>
| > | > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | > | > | NNTP-Posting-Host: user-vcaur7q.dsl.mindspring.com
| > 216.175.108.250
| > | > | > | Path:
| > | > TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| > | > | > | Xref: TK2MSFTNGXA02.phx.gbl
| > | > | > microsoft.public.dotnet.framework.aspnet:367881
| > | > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | > | > |
| > | > | > | We have been noticing that questions on vs.2005/2.0 don't
appear
| > to
| > | > get
| > | > | > much
| > | > | > | in answers so I'm reposting some questions posted by some of
the
| > | > | > programmers
| > | > | > | here in our organization that never got answered...
| > | > | > |
| > | > | > | In 1.1 we always did our own myDataAdapter.fills and we liked
| > that
| > | > | > control
| > | > | > | for lots of good reasons. Now the new DataSource (or is it a
| > | > | > | TableAdapter:Dataset) automatically fills the Gridview. How
can
| > we
| > | > | > control
| > | > | > | that fill?
| > | > | > |
| > | > | > | In a forms app there is a Form1.vb that has.....
| > | > | > | Private Sub Form1_Load(ByVal sender As System.Object, ByVal e
As
| > | > | > | System.EventArgs) Handles MyBase.Load
| > | > | > |
| > | > | > | 'TODO: This line of code loads data into the
| > | > | > | 'NorthwindDataSet.Order_Details' table. You can move, or
remove
| > it,
| > | > as
| > | > | > | needed.
| > | > | > |
| > | > | > |
| > Me.Order_DetailsTableAdapter.Fill(Me.NorthwindData Set.Order_Details)
| > | > | > |
| > | > | > | 'TODO: This line of code loads data into the
| > | > 'NorthwindDataSet.Orders'
| > | > | > | table. You can move, or remove it, as needed.
| > | > | > |
| > | > | > | Me.OrdersTableAdapter1.Fill(Me.NorthwindDataSet.Or ders)
| > | > | > |
| > | > | > | End Sub
| > | > | > |
| > | > | > | Here we can remove or place the code where we want but we
can't
| > find
| > | > | > that
| > | > | > | opportunity in asp apps.
| > | > | > | --
| > | > | > | Regards,
| > | > | > | Gary Blakely
| > | > | > |
| > | > | > |
| > | > | > |
| > | > | >
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Jan 11 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Kevin Swanson | last post by:
I'm writing what should be a very simple app against an Oracle database. The app has a number of user controls, any one of which is loaded into a main display page using the loadControl method,...
6
by: Manny Chohan | last post by:
Hi Guys, i have the following linkbutton with visibility conditionally controlled from codebehind: <asp:LinkButton id="test" style="Z-INDEX: 101; LEFT: 464px; POSITION: absolute; TOP: 160px"...
3
by: John Bailey | last post by:
When I first built a few web pages in ASP .Net 2.0, I thought it was great. The formview and detailview contorls would automatically layout the controls for you, the update methods were...
4
by: Nathan Sokalski | last post by:
I have two databinding expressions (the first & last names from a DB) that I want to assign to the text property of a Label so that the result is LASTNAME,FIRSTNAME. At the moment, I have the...
2
by: Tubs | last post by:
I am trying to use data binding to avoid having to write event handlers everywhere for my data transfer from controls to data source and all is working well except, i have a condition i would like...
9
by: Dennis | last post by:
I have tried using Databinding for my application but always seem to find it very restrictive (maybe I don't completely understand it enough). I always seem to find it much easier to display a...
8
by: Dirk | last post by:
Hello, I have a problem to use databinding with my business layer classes. My data class does not have simple properties (string, int or datetime), instead, all my properties are objects of the...
1
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hello to all, I want to know if DataBinding in asp.net 2,0 is better than to fill up the values of the controls of the following form: this.miControlTextBox.Text = valorParaControlTextbox; ...
6
by: =?Utf-8?B?QmVuLg==?= | last post by:
Hi, I'm more of a windows programmer than ASP and I've having a little difficulty in ASP.Net (framework 2.0) - VB.net I have a datagrid on an aspx page and the html is building the display in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.