Update datagrid row about editing row in an popup window

I have a datagrid with a linkbutton that calls the dgGrid_ItemCommand procedure in the code behind. In this procedure I use the response.write to open a popup window with an custom user control to update the selected row of the datagrid. 

My popup window/custom user control works great and I have no problem closing the popup window after updating.
I can refresh the datagrid prior to closing the popup. BUT this causes a problem, because my datagrid has paging enabled and when you refresh the grid/parent window(window.opener.location.href) it just reloads that page displaying the grid back at page 1.
I want to be able to just update the row with the new information.
dgGrid.Items(selIndex).Cells(4).Text = TextUpdated
Can this be done? If so how?
Any help would be greatly appreciated.
0
sbrazier
6/14/2004 8:59:42 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies
772 Views

Similar Articles

[PageSpeed] 42

Instead of using location.href you must do a postback i.e. use document.form1.submit()
Bug [MCSD]
0
Bug_Bugger
6/15/2004 12:54:35 PM
Reply:

Similar Artilces:

Add new controls to a gridview row; when editing that row using the edit row feature in the gridview control.
Hi all  I have a questions that looks hard / complex to me, and i know you can help me in this. Q {  I have row in a Gridview and i have an edit option to it. I press the edit button, to edit the values in that row and update data all the way back to the database. Now when i press the edit button, i want a drop down list to be displayed that contain values for a particular field in my grid view. (for now only plain text boxes appear.) } I hope you understand my question, all i need to do is replace the text box controls with a dropdown list when i am editing a row in ...

datagrid .net 1.1: edit/update row
 I need to write the code for editing a row for a datagrid in .net 1.1  User can only change one field and that filed should contain a ddl with two options.  When user selects an option it should update that record with that value (once update link is clicked).  Thanks for any examples on this. Hi newbieAl, Have a look at this article about using DropDownList to update data in DataGrid: http://www.codeproject.com/KB/webforms/MultiColDdList.aspx Thanks,Qin Dian TangMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unm...

Allow editing of all rows simultaniously (without having to click edit/update for each row)?
I have an application where the user will be presented with perhaps 20 rows.  1 field of each row (the score) will need to be updated by the user.   Now with a gridview they would click on the first row's EDIT button then make the change for the Score field and then click update. Having to do this ~20 times would be somewhat annoying for the user :)  Is there any way I can get an Excel like behavior where the user can just click on the first row's Score field then enter the integer score and hit tab or down arrow or something and drop down to the next one and keep ...

Row updating, row updated confusion
Okay this is the first time I've ever had to do code behind for row updating logic in a gridview. So be patient with me if it's totally incorrect. Do I put the gridview rebind code in the Row Updating or Updated event?  Currently, I have it in both as I'm simply troubleshooting to try to get it to work.  With this code, not only is the record not updating but the record disappears from the gridview upon refreshing.Protected Sub GridView2_RowUpdated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdatedEventArgs) Handles GridView2.RowUpdated ...

Edit/Update a row in datagrid
Could someone show me simple code of editing a row in datagrid? (visual basic .net) check this http://www.developer.com/net/vb/article.php/3320941 Best Regards, Vivek Singh...

How do you edit a datagrid row, but not in the datagrid?
I'm using a Datagrid to display links from an Access database. The URL is incorporated in to the displayed link, of course. But I would like to click an edit button and have an edit form appear beside the datagrid columns, for that row only, allowing me to edit everything, including the URL, instead of editing directly in the datagrid. I would also like the ability to add new rows from the form. Can anyone tell me how to do this? Thanks, Gary I should have added that I'd like the edit form to appear only when the edit button is clicked... G. <asp:DataGrid id="D...

question about updating a row? How to update a different row.
I will try to make this as simple as I can. k, here I go. I originally populate my datagrid with data. Then during the edit mode, I can populate information by an ontextchanged event, which is actually bringing in a new row (essentially). My problem occurs when I try to update the data. Since the row was originally populated with the data, it updates that row in the table. But since I did an ontextchanged, I want to update that row instead. Not the original row. If I do an update, then I have two identical rows of data in my table, but with different primary keys. How can I update t...

