473,396 Members | 1,935 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

reset the grid

i want to reset a data grid in javascript
can u plz help me out
Mar 30 '07 #1
2 1585
channaJ
67
i want to reset a data grid in javascript
can u plz help me out

Hi ppooja7,

In the client side, data grid renders as a HTML <Table>. So you cannot remove the DataSource of a DataGrid in the client side.(Because there is no DataGrid there.) The Table that is rendered in the client side still has the same id as the DataGrid. So you can access it using the getElementById() JavaScript function.

You can use the following JavaScript to clear a table.

Expand|Select|Wrap|Line Numbers
  1. document.getElementById('dgJSTest').innerText = " ";
Here 'dgJSTest' is the name of the DataGrid.
By this script entire table will be cleared. If you want to keep the headers and the borders, you can set the appropriate HTML as the innerHtml property instead of innerText.

Hope this will help.
Mar 30 '07 #2
RedSon
5,000 Expert 4TB
Please post to the appropriate forum next time. This thread has been moved.
Mar 30 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dave Girvitz | last post by:
I have a PropertyGrid (Windows Forms App) based component that uses TypeConverters to generate ranges of acceptable values for properties. The idea was that I could download the key/value pairs...
1
by: Joe Bloggs | last post by:
I have a form which includes a checkbox field. I need to add a reset, I add a HTML reset it works fine before I submit the form but not after. I know I must add some code to reset the checkbox on...
1
by: Simone | last post by:
After a call to the Reset() method of a DataTable and a call to the method Datasource of the datagrid for display data of the DataTable i cannot see the rows on the Grid. Help me please. By...
1
by: Simone | last post by:
After a call to the Reset() method of a DataTable and a call to the method Datasource of the datagrid for display data of the DataTable i cannot see the rows on the Grid. Help me please. By...
7
by: steve bull | last post by:
if I have a property something like : public int Width { get {return m_width} set {m_width = value} }
3
by: rmunson8 | last post by:
I have added Panel control to a web page which contains a GridView. The Panel's ScrollBars property is set to auto. When I select the Select CommanField button for a row (which obviously causes a...
2
by: Lance | last post by:
I want to be able to reset a complex property in a PropertyGrid. I know that for properties that are ValueTypes you can include System.ComponentModel.DefaultValue in the declaration of the property....
2
by: Roger Withnell | last post by:
I need to reset a form to its original value using onclick rather than the Reset button. So, I have: <input type="button" name="reset" id="reset" value="Reset" onclick="form1.reset();"> where...
1
by: jobs | last post by:
I'm using asp.net Membership security. Using the Password recovery control, users can reset/recover their passwords. Great. I've grid with all the users. I'd like to add a button so the admin of...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
marktang
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.