C# - Make A Conformation Window On Delete In Gridview?
Mar 2, 2011how to make a conformation on boundfield in gridview in delete ....event
View 2 Replieshow to make a conformation on boundfield in gridview in delete ....event
View 2 RepliesI've got my data in the gridview via:
[Code]....
Now I need to make all the data editable (add, update, delete). Why isn't the Gridview the same as DataGridView? With the DGV, the data showed EXACTLY as it did in the database and one could add a record, edit a record, or delete a record.
I have a student data, when I put the student id in textbox, it show the students mark in gridview like
1st semester marks in first row , 2nd semester marks in second row ,etc
and i want insert 3rd semester marks , 4th semester marks for the particular student , and also , delete , update in gridview....
How to make hyperlink field or buttonfield pop up a window and redirect to a new page at the same time? so far it can only redirect to a new page, but target is also to pop up a child window when try protected void Cheque_GridView_RowCommand(object sender, GridViewCommandEventArgs e) can not find a way to add attribute to button to use javascript to pop up a child window <asp:HyperLinkField Text="Select" DataNavigateUrlFields="BatchNo, BankCode, ChequeDate2, IssueDate2, CompanyCode, VoucherBatchNo, VoucherNo, ChequeID, ChequeNo, PaymentType, DespatchType, DespatchDate2, Curr_Code, Amount"
datanavigateurlformatstring="~/Edit_Batch/AddCheque.aspx?BatchNo={0}&BankCode={1}&ChequeDate={2}&IssueDate={3}&companycode={4}&VoucherBatchNo={5}&VoucherNo={6}&ChequeID={7}&ChequeNo={8}&PaymentType={9}&DespatchType={10}&DespatchDate2={11}&Curr_Code={12}&Amount={13}" />
I have one asp.net C# page in which i have gridview..
This are the url comes from database and binded in gridview
www.xxxxxx.com/A/Default.aspx
www.xxxxxx.com/B/Default.aspx
www.zzzzz.com/C/Default.aspx
what i need is i need to show this url has like this
www.xxxxxx.com/A/Default.aspx is like Test1
www.xxxxxx.com/B/Default.aspx is like Test2
www.zzzzz.com/C/Default.aspx is like Test3
if user click Test1 it will open a new browser window with www.xxxxxx.com/A/Default.aspx
if user click Test3 it will open a new browser window with www.zzzzz.com/C/Default.aspx
how to make this in gridview
In my application a create a pdf document from code behind and save it in to the server folder.Then render it on a new window. my requirement is i need not keep it in my server. after user acess the page i need to delete it. how i manage it?
View 1 RepliesI have a page, which contains 2 textboxes. When i click on the first textbox, i have to open a child window (tool), that contains a gridview control with 2 columns (corresponding to the 2 textboxes). When the user clicks on any row in the gridview, it should send back the 2 column values back to the parent window to the corresponding 2 textboxes. how do i achieve this?
View 1 RepliesHow do I reference the delete button to add the delete confirmation box when I have both the Edit and Delete buttons as the last two columns in the Gridview control. The following code works fine without any issues when I have the delete button only:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType != DataControlRowType.DataRow) return;
int lastCellIndex = e.Row.Cells.Count - 1;
Button db = (Button)e.Row.Cells[lastCellIndex].Controls[0];
db.OnClientClick = "if (!window.confirm('Are you sure you want to delete this record?')) return false;";
}
But, when I have both the Edit and the Delete buttons, I get the following error when I click the edit button while the delete button works fine.
Specified argument was out of the range of valid values. Parameter name: index
How do I reference the delete button so the edit button is not affected in this case?
Using "Enable Delete" from Gridview control, I can delete (besides, update, sort, paging, etc) data from the database (this is done automatically). However, how can I delete the actual image that resides in my image folder (i.e. from "pix" folder )? What is the best way to delete image? If using code behind, how? Please write a full code for me. Here is my source code.
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="photoID"
I am using Sharepoint Designer and trying to insert a Delete button into a gridview. I added this to the top of my ASPX:
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" %>
and I added this as a Gridview column:
<SharePoint:DeleteItemButton
runat="server"
ID="CustomFormDeleteItemButton"
ControlMode="Edit"
/>
and this is the error I get:
An error occurred during the processing of . System.Web.UI.WebControls.DataControlFieldCollection must have items of type 'System.Web.UI.WebControls.DataControlField'. 'SharePoint:DeleteItemButton' is of type 'Microsoft.SharePoint.WebControls.DeleteItemButton'.
I have a gridview with edit and delete parameters enabled. When I click on the edit link, I can edit the record successfully. However when I click on the delete link, nothing happens (the record does not get deleted).
View 5 RepliesI have a Gridview (VS2008 3.5) which has a Edit Button and a Delete button.he Delete button deletes the row without confirming deletion with the user first. ow can I use the Confirm/Delete Confirm from Ajax Toolkitif possible and if not, is there a way to Confirm/Delete with user firstwhen using Gridview?
View 6 Repliesi am developing a chat engin and i need some guidenc i have done to some exten but i am unable to make the window pop up on both the users i.e if a want to chat to b if he clicks on b the window is poping up in a's side but it's not poping up on the b's side
View 1 RepliesHow can i make the Popup window not movable? have a Pop-up window which i open using ShowModalDialog through code-behind using
ClientScript.RegisterStartupScript(Page.GetType(),
"a", pageOpen);
where pageOpen is a string like:-
[Code]....
i want the page to be fixed in the middle of the screen,it should not be moved or dragged by any means,How can i disable that?
I have a popup window of course through the use of modalpopup extender that searches a record. In the popup window, I have two buttons - a search and a close button. Whenever, I click on the search buttton, the popup window immediately disappear. How am be able to make my modal popup window to stay visible even I click on the search button?
View 2 RepliesI'm using Modal Popup, when user click i need to get the window in center, irrespective of screen size. my screen size is 1280*780 so i adjust the x and y value in modal popup im getting the window in center,but alignment is changed on other screen size. how to make the modal popup in center in all size
View 4 Replieshow to make exe file of window application in Visual web developer 2008
View 1 Repliesi can not delete user by use gridview and objectdatasource in VS2010 .
View 4 RepliesLets say that i want to make a ADMIN page for articles.
1) I show all my articles on lines
2) Each article has an EDIT BUTTON and INSERT NEW button
3) When I click on the EDIT BUTTON, it opens a CUSTOM page where i can Edit my article.
4) When i click on the INSERT NEW BUTTON it opens the same CUSTOM page where i can Insert my article.
I was trying to do it with Gridview and Formsview.
i have an aspx page in which a link in the grid view opens a popup page . the data in the grid view would be dynamic and i need to send the id of the row of grid while calling the child window. i get the id using sender.id, but how would i send this using window .open()?
View 2 RepliesI have a completely new form where I have put a gray background to the form.
As seen when open up this code in the browser is that there is like a white border around this gray background wich meens that this gray color is not convering the whole browser window.
How would it be possible to make the whole browser window gray without any white "borders" ?
[Code]....
I have a table with primary key whose importance is technically high and none business wise. So, when I display the table data to user, I would like not to show him the primary key. Even if I load it in sqldatasource and dont show (I did this by removing the cloumn in "Columns" tag of GridView), I am not able to update or delete row using the built-in UpdateCommand & DeleteCommand. I have created the delete paramters but it does nothing when I hit the delete button.How to get around it?
View 2 RepliesI have this code until now:
<asp:TemplateField ShowHeader="False" ItemStyle-Width="150px" HeaderStyle-BackColor="#003ca1" HeaderStyle-ForeColor="white">
<ItemTemplate>
<asp:LinkButton ID="linkDelete" runat="server" CausesValidation="False" CommandName="Delete" OnClientClick='return confirm("Diesen Eintrag wirklich löschen?");' Text="Löschen" />
</ItemTemplate>
</asp:TemplateField>
At this moment, the GridView deletes the row physically.I want to catch this in CodeBehind, cancel the delete-operation and want only set a "IsDeleted"-Flag in the database.
Just a bit of advice needed really in terms of how I should handle my current scenario:
I have a web page that searches for products/category information the results of which are at present displayed in a gridview on the same page.
However, said gridview is a bit of a beast and as such, I would like to have a page that the user searches for, a button is pressed and the subsequent gridview is displayed in a new window.
Ultimately, I would like the user to be able to make multiple searches so that new windows can have multiple gridviews containing different data sets.
My current thinking is to create session variables that can be pulled through onto 'the gridview page'. Having said that, I'm not sure that would work if multiple searches are created?
I am also thinking I might be able to create said 'gridview window' using javascript but my concern here is the potential loss of functionality of the gridview i.e. paging, sorting, editing, etc.
I have a list of properties in a gridview. I have a property ID column. I have a delete column. On clicking delete, after the delete event has been fired e.g. gridview_rowdeleted. I want to get the propertyID of the deleted column in order to set it to the session("propertyID") usage is the use that propertyID in another function to delete associated property Images.
View 5 Replies