Home All Groups Group Topic Archive Search About

ASP.NET - How to bind() a dataset to a datagrid using javascript from the client

Author
3 May 2005 11:35 PM
Brian Potroz
Hi Experts,


Can you please inform me how to bind() a dataset to a datagrid using
javascript from the client in ASP.NET ?

I have successfully returned / tested the dataset from the server (VB
codebehind) and have applied it to the datagrid.datasource as follows with
no errors.

'parent.document.stsFrme.document.all.DataGrid1.DataSource=response.value;'
(also using frames)

Can you please let me know how to bind this dataset to the datagrid. :-)


Kind Regards...

Brian Potroz

Author
4 May 2005 7:30 AM
Eliyahu Goldin
Brian,

Client has no idea about what DataSource is. It doesn't know anything about
server side. All data source setting and databinding must be on server side.
What client can do is to pass to the server a parameter that the server will
take into account in its data setup operations.

Eliyahu

"Brian Potroz" <it.suppor***@wells.co.nz> wrote in message
news:%23P6nSkDUFHA.616@TK2MSFTNGP12.phx.gbl...
> Hi Experts,
>
>
> Can you please inform me how to bind() a dataset to a datagrid using
> javascript from the client in ASP.NET ?
>
> I have successfully returned / tested the dataset from the server (VB
> codebehind) and have applied it to the datagrid.datasource as follows with
> no errors.
>
>
'parent.document.stsFrme.document.all.DataGrid1.DataSource=response.value;'
Show quoteHide quote
> (also using frames)
>
> Can you please let me know how to bind this dataset to the datagrid. :-)
>
>
> Kind Regards...
>
> Brian Potroz
>
>
Are all your drivers up to date? click for free checkup

Author
4 May 2005 6:51 AM
Brian Potroz
Elyiyahu,


Thank you for your feedback regarding this issue.

I am using the Ajax.dll reference within my project to post a request from
the client to the server (obtaining the dataset) and again returning it back
to the client. Using javascript, I am then setting the datagrid.datasource
to my dataset (that works fine, no errors), if I can do that from the client
then I should be able to bind the datasource ?

Here is my javascript which sets the datasource of the datagrid from the
client:

'parent.document.stsFrme.document.all.DataGrid1.DataSource=response.value'


Kind Regards...

Brian

Show quoteHide quote
"Eliyahu Goldin" <removemeegol***@monarchmed.com> wrote in message
news:epESJKHUFHA.2768@tk2msftngp13.phx.gbl...
> Brian,
>
> Client has no idea about what DataSource is. It doesn't know anything
about
> server side. All data source setting and databinding must be on server
side.
> What client can do is to pass to the server a parameter that the server
will
> take into account in its data setup operations.
>
> Eliyahu
>
> "Brian Potroz" <it.suppor***@wells.co.nz> wrote in message
> news:%23P6nSkDUFHA.616@TK2MSFTNGP12.phx.gbl...
> > Hi Experts,
> >
> >
> > Can you please inform me how to bind() a dataset to a datagrid using
> > javascript from the client in ASP.NET ?
> >
> > I have successfully returned / tested the dataset from the server (VB
> > codebehind) and have applied it to the datagrid.datasource as follows
with
> > no errors.
> >
> >
>
'parent.document.stsFrme.document.all.DataGrid1.DataSource=response.value;'
Show quoteHide quote
> > (also using frames)
> >
> > Can you please let me know how to bind this dataset to the datagrid. :-)
> >
> >
> > Kind Regards...
> >
> > Brian Potroz
> >
> >
>
>
Author
6 May 2005 12:23 AM
samuelrobertson
Hi,

If you want to do this you'll have to parse the datasource in
javascript somehow and add all the table elements using dynamic
javascript.  In this case don't use a datagrid just use a placeholder
because when you build the table it won't function as a asp.net
datagrid anyway as the control ids won't be set propertly and you
didn't build the datagrid server side.

Basically the previous post is correct.  You want to do something that
is impossible.  The datagrid cannot be manipulated client side, except
possibly to read a few values from it, attach alerts to it, etc.  I
would never think of *building* one client-side.
Author
11 May 2009 4:53 AM
Rex Trye
Hi Brian

If you cant bind this, you don't deserve a girlfriend. or platonic life partner on any level.

From Your Workmates From http://www.google.co.nz/search?hl=en&q=brian+potroz&btnG=Search&meta= Posted via DevelopmentNow.com Groups http://www.developmentnow.com/g/

Bookmark and Share