|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ASP.NET - How to bind() a dataset to a datagrid using javascript from the clientCan 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,
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 'parent.document.stsFrme.document.all.DataGrid1.DataSource=response.value;'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. > > Show quoteHide quote > (also using frames) > > Can you please let me know how to bind this dataset to the datagrid. :-) > > > Kind Regards... > > 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 'parent.document.stsFrme.document.all.DataGrid1.DataSource=response.value;'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. > > > > > Show quoteHide quote > > (also using frames) > > > > Can you please let me know how to bind this dataset to the datagrid. :-) > > > > > > Kind Regards... > > > > Brian Potroz > > > > > > 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. 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/
Other interesting topics
Pop-up Message Box
binding ArrayLists to DataGrids-- how to name the columns? Newbie: Datagrid Comes Up Blank?!? Subclassing a DataGrid control trying to display header only Wrong window gets the content HOWTO: Bring that row back into focus ... using datagrid ItemStyle question Substituting 0 with empty string |
|||||||||||||||||||||||