hi all programming experts,
I am developing a system using asp.net(c#) , ajax and javascripts. I want to bind a dataset to a gridview using a javascrip function. the javascript function is written in a different .js file and linked to the aspx page. i am calling that function in "onclientclick" method in a button because i want to stop post back. i am not using an update pannel. i am caaling code behind function to get the required dataset.i have successfully taken the dataset to the function but the problem is how to set the data source & call the databind method of a gridview in javascript?
Thanx
9 48375
hi all programming experts,
I am developing a system using asp.net(c#) , ajax and javascripts. I want to bind a dataset to a gridview using a javascrip function. the javascript function is written in a different .js file and linked to the aspx page. i am calling that function in "onclientclick" method in a button because i want to stop post back. i am not using an update pannel. i am caaling code behind function to get the required dataset.i have successfully taken the dataset to the function but the problem is how to set the data source & call the databind method of a gridview in javascript?
Thanx
Post the code you tried so far :-)
Debasis Jana
Post the code you tried so far :-)
Debasis Jana
this is the jscript function i am trying - function BindData()
-
{
-
alert('in');
-
var retDset=primaryInquries.TestDataSet(); //get dataset from codeBehind
-
-
alert(retDset.value.Tables[0].Rows.length); // to check the nimber of rows
-
-
// dataset is received correctly
-
document.getElementById("GridView1").DataSource=retDset; //?problem
-
document.getElementById("GridView1").Bind(); // ?problem. how to bind the received dataset to the grid view
-
return false;
-
-
-
}//end BindData
hi all programming experts,
I am developing a system using asp.net(c#) , ajax and javascripts. I want to bind a dataset to a gridview using a javascrip function. the javascript function is written in a different .js file and linked to the aspx page. i am calling that function in "onclientclick" method in a button because i want to stop post back. i am not using an update pannel. i am caaling code behind function to get the required dataset.i have successfully taken the dataset to the function but the problem is how to set the data source & call the databind method of a gridview in javascript?
Thanx
this is the jscript function i am trying - function BindData()
-
{
-
alert('in');
-
var retDset=primaryInquries.TestDataSet(); //get dataset from codeBehind
-
-
alert(retDset.value.Tables[0].Rows.length); // to check the nimber of rows
-
-
// dataset is received correctly
-
document.getElementById("GridView1").DataSource=retDset; //?problem
-
document.getElementById("GridView1").Bind(); // ?problem. how to bind the received dataset to the grid view
-
return false;
-
-
-
}//end BindData
It looks like their maybe some confusion between the lines of JavaScript and ASP.
JavaScript is clients side, it only runs on the browser, so it has no ablity to work with ASP.NET ojects like DataSets or GridViews. Browser based JavaScript can only access HTML elements in that browser instance.
It looks like you may need to post your questions in the ASP support forum.
hi all programming experts,
I am developing a system using asp.net(c#) , ajax and javascripts. I want to bind a dataset to a gridview using a javascrip function. the javascript function is written in a different .js file and linked to the aspx page. i am calling that function in "onclientclick" method in a button because i want to stop post back. i am not using an update pannel. i am caaling code behind function to get the required dataset.i have successfully taken the dataset to the function but the problem is how to set the data source & call the databind method of a gridview in javascript?
Thanx
this is the jscript function i am trying - function BindData()
-
{
-
alert('in');
-
var retDset=primaryInquries.TestDataSet(); //get dataset from codeBehind
-
-
alert(retDset.value.Tables[0].Rows.length); // to check the nimber of rows
-
-
// dataset is received correctly
-
document.getElementById("GridView1").DataSource=retDset; //?problem
-
document.getElementById("GridView1").Bind(); // ?problem. how to bind the received dataset to the grid view
-
return false;
-
-
-
}//end BindData
i also have the same situation... i hope more can help here... tnx...
Welcome to TSDN!
i also have the same situation... i hope more can help here... tnx...
Can you post your code? Also, explain the format of the data.
i still dont have any code... im quite new to ajax... im still thinking if its possible... my setup is like this:
i have this calender extender setup... then on its OnClientDateSelectionChanged i added a javascript... that would get the date and then using that date i will use a web service so i could get data from my database and pass it to the bindingsource... is this possible???
You must be looking for a data aware javascript components.
Try open source project messi.
Messi is a data aware component lib extended from ext-js lib with GNU licence, including group header grid, scrollable dataset, dataware widges, auto lookup combobox. It aims to minimize the develop cost of web database application.
Data aware widges can be auto linked to grid via a scrollable dataset. Form widges's changed value will be auto updated to dataset' last record after dataset scrolled. Also, the values of record at the new position of dataset will auto be refected to the widges.
The project is hosted on sourceforce.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Vijaya |
last post by:
Can we bind data to textbox in a headertemplate in a
template column of a datagrid?
If so please give some code snippets.
Thank you
|
by: vineetbatta |
last post by:
I have Custom Data class which stores data about single customer and then i
store that customer objects in arraylist as shown below.
Customer custdata = null; // Custom Data class for 1 customer...
|
by: chandana Devabhaktuni |
last post by:
Hello and Hi to everyone,
This is chandana, i have a doubt which i am mentioning here.
We can retrive or bind data to datagrid from database(sql server) and also we can...
|
by: sambathrajmca |
last post by:
Hai,
I am sambath Raj.I am new for you.Now i am trying to use windows forms with data GridView Controll.Now i am adding combobox in that data GridView but defaultly New Row Will be added next to...
|
by: newtodotnet1 |
last post by:
Hi all,
I would like to know how to bind data to the gridview using XPath.. The data is in the XML format..
Please help me....
Its urgent..
I am using asp.net and c#.net
|
by: jaredciagar |
last post by:
Hi guys...can you help me please....
I'm using ASP.net, MSSQL 2005 and VB Script
I have don't know how to bind data in gridview control from database.
I want also to allow paging in gridview...
|
by: dotnetnovice |
last post by:
Hi everybody...
I want to show data in the data gridview placed in my form after getting data from my data access layer class through a class...
Here is my code in the data access layer class....
|
by: sudha k |
last post by:
how to bind data from database table to a dropdownlist nested in a gridview
|
by: vivek kapile |
last post by:
This code will help for the beginners, who want to learn, how to bind a gridview.
Before showing the code I will give a small introduction how to work with gridview.
Add a gridview controls to...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
| |