Editing Multiple Rows in DataGrid Control
Hi, i am building a datagrid control n i need to set some of the rows editable while the rest non-editable. i understand tat the edit command only allows a row to be editable anyone time. So there some other ways to go abt it, so as to allow multiple rows editable at anyone time. Please let mi know... Thanx in Advanced!Whoever undertakes to set himself up as a judge in the field of truth and knowledge is shipwrecked by the laughter of gods....

How update my DataTable after editing a row in my DataGrid?
Hello,I created manually a DataTable in my DataSet.  I filled data row by row.  I binded my grid on my DataTable.  Until there no problem.  After editing a row in my grid I'm able to read data but I'm not able to update my DataTable.  I don't want send a update command to my DB now.  I just want update my DataTable at this moment.  This is a part of my code: Private Sub grdEquip_UpdateCommand........ szDroit1 = Convert.ToString(CType(e.Item.FindControl("cboDroit1"), DropDownList).SelectedValue) szDroit2 = Convert.ToString(CType(e.Item.FindContr...

Updating only updated DataGrid rows
I have a gridview control that I have  swapped out the lable controls for textbox controls. What i want to do is code a save button to iterate through the rows and at any row where the value has been changed, run a sql update. I have the sql, I have the grid view, but i dont have the iteration code. (im using c#)psudo code:  while(gridview.rows.morerows()=true (or somthignlike that))if(row.current row.update = true ){do sql update here}nextRow Any hints are greately appreciated Dan    foreach (GridViewRow row in GridView1.Rows) { // You hav...

I want to control the length of a datagrid row when I edit it.
I have a datagrid and I can edit the data in the row I click on but I want to control the length of the textboxs of the row that is being edited. There pretty wide and I want to know what is the best way to shrink them. Thanks. use TemplateColumn's.. hth***********************Dinakar NethiLife is short. Enjoy it.*********************** How do I use Template Column's to control the length of the text box when I am editing the row. Thanks. you can fix the width of the columns...check these articles @ 4guysfromrolla hth***********************Dinakar NethiLife is short. Enjoy it.***...

Modify control values in row of Datagrid during edit
Hi! I have a datagrid, in which the first column holds a dropdownlist (during an edit). I would like to be able to modify the contents of the other columns based on what a user selects in the dropdownlist. So far I have set the "OnSelectedIndexChanged" event to a procedure called "ChangeDefaultValues" as follows: <EditItemTemplate> <asp:dropdownlist DataSource='<%# dsCurrentLocation.DefaultView %>' DataTextField="CurrentLocation" DataValueField = "CurrentLocation" ID="CurrentLocation" runat="server" OnS...

how to add confirm window when update a row with datagrid?
I have seen a lot of ways to add a confirm window to a delete link button with datagrid, but I could not find any ways to do this with update link button. Can anyonw help me with this?Very much appreciated.... I fount it... Thank you guys anyway..Have a good day.... Do you wish to share with the rest of us?-Craig U-Sports.net - Taking Fantasy Football to School Yep. It would be great if you could post the code here."Divide by cucumber error. Please reinstall Universe and reboot."Learning ASP.NET 2.0... please wait.Excuse my poor english. Sure...in ASPX page: using this...  ...

DataGrid with checkbox next to every row, update checked rows in Database table
I have a datagrid with checkbox column which is bit datatype 0 or 1 which show up on ASP page as checked by default as 1 , I want users to  uncheck certain rows and hit a refresh button right next to datagrid , refresh will do a update in the table and change the bit column value to 0 in table for uncheck rows. any suggestions, I found  something below but this update button next to every row in a column, I want a universal button outside data gird whihc can update all rows in the orignal table.   Private Sub DataGrid1_ItemCommand(ByVal sour...