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

Discussion in 'ASP .Net Datagrid Control' started by Brian Potroz, May 4, 2005.

  1. Brian Potroz

    Brian Potroz Guest

    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
    Brian Potroz, May 4, 2005
    #1
    1. Advertising

  2. Brian Potroz

    Brian Potroz Guest

    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

    "Eliyahu Goldin" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:%...
    > > 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
    > >
    > >

    >
    >
    Brian Potroz, May 4, 2005
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:%...
    > 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
    >
    >
    Eliyahu Goldin, May 4, 2005
    #3
  4. Brian Potroz

    Guest

    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.
    , May 6, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AFN
    Replies:
    3
    Views:
    3,226
    Kevin Spencer
    Feb 16, 2004
  2. =?Utf-8?B?QmluIFNvbmcsIE1DUA==?=

    RE: bind datagrid to dataset filled at runtime

    =?Utf-8?B?QmluIFNvbmcsIE1DUA==?=, Apr 8, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    3,593
    =?Utf-8?B?QmluIFNvbmcsIE1DUA==?=
    Apr 8, 2004
  3. Bennett Haselton
    Replies:
    2
    Views:
    14,297
    Bennett Haselton
    Oct 7, 2004
  4. mr2_93
    Replies:
    1
    Views:
    3,593
    mr2_93
    Oct 2, 2005
  5. novus
    Replies:
    9
    Views:
    239
    last component
    Dec 14, 2005
Loading...

Share This Page