Hi --
I'm very, very new to ASP.Net, and I've been trying for several days to
figure out how to update a datagrid AND refresh it on the client side so
that the page doesn't refresh. I've torn my code apart over and over each
time I tried what I thought would be the code that would solve my problem.
Maybe I'm going down the completely wrong path here. Essentially,
here is an explanation of my ASP.NET webform application and what I
want it to do:
Employees add how much time they spend on a job, and then that
information is added to a SQL database and displayed in a datagrid.
I've got everything working on the client side (we are using an AJAX
approach), except the refreshing
of the datagrid.
When the page loads and/or when a new record is added, I want the
datagrid to update (without the page refreshing). The information
that is returned is in XML format, and I somehow have to get it into
the datagrid.
Here's one record of the XML that is returned into variable
oResult.value:
"<ROOT><NewData Set>
<ActivityHistor y>
<ActivityID>312 </ActivityID>
<CustomerName>T est</CustomerName>
<Description>31 2-Development</Description>
<ActivityDate>2 005-08-10T00:00:00.000 0000-05:00</ActivityDate>
<ReferenceCode> J-1007</ReferenceCode>
<Minutes>15.0 0</Minutes>
</ActivityHistory >
</NewDataSet></ROOT>"
But for a given period of time, there will be several of these
ActivityHistory records.
Below is the function I have so far (sorry about the wrapping), but as I
said, I could be going
down a completely wrong path. I would greatly appreciate if any of
you have corrections for my code or if you have ideas/suggestions for
a different/better way to do this (since my way doesn't work,
anything would be better). Yes, I'm a newbie, and I'm just
not "getting" this at all. I have no idea what to do now that
nothing has worked thus far.
function LoadTable()
{
var Employee = document.getEle mentById
("_ctl1__ctl0_d dlEmployee").va lue;
var StartDate = document.getEle mentById
("_ctl1__ctl0_T extStartDate"). value;
var EndDate = document.getEle mentById
("_ctl1__ctl0_T extEndDate").va lue;
// Update the xml island with the employee history
information
var oResult = Methods.Employe eActivity(Emplo yee,
StartDate, EndDate);
var xmlDoc=new ActiveXObject(" Microsoft.XMLDO M");
xmlDoc.async=fa lse;
xmlDoc.load("ac tivityhistory.x ml");
var loaded = xmlDoc.loadXML( oResult.value);
if (loaded) {
var xslDoc=new ActiveXObject
("Microsoft.XML DOM");
xslDoc.async=fa lse;
xslDoc.load("Ac tivityHistorySt yle.xsl");
document.getEle mentById
("Table1Inner") .innerHTML = xmlDoc.transfor mNode(xslDoc);
}
}
Thanks! 1 1586
1. xml http sockets.
2. in dotnet 2, i think grid can refresh only itself and not the whole
page
3. remote script.
---
hB This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andrew Alger |
last post by:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button
on Customer.aspx that when executed runs javascript code to open up
parent_search as a popup. After the user searches for the parent and finds
the proper parent in the datagrid they then click on the accept button in the
grid. Then I populate a session variable with the parent ID. I then go back
to the main page and have it refresh using:
...
|
by: Glenn Owens |
last post by:
I have a DataGrid web control which I've dynamically populated with
template columns to be used for bulk-editting. Generally, all of the
columns are textbox and/or dropdownlist child controls.
Currently everything is working. I can find the updated rows/columns
by parsing the posted data collection against the DataGrid DataSource.
However, when there is a large amount of DataGridItems (rows) the
update processing can take a while.
...
|
by: Simon Storr |
last post by:
Is it possible to make the parent window refresh when a modal dialog is
closed? I know I can use
window.opener.location.reload(true);
for a 'normal' window, but this doesn't work for showModalDialog. It is
modal as far as the client is concerned but not the server...
In my app I have a datagrid on the main aspx page, I pop up a modal dialog
to edit a record. On closing the modal dialog I'd like to refresh the
|
by: Bryan G |
last post by:
I need to force the client side to refresh the page. What function do I use
todo this in C# with a ASPX page?
|
by: aliansari |
last post by:
HI ... i am facing a problem while refreshing my datagrid ... i am
developing a "Real time/Live data Stocks Trading Screen" ... what i
want is to refresh my datagrid without refreshing the whole page ...
there are couple of methods to do this which i know ...
1. Using Frames ... problem is gird will disappear and then redrawn on
the page which i dont want.
2. Using XMLHTTP ... problem is i cant find any samples in .Net.
so if any one of...
| |
by: sandhya.net |
last post by:
Hi,
I have a dropdown which displays the Products and Add button on my
Asp.net web page. When the user selects a product from the dropdown
and
Clicks the add button it adds the selected product to the datagrid.
The problem is when the user adds the product and clicks the refresh
button on the browser,the same item is added to the datagrid once
again. How to prevent calling Add_click Event when the refresh is
|
by: msnews |
last post by:
Hi --
I'm very, very new to ASP.Net, and I've been trying for several days to
figure out how to update a datagrid AND refresh it on the client side so
that the page doesn't refresh. I've torn my code apart over and over each
time I tried what I thought would be the code that would solve my problem.
Maybe I'm going down the completely wrong path here. Essentially,
here is an explanation of my ASP.NET webform application and what I
want...
|
by: msnews |
last post by:
Hi --
I'm very, very new to ASP.Net, and I've been trying for several days to
figure out how to update a datagrid AND refresh it on the client side so
that the page doesn't refresh. I've torn my code apart over and over each
time I tried what I thought would be the code that would solve my problem.
Maybe I'm going down the completely wrong path here. Essentially,
here is an explanation of my ASP.NET webform application and what I
want...
|
by: Andy |
last post by:
My application is written in .NET (C#) with the inline Edit mode from
DataGrid. When a SAVE button is pressed it will perform a action on the
database either to add, edit or delete data that a user has entered.
When the refresh button is pressed at the top of the page the same
exact data is re-submitted again resulting duplicate transaction in the
database. Is there anyway of stopping this happening? From client-side
script, how can we...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |