I have, dozens of times, displayed datagrids, datasourced by an .xsd
dataset, with textboxes in template columns and always been able to spin
through those grids on, say a button click event.
In a new project I am dynamicaly populating the datagrid columns, after
which I retrieve data and do the following...
da.fill(DataSet1) 'this is an untyped dataset
dg.datasource = DataSet1
dg.Databind()
At this point my datagrid displays exactly like I want it to.
BUT, on the button click event (which occurs after the user might changes
some fields) my datagrid is empty!!!!
This brings up a question: How was it that I am able to get the grid back in
my other dozen programs where the grid is datasourced by a .xsd dataset?
Why doesn't the grid contents (as changed by the user) exist in the click
event?
Thanks,
T 4 1193
Each time the form is used it is destroyed. One had to either repopulate the
data on Page_Load or load it from a cached storage.
IE
If not Page.IsPostback then
'Load your dataset & bind it
'Save it to cache along with your dataadapter
Else
'Load dataset and adapter from cache it from cache.
End If
"Tina" <ti**********@nospammeexcite.com> wrote in message
news:ek*************@TK2MSFTNGP11.phx.gbl... I have, dozens of times, displayed datagrids, datasourced by an .xsd dataset, with textboxes in template columns and always been able to spin through those grids on, say a button click event.
In a new project I am dynamicaly populating the datagrid columns, after which I retrieve data and do the following...
da.fill(DataSet1) 'this is an untyped dataset dg.datasource = DataSet1 dg.Databind()
At this point my datagrid displays exactly like I want it to.
BUT, on the button click event (which occurs after the user might changes some fields) my datagrid is empty!!!!
This brings up a question: How was it that I am able to get the grid back in my other dozen programs where the grid is datasourced by a .xsd dataset? Why doesn't the grid contents (as changed by the user) exist in the click event? Thanks, T
I'm not having a problem with the dataset or the dataadapter, they are fine
as I save the dataset.
It is the DATAGRID that is empty when the button click occurs. I can't
cache it because I want the changes from the user.
T
"Mr Newbie" <he**@now.com> wrote in message
news:uk**************@tk2msftngp13.phx.gbl... Each time the form is used it is destroyed. One had to either repopulate the data on Page_Load or load it from a cached storage.
IE
If not Page.IsPostback then
'Load your dataset & bind it 'Save it to cache along with your dataadapter
Else
'Load dataset and adapter from cache it from cache.
End If
"Tina" <ti**********@nospammeexcite.com> wrote in message news:ek*************@TK2MSFTNGP11.phx.gbl...I have, dozens of times, displayed datagrids, datasourced by an .xsd dataset, with textboxes in template columns and always been able to spin through those grids on, say a button click event.
In a new project I am dynamicaly populating the datagrid columns, after which I retrieve data and do the following...
da.fill(DataSet1) 'this is an untyped dataset dg.datasource = DataSet1 dg.Databind()
At this point my datagrid displays exactly like I want it to.
BUT, on the button click event (which occurs after the user might changes some fields) my datagrid is empty!!!!
This brings up a question: How was it that I am able to get the grid back in my other dozen programs where the grid is datasourced by a .xsd dataset? Why doesn't the grid contents (as changed by the user) exist in the click event? Thanks, T
Have you remembered to DataBind the grid each time you reload the page ?
Make sure the Grid is rebound on Postback as well as the first render
"Tina" <ti**********@nospammeexcite.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl... I'm not having a problem with the dataset or the dataadapter, they are fine as I save the dataset.
It is the DATAGRID that is empty when the button click occurs. I can't cache it because I want the changes from the user. T
"Mr Newbie" <he**@now.com> wrote in message news:uk**************@tk2msftngp13.phx.gbl... Each time the form is used it is destroyed. One had to either repopulate the data on Page_Load or load it from a cached storage.
IE
If not Page.IsPostback then
'Load your dataset & bind it 'Save it to cache along with your dataadapter
Else
'Load dataset and adapter from cache it from cache.
End If
"Tina" <ti**********@nospammeexcite.com> wrote in message news:ek*************@TK2MSFTNGP11.phx.gbl...I have, dozens of times, displayed datagrids, datasourced by an .xsd dataset, with textboxes in template columns and always been able to spin through those grids on, say a button click event.
In a new project I am dynamicaly populating the datagrid columns, after which I retrieve data and do the following...
da.fill(DataSet1) 'this is an untyped dataset dg.datasource = DataSet1 dg.Databind()
At this point my datagrid displays exactly like I want it to.
BUT, on the button click event (which occurs after the user might changes some fields) my datagrid is empty!!!!
This brings up a question: How was it that I am able to get the grid back in my other dozen programs where the grid is datasourced by a .xsd dataset? Why doesn't the grid contents (as changed by the user) exist in the click event? Thanks, T
I never rebind and I have never had a problem with it not being there. In
fact if I were to rebind (to it's datasource) I would lose the changes the
user put into the textboxes in the grid.
Anyway I found what was causing my problem... if the "Create Columns at run
time" checkbox is checked the grid contents does not persist to other
events - if it is not checked it persists just fine! How bout that.
T
"Mr Newbie" <he**@now.com> wrote in message
news:OL**************@TK2MSFTNGP11.phx.gbl... Have you remembered to DataBind the grid each time you reload the page ? Make sure the Grid is rebound on Postback as well as the first render "Tina" <ti**********@nospammeexcite.com> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl... I'm not having a problem with the dataset or the dataadapter, they are fine as I save the dataset.
It is the DATAGRID that is empty when the button click occurs. I can't cache it because I want the changes from the user. T
"Mr Newbie" <he**@now.com> wrote in message news:uk**************@tk2msftngp13.phx.gbl... Each time the form is used it is destroyed. One had to either repopulate the data on Page_Load or load it from a cached storage.
IE
If not Page.IsPostback then
'Load your dataset & bind it 'Save it to cache along with your dataadapter
Else
'Load dataset and adapter from cache it from cache.
End If
"Tina" <ti**********@nospammeexcite.com> wrote in message news:ek*************@TK2MSFTNGP11.phx.gbl... I have, dozens of times, displayed datagrids, datasourced by an .xsd dataset, with textboxes in template columns and always been able to spin through those grids on, say a button click event.
In a new project I am dynamicaly populating the datagrid columns, after which I retrieve data and do the following...
da.fill(DataSet1) 'this is an untyped dataset dg.datasource = DataSet1 dg.Databind()
At this point my datagrid displays exactly like I want it to.
BUT, on the button click event (which occurs after the user might changes some fields) my datagrid is empty!!!!
This brings up a question: How was it that I am able to get the grid back in my other dozen programs where the grid is datasourced by a .xsd dataset? Why doesn't the grid contents (as changed by the user) exist in the click event? Thanks, T
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Gidi |
last post by:
Hi All,
i have a datagrid table that contains customers names, and a textbox which
the user enters the customer name and the datagrid's dataset is updated so
the customer name will be first....
|
by: Mark Rae |
last post by:
I've inherited an ASP.NET app and have been asked to fix the following
problem with a page which is used to display and/or delete records from a
database. When the page loads, it displays a list of...
|
by: Tina |
last post by:
This message refers to the one I left an hour ago. It's another way to ask
a question that will help me solve my problem.
Below is a working ASPX program. It has two buttons and a DataGrid...
|
by: DC |
last post by:
Hi all (once again),
I've populated a datagrid with an arraylist of objects of this class i've
created.
How can I get the select object in the datagrid?
TIA,
DC
|
by: skOOb33 |
last post by:
I successfully autosized the columns and rows on my Datagrid, and am
now facing another issue. Having the sorting ability by clicking the
column headers is key, but when I do that, it resizes all...
|
by: Newbie |
last post by:
Hi Everyone,
ASP.NET 1.x
I have a problemette !
I have a datagrid on my web form. When the user hits the enter key whilst
any editable field on the form including those in the datagrid...
|
by: Matt |
last post by:
I derived my own custom class from the datagrid class.
I overrode the ProcessCmdKey Function, like this, to catch the up and down
arrow keys:
======
Protected Overrides Function...
|
by: Ryan Liu |
last post by:
Hi,
I need the MouseDown event be trigged everytime when you press mouse in a
datagrid (System.Windows.Forms).
Hi,
I need the MouseDown event be trigged everytime when press mouse in a...
|
by: David |
last post by:
Hi all,
This is a weird one.
I have been asked to look at an intermittent fault.
Basically, I have a webservice that is delivering info into a datagrid.
Dim Statement As New...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |