Showing posts with label scroll. Show all posts
Showing posts with label scroll. Show all posts

Friday, March 16, 2012

Persist data in XML data island

I want to use an XML data island to display editable records to a user
on the cleint side. The user should be able to scroll through the
records, modify any or all fields in any or all records, add records,
and delete records.

As far as I can see, there are a couple of ways to implement this. I
could persist the original data island and create a duplicate data
island that the user would modify. When the modifications were
complete, I could post back both XML snippets and compare them to see
what has changed.

Alternatively, I was thinking about using the DiffGram idea, where
each change would add an xml element to an xml snippet that would
indicate what item was changed, added, deleted, etc.

I know that I am not the first person to want to use this type of
technique, so I was hoping that there is something built into the .Net
framework to help with the management of the data. Ideally, I would
like to do something like serialize a dataset to XML, send it to the
client as an XML data island, have them manipulate it, repost it, and
then turn it "magically" into a batch update to the dataset on the
server side. Is that possible, or do I have to roll my own solution?

Thanks.

PatIf you read the XML back into a dataset, then you can use .getchanges on the
datatable to get only the changed rows. Send this back to the server in a
dataset. One easy way to do this is to use web services on the server.

"Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
news:5de67752.0405250947.7f526dc4@.posting.google.c om...
> I want to use an XML data island to display editable records to a user
> on the cleint side. The user should be able to scroll through the
> records, modify any or all fields in any or all records, add records,
> and delete records.
> As far as I can see, there are a couple of ways to implement this. I
> could persist the original data island and create a duplicate data
> island that the user would modify. When the modifications were
> complete, I could post back both XML snippets and compare them to see
> what has changed.
> Alternatively, I was thinking about using the DiffGram idea, where
> each change would add an xml element to an xml snippet that would
> indicate what item was changed, added, deleted, etc.
> I know that I am not the first person to want to use this type of
> technique, so I was hoping that there is something built into the .Net
> framework to help with the management of the data. Ideally, I would
> like to do something like serialize a dataset to XML, send it to the
> client as an XML data island, have them manipulate it, repost it, and
> then turn it "magically" into a batch update to the dataset on the
> server side. Is that possible, or do I have to roll my own solution?
> Thanks.
> Pat
So, I could create a dataset, serialize it and send it down to the
client. Then, on the client side, I could bind it to some controls,
let the user add, delete, and modify records. Then, on repost, I
should convert the data back into a dataset, and call .getchanges? I
don't see how getchanges would work without having the original
dataset to compare the new dataset to?

How could I implement this with web services without posting the
information back to the server for every change?

Pat

"Rick Spiewak" <rickspiewak@.mindspring.com> wrote in message news:<#BJ7SftQEHA.3420@.TK2MSFTNGP11.phx.gbl>...
> If you read the XML back into a dataset, then you can use .getchanges on the
> datatable to get only the changed rows. Send this back to the server in a
> dataset. One easy way to do this is to use web services on the server.
> "Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
> news:5de67752.0405250947.7f526dc4@.posting.google.c om...
> > I want to use an XML data island to display editable records to a user
> > on the cleint side. The user should be able to scroll through the
> > records, modify any or all fields in any or all records, add records,
> > and delete records.
> > As far as I can see, there are a couple of ways to implement this. I
> > could persist the original data island and create a duplicate data
> > island that the user would modify. When the modifications were
> > complete, I could post back both XML snippets and compare them to see
> > what has changed.
> > Alternatively, I was thinking about using the DiffGram idea, where
> > each change would add an xml element to an xml snippet that would
> > indicate what item was changed, added, deleted, etc.
> > I know that I am not the first person to want to use this type of
> > technique, so I was hoping that there is something built into the .Net
> > framework to help with the management of the data. Ideally, I would
> > like to do something like serialize a dataset to XML, send it to the
> > client as an XML data island, have them manipulate it, repost it, and
> > then turn it "magically" into a batch update to the dataset on the
> > server side. Is that possible, or do I have to roll my own solution?
> > Thanks.
> > Pat
Don't bind to the XML, re-create the dataset. Then you can do getchanges
against the modified table, re-create a dataset with just the changes,
and send that back up to the server.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Persist data in XML data island

