473,803 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid popup window problem

Hi,

I have a datagrid which displays a list of names and a
button next to each name. In the Datagrid_ItemDa taBound
event I attach an attribute to each button which sets the
onclick event of each button to a javascript window.open
event that opens up a popup window, the only problem is
that when I push the button, the new window displays but
the other window re_loads itself and after a few seconds
focus is taken away from the new window, back to the
opener, is there any way of stopping this from happening?

Any help with this would be greatly appreciated
Thanks
Stephen
Nov 18 '05 #1
2 1704
Stephen:

Ive done this several times. Sounds like the form is doing a postback when
the window is being opened. You can suppress it by calling return false
after the javascript window.open command. The other option is to use an
HtmlInputButton control, but this has proved to be a PIA for me.

HTH

"Stephen" <an*******@disc ussions.microso ft.com> wrote in message
news:07******** *************** *****@phx.gbl.. .
Hi,

I have a datagrid which displays a list of names and a
button next to each name. In the Datagrid_ItemDa taBound
event I attach an attribute to each button which sets the
onclick event of each button to a javascript window.open
event that opens up a popup window, the only problem is
that when I push the button, the new window displays but
the other window re_loads itself and after a few seconds
focus is taken away from the new window, back to the
opener, is there any way of stopping this from happening?

Any help with this would be greatly appreciated
Thanks
Stephen

Nov 18 '05 #2
Thank you very much, this now works perfectly! I used the
return false.

-----Original Message-----
Stephen:

Ive done this several times. Sounds like the form is doing a postback whenthe window is being opened. You can suppress it by calling return falseafter the javascript window.open command. The other option is to use anHtmlInputButto n control, but this has proved to be a PIA for me.
HTH

"Stephen" <an*******@disc ussions.microso ft.com> wrote in messagenews:07******* *************** ******@phx.gbl. ..
Hi,

I have a datagrid which displays a list of names and a
button next to each name. In the Datagrid_ItemDa taBound
event I attach an attribute to each button which sets the onclick event of each button to a javascript window.open
event that opens up a popup window, the only problem is
that when I push the button, the new window displays but
the other window re_loads itself and after a few seconds
focus is taken away from the new window, back to the
opener, is there any way of stopping this from happening?
Any help with this would be greatly appreciated
Thanks
Stephen

.

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3865
by: Jon | last post by:
Hello, I have a datagrid and the data in it is dynamically created at runtime... For iCounter = 0 To dataset.Tables(0).Columns.Count - 1 Dim objbc As New BoundColumn() With objbc .DataField = dsAllPastReplies.Tables(0).Columns(iCounter).ColumnName .HeaderText = dsAllPastReplies.Tables(0).Columns(iCounter).ColumnName If .DataField = dsAllPastReplies.Tables(0).Columns("ReplyID").ColumnName Then
1
2044
by: Joseph Yang | last post by:
Hello all, I have a datagrid bounded with an Arraylist containing contact objects, and a edit button (<asp:imagebutton/>) in each row When I click edit button, I want a window popup so I can edit the selected contact, so when I click this button, I find out which contact get selected, put it in session But the problem is: popup window shows up first before I put the
0
294
by: vinay | last post by:
In my page I am using a DataGrid with Paging implemented and also have a button seperately on the page, which fires a javascript(Opens a POPUP window) function PrintWin() { document.eSESalesDirReport.action="GetXXXPrint.aspx"; document.eSESalesDirReport.target=window.top; document.eSESalesDirReport.submit(); }
2
2344
by: Sky | last post by:
Hello: Another question about trying to wring functionality from a DataGrid... Have a DB table of "Contacts" -- 14 or more fields per record Show in datagrid -- but only 5 columns (First,Last, Fax, Phone, Category). Put an Edit column at the end... Now what?! If you go into Edit mode -- you can only edit 5 cells -- not all the rest of the Record's fields...not enough!
0
1094
by: Mike Lowe | last post by:
Having terrible trouble with this. I am using the IBuySpy Portal solution. I have a web control that has a datagrid bound to dataset that is stored in session state. Upon clicking the edit grid command I launch a popup window which displays the current selected record in bound controls.... can perform a SQL update in the popup but on closing the popup cannot refresh ( rebind ) the parent datagrid....
1
1826
by: Rob Petersen | last post by:
I have a datagrid with an Edit/Update column. Instead of editing records "in place" I'd like to do so in a separate popup window because there is a lot of validation, business rules and dynamic controls. What is the best way to launch a popup window (preferably modal) and then refresh the parent datagrid if the user presses a "Save and Close" button in the popup? Are there any caveats regarding popup security or updating a parent grid...
1
1818
by: pv_kannan | last post by:
One of our dev team members is having a strange problem with a datagrid... We are not seeing a datagrid's data getting refreshed after a new row is entered in a popup window inspite of resetting the datasource and rebinding it. We have a datagrid (enabled viewstate) that binds to a collection class that inherits the IList interface. The datagrid displays list of associated contacts for a customer order.
0
1512
by: laurent | last post by:
Environment: VS NET 2003 Fr Framework: 1.1 OS: WinXP SP2 Fr Hello I have a problem to add with pop-up and to delete in a datagrid(ButtonColumn delete) on WebForms. code button HTML which opens pop-up: <INPUT class="buttonForm" onclick="MM_openBrWindow('../pages/recherche_ar.aspx?a=2','AR','width=700,height=500,scrollbars=yes,resizable=yes')"
0
1015
by: TrevorHEK | last post by:
I am using c# and I made a Static DataGrid. I have my own function to set columns and template columns the way I want at runtime. I have been using the same grid class I made for many projects so far without a problem till now. In one page I have one column with a dropdown list. I change it in many rows and click update which generates update statements based on the grid. It works perfectly, I intergrate it to my fellow developers project...
0
9562
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,...
1
10289
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,...
0
10068
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 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...
0
9119
agi2029
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...
0
6840
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3795
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2968
bsmnconsultancy
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...

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.