I am retrieving data from SQL SERVER using SqlDatasource control and displaying it in asp.net gridview.
for that GridView Control I want to edit that particular data which is displaying in the grid
if i click on a particular edit row then the data should display in a popup window and should display the selected record data in popup window. after editing and saving the data i want the gridview to update.
how can i implement this feature in my app.
thanks for your help
Few links which may be helpful to you.
http://www.aspsnippets.com/Articles/Add-Edit-Update-Records-in-GridView-using-Modal-Popup-in-ASP.Net.aspx
http://choosedaily.com/1178/15-jquery-popup-modal-dialog-plugins-tutorials/
http://forums.asp.net/p/1685721/4440319.aspx/1?Re+Fancy+Box+in+Gird+View
http://forums.asp.net/p/1683887/4433122.aspx/1?Re+I+need+help+appending+a+JQuery+modal+box
http://forums.asp.net/p/1660076/4335007.aspx/1?Re+show+gridview+within+dialog
You could use GridView.RowEditing event. In it you have e.NewEditIndex parameter from which you can fill your popup window data and save it back to the database after editing.
Related
I have a form which displays the data as per the search filters. Filters are few textboxes which allows the user to find the desired data.
Search button is the trigger for the update panel which contains Listview and the data is displayed as per the selected filters.Listview rows has a edit button. when i try to edit some record and come back by clicking the browser back button i dont find the List view anymore.
Is there a way wherein i can save the history point so that the Listview could be cashed and viewed quickly when i come back.
After few search i understood that scriptmanager enable history is set to true and history point is set.
But how to save the gridview data and display it back?
Can anyone help me out with this. Any example will help.
I used bootstrap modal popup and in that there is need to implement a gridview.
Using update panel,I added gridview and databinding is working properly.
In gridview row, there is a textbox where user can modify the existing values and update with a save button outside the gridview.
But when I fire the Save button command at server side, I am not getting the updated values instead I am getting old values by looping gridview rows controls.
How to get the updated values of from textbox in gridview inside bootstrap modal popup? I have used update panel also.
Please suggest.
In save button event, make sure that you are refreshing the gridview content adding databind() once you have saved the new values
YourGridView.DataSource = TheSource;
YourGridView.DataBind();
after hitting the update and fetching back the updated values you should register back the modal popup from c# at the end of the same event
ScriptManager.RegisterStartupScript(this,this.GetType(),"Pop", "openModal();", true);``
Customize the script according to your need
We know asp.net gridview can edit/delete by clicking the button along with the gridview bind with a database.
Can we do it in windows form? I mean how to customize the button event or borrow asp.net framework to winform?
Please see the image.
As far as I know the winform grid do not have these abilities, You'll have to create them explicitly, like add another column and implement his onlclick/doulbe click, it really have tons of events.
p.s. if u want the user to change values on the rows displayed you'll need this:
dataGridView1.EditMode = DataGridViewEditMode.EditOnKeystroke
In a list view in C# how can I make all the fields in a column editable at once? Right now I have the standard edit button which allows me to update just one line at a time. I want the end user to be able to click a button and allow then to edit the column in its entirety.
Rebind the ListView with all TextBoxes when the user clicks edit.
You would have to manually track if you're in edit mode or not and on postback loop through all the rows retrieving the values from the textboxes and store them.
There is no built-in functionallity for what you're trying to do but it's possible.
Normally what happens, a single or more lines are shown as a tooltip. What I need is to show a gridview as a tooltip. Actually in my project i need to show all the notes associated with a stock in a gridview.
Can anybody help me?
Thanks for sharing your valuable time.
As you are working on the web; why not use a dynamic DIV or the equivalent and have a JS function that loads it with the relevant content and moves it to where you want it upon the mouseover event of the control you want to display the tooltip for?
GridView in a tooltip? gringe
Why don't you use a Sql Data Reader to fetch the data, then set the server control's tool tip text to that?