I want to use an XML data island to display editable records to a user
on the cleint side. The user should be able to scroll through the
records, modify any or all fields in any or all records, add records,
and delete records.
As far as I can see, there are a couple of ways to implement this. I
could persist the original data island and create a duplicate data
island that the user would modify. When the modifications were
complete, I could post back both XML snippets and compare them to see
what has changed.
Alternatively, I was thinking about using the DiffGram idea, where
each change would add an xml element to an xml snippet that would
indicate what item was changed, added, deleted, etc.
I know that I am not the first person to want to use this type of
technique, so I was hoping that there is something built into the .Net
framework to help with the management of the data. Ideally, I would
like to do something like serialize a dataset to XML, send it to the
client as an XML data island, have them manipulate it, repost it, and
then turn it "magically" into a batch update to the dataset on the
server side. Is that possible, or do I have to roll my own solution?
Thanks.
PatIf you read the XML back into a dataset, then you can use .getchanges on the
datatable to get only the changed rows. Send this back to the server in a
dataset. One easy way to do this is to use web services on the server.
"Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
news:5de67752.0405250947.7f526dc4@.posting.google.com...
> I want to use an XML data island to display editable records to a user
> on the cleint side. The user should be able to scroll through the
> records, modify any or all fields in any or all records, add records,
> and delete records.
> As far as I can see, there are a couple of ways to implement this. I
> could persist the original data island and create a duplicate data
> island that the user would modify. When the modifications were
> complete, I could post back both XML snippets and compare them to see
> what has changed.
> Alternatively, I was thinking about using the DiffGram idea, where
> each change would add an xml element to an xml snippet that would
> indicate what item was changed, added, deleted, etc.
> I know that I am not the first person to want to use this type of
> technique, so I was hoping that there is something built into the .Net
> framework to help with the management of the data. Ideally, I would
> like to do something like serialize a dataset to XML, send it to the
> client as an XML data island, have them manipulate it, repost it, and
> then turn it "magically" into a batch update to the dataset on the
> server side. Is that possible, or do I have to roll my own solution?
> Thanks.
> Pat
So, I could create a dataset, serialize it and send it down to the
client. Then, on the client side, I could bind it to some controls,
let the user add, delete, and modify records. Then, on repost, I
should convert the data back into a dataset, and call .getchanges? I
don't see how getchanges would work without having the original
dataset to compare the new dataset to?
How could I implement this with web services without posting the
information back to the server for every change?
Pat
"Rick Spiewak" <rickspiewak@.mindspring.com> wrote in message news:<#BJ7SftQEHA.3420@.TK2MSFT
NGP11.phx.gbl>...
> If you read the XML back into a dataset, then you can use .getchanges on t
he
> datatable to get only the changed rows. Send this back to the server in a
> dataset. One easy way to do this is to use web services on the server.
> "Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
> news:5de67752.0405250947.7f526dc4@.posting.google.com...
Don't bind to the XML, re-create the dataset. Then you can do getchanges
against the modified table, re-create a dataset with just the changes,
and send that back up to the server.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!

Persist Page Location

I have an aspx page which has many controls. Just enough to cause the user t
o scroll down a little to see them all. Incidentally the last control is a t
able control which allows you to add a new row dynamically upon clicking a l
ink button.
Because link button fires a postback, which is what is needed in order to ad
d the next row to the table it brings the user back to the top of the page a
fterwards.
I want the user to be back where they clicked on the link button at the bott
om of the page. I recall there is a setting or some easy way to do this but
for the life of me can not remember. Any help would be great!
-DemetriOn 8/4/2004 10:45 AM, Demetri wrote:
> I have an aspx page which has many controls. Just enough to cause the user
to scroll down a little to see them all. Incidentally the last control is a
table control which allows you to add a new row dynamically upon clicking a
link button.
> Because link button fires a postback, which is what is needed in order to
add the next row to the table it brings the user back to the top of the page
afterwards.
> I want the user to be back where they clicked on the link button at the bo
ttom of the page. I recall there is a setting or some easy way to do this bu
t for the life of me can not remember. Any help would be great!
>
SmartNavigation was the way to overcome some of this 'page viewing
state' problems in the browser, but I've heard it's buggy.
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Hi Demetri,
Have a look at Scott Guthrie's TechEd 2003 Black Belt Web Forms presentation
(http://www.scottgu.com) he coveres this scenario, under the title
"scrolling and postback".
Hope this helps,
Michael
This posting is provided "AS IS" with no warranties, and confers no rights.
"Demetri" <Demetri@.discussions.microsoft.com> wrote in message
news:54F55A7E-B548-402A-BCF4-1DBFDD5FF9BE@.microsoft.com...
>I have an aspx page which has many controls. Just enough to cause the user
>to scroll down a little to see them all. Incidentally the last control is a
>table control which allows you to add a new row dynamically upon clicking a
>link button.
> Because link button fires a postback, which is what is needed in order to
> add the next row to the table it brings the user back to the top of the
> page afterwards.
> I want the user to be back where they clicked on the link button at the
> bottom of the page. I recall there is a setting or some easy way to do
> this but for the life of me can not remember. Any help would be great!
> --
> -Demetri