datagridview

how to use undo operation in ms-access database

hi, I am currently working in application,I loaded MS_access database into datagridview there i have written code for insert,delete,update and search . For Example: IN Ms Word when we click CTl+Z any previously made changes would be restored. Just like this any previous changes made in the datagridview should be restored using either...

Sync a WinForm with DatagridView

I have a Form with a DataGridView which DataSource is a BindingSource to a table. This view will have a single row selection and a button to delete, edit the current selected row in a popup Form and a insert button that will use the same Form as well. My question is how can I sync the pop Form with the current row? I tryied to use the ...

Binding a Dictionary to the DataGridView in C#?

I have a dictionary item as below Dictionary<string, List<StrikePrice>> where public class StrikePrice { public string Strike { get; private set; } public string Price { get; private set; } public StrikePrice(string strike, string price) { Strike = strike; Price = price; } } and I wish to assign...

Stuck with datagridview and combo box column

I have a typical requirement. I have a datagridview with a combobox column(items loaded at design time). When a user selects an item from combobox, remaining rows gets updated in database based on the selectedItem and dgv gets refreshed. Problem is the combo box will lose its current selection and goes to unselected state. I want to re...

GridView Size Problem?

Using VB.NET 2008 Am using Datagridview in my application, Datagridview should display according to the windows screen size, Before I used vb6 code. Private Sub Form_Resize() On Error Resume Next If Me.WindowState = vbMinimized Then Exit Sub End If listview1.Top = 1550 listview1.Left = 0 If ScaleHeight >...

How to trap delete row ( from keyboard ) in datagridview?

Background I have a custom collection that is binded to the datagridview this.datagridview.DataSource = mycollection I have a delete button on the user interface . User can click on the delete button to delete the selected DX Directory. Some entried cannot be deleted so I Enable and Disable "delete button". It works fine in case use...

Delete a Row from a DataGridView given its index

My DataGridView is a single line selection and theres a rowEnter Event where I get the line index every time the selected line changes. private void rowEnter(object sender, DataGridViewCellEventArgs e) { currentRowIndex = e.RowIndex; } when I press a delete button I use the same index to delete the row ...

Insert a Row with a sorted DataGridView

My DataGridView is bound to the same BindingSource as the Insert Form, and the Name column is sorted. After insert is done, the groupBindingSource.Current is not returning the new inserted DataRowView but the last row in the sort order what makes the Update do nothing. FormGroup formGroup = new FormGroup(); formGroup .So...

Select newly added Row - DataGridView and BindingSource

I'm adding a new Row to a BindingSource that is Bound to a DataGridView source.AddNew(); After this, use BindingSource to get the newly added row is return the next row in the DataGridView when its sorted. ROW "A" ROW "B" <- myBindingSource.AddNew(); ROW "C" myBindingSource.Current gives ROW "C". (it became the selected row in the ...

Free hierarchical DataGridView with DataBinding support

I'm searching for a DataGridView derrived class that show data in hierarchical way and supports DataBinding like regular DataGridView does. Do you any of this? Free? ...

how to import excel file of multiple sheets into a gridview

i have a application in ASP.NET where i upload excel file using Fileupload and saving it in a folder. and then viewing it in a gridview.but i am unable to retrieve an excel file if it has multiple sheets.i have successfully done for a excel file having single sheet i.e sheet1.can any one solve the problem. thanks in advance ...

C# - DataGridView and SelectedCells - Finding the Row Indexes of Selected Cells

What is the cleanest way to ask a DataGridView to return "indexes of rows that have selected cells"? This is not the same as DataGridView.SelectedRows. I don't allow Row or Column selection. So users must select blocks of cells. I just need to find out which rows have selected cells in them. Is there some clever lambda expression I sho...

Is it possible to paste Excel / CSV data from clipboard to DataGridView in C# ?

I use DataGridView control to manage a simple dictionary (several columns and a few hundred rows). DataGridView functionality is almost sufficient. I can add new rows, modify values and copy data from it to Excel. One thing I cannot do is to copy data from Excel to my control. Is it possible with some properties? Or is some code required...

Binding data to the custom DataGridView

All, I have a customized DataGridView where I have implemented extra functionality and bounded datasource in the same custom DataGridView (Using C# and .NET). Now, I could able to use it properly by placing it on a panel control. I have added label as button on panel control to display data from datasource on to datagrid and create a bi...

DataGridView paging

Hi, I have applications(WinForm) that gets some objects from webservice. After receiving array I transform array to DataTable and show data in DataGridView. Problem is when there are too many records. Of course I can change WS to send information in packages containing for example 100 objects but I'm not sure how to change DataGridView. ...

Displaying XML data in DataGridView using DataSource

Hi - I have a form with a DataGridView and I want to load data from an XML file into the Grid using a DataSet. I create a DataSet, load the XML into the DataSet, then assign the DataSet to the DataSource property of the Grid: private void formAccountHistory_Load(object sender, EventArgs e) { // Load the DataSet that represents the o...

Merge cell in datagridview in winform using c#?

I have to create a scheduler for my projects. For different time slots I have to show related information so there is a need to merge cells of datagridview. Is there any third party tool avalable for this or I have to paint each required set of cells. ...

i want to bind the gridview in asp.net 2008

i have more than 10,000 record .. and i want to bind my database which is in sql server 2005,with gridview in asp.net ... main purpose is .. without taking so much load ... it;s loading in gridview.. while i will run it.. ...

Which is good way to bind more than 10000 records with sql?

first way By using java script or second way By using Data sourse in asp.net sqldatasourse which is taking less stress while loading the data.. into webpage ...

How to sort databound DataGridView column?

I know that there are a lot of questions on this topic. I have been through all of them but nothing seems to help. How to sort by clicking on column header? How should I modify this code to do the job? public partial class Form1 : Form { public Form1() { List<MyClass> list = new List<MyClass>(); list.Add(new ...