Click here to Skip to main content
15,886,110 members
Articles / Programming Languages / C#

Add, Edit, and Delete in DataGridView with Paging

Rate me:
Please Sign up or sign in to vote.
4.76/5 (44 votes)
24 Jan 2007CPOL4 min read 472.1K   29K   168   67
This article describes DataGridView manipulation like add, edit, and delete, with paging, and using asynchronous method calls.

Sample Image - DataGridView_manipulation.png

Introduction

The article, or rather code snippet, demonstrates a simple application to insert, update, and delete using a DataGridView. The application uses an asynchronous architecture for most of the calls to the database. This is to show that without a hanging UI, we can allow the user to continue with his tasks. The application has the following outline:

  1. Get all SQL Server instances from the network.
  2. Get all databases from the selected instance.
  3. If the user provides an empty user name or password, or a wrong user name or password, the same list of SQL Server instances will be returned. The code is available here[^].

  4. Get all tables from the selected database.
  5. Get all records from selected table.
  6. Add, edit, delete records from the DataGridView.
  7. A paging feature with number of records per page is also provided.

Asynchronous architecture

The application uses an async calling mechanism to make database calls. As the SQLEnumerator does not support async calling, I have added delegates to call those methods asynchronously. In .NET 2.0, the SqlCommand object supports async calling to a database. I am using this feature to get all the tables from the selected database. Delegates are the best practices to design async architectures because most of the things are internally handled by the CLR, and we do not have to bother much about them.

Application structure

When we start reading the code from the beginning, we can see that there is an enum named CallFor. This is used to set a private variable called when making calls to a SQL Server list, databases, and tables. This is done because only one call back method handles all the callbacks from asyn calls. A switch case statement manages the behavior of different callbacks. I have designed this application using a SqlCommandBuilder as I have some queries regarding how to use SqlCommandBuilder. The builder will automatically generate the insert, update, and delete commands, provided that you select the primary key in your Select query. I have faced a very common problem of cross thread exceptions. But, in my previous project, we implemented the same architecture, and .NET 2.0 provides InvokeRequired and the Invoke() function to overcome this problem. We have to declare a delegate with a similar signature as the callback method and call the same method using the control's Invoke() method. This will push all the call stack to the parent thread from the executing thread, and put parent thread to work. You need to follow a sequence like:

  1. Get all SQL Server instances.
  2. Get all databases from the selected instance.
  3. Get all tables from the selected database.
  4. Load data from the selected table.
  5. Use paging to navigate.
  6. Add buttons like Add/Update, Commit, Delete to insert/update or delete. You can delete/update/insert multiple records.

Here are some code blocks I'll explain. This function sets the database objects required throughout the application. The sqlQuery is dynamically built.

C#
private void SetDataObjects()
{
    connection = new SqlConnection(connectionString);
    command = new SqlCommand(sqlQuery, connection);
    adapter = new SqlDataAdapter(command);
    builder = new SqlCommandBuilder(adapter);
    ds = new DataSet("MainDataSet");
    tempDataSet = new DataSet("TempDataSet");
}

The two functions below load the data and bind it to a DataGridView. I was trying to bind a temporary DataTable object to the DataGridView and then update the main table. But, I was not able to do so. I used the adapter's Fill() method which takes a start record and the number of records as input parameters with the DataSet. I created a temporary DataSet to get the total records. I dispose it immediately. Instead of directly binding the data source to a DataGridView, I prefer to add columns manually and then let the rows to bind to them. This allows sorting, and in case we do not want to show any columns, we can do it here.

C#
private void btnLoad_Click(object sender, EventArgs e)
{
    lblLoadedTable.Text = "Loading data from table " + cmbTables.Text.Trim();
    btnLoad.Enabled = false;
    this.Cursor = Cursors.WaitCursor;
    try
    {
        if (userTable != null)
        {
            userTable.Clear();
        }
        userDataGridView.DataSource = null;
        userDataGridView.Rows.Clear();
        userDataGridView.Refresh();
        sqlQuery = "SELECT * FROM [" + cmbTables.Text.Trim() + "]";
        SetDataObjects();
        connection.Open();
        ticker.Start();
        adapter.Fill(tempDataSet);
        totalRecords = tempDataSet.Tables[0].Rows.Count;
        tempDataSet.Clear();
        tempDataSet.Dispose();
        adapter.Fill(ds, 0, 5, cmbTables.Text.Trim());
        userTable = ds.Tables[cmbTables.Text.Trim()];
                        
        foreach (DataColumn dc in userTable.Columns)
        {
            DataGridViewTextBoxColumn column = new DataGridViewTextBoxColumn();
            column.DataPropertyName = dc.ColumnName;
            column.HeaderText = dc.ColumnName;
            column.Name = dc.ColumnName;
            column.SortMode = DataGridViewColumnSortMode.Automatic;
            column.ValueType = dc.DataType;
            userDataGridView.Columns.Add(column);
        }
        lblLoadedTable.Text = "Data loaded from table: " + userTable.TableName;
        lblTotRecords.Text = "Total records: " + totalRecords;
        CreateTempTable(0, int.Parse(cmbNoOfRecords.Text.Trim()));

        btnPrevious.Enabled = true;
        btnFirst.Enabled = true;
        btnPrevious.Enabled = true;
        btnNext.Enabled = true;
        btnLast.Enabled = true;
        btnAdd.Enabled = true;
        btnUpdate.Enabled = true;
        btnDelete.Enabled = true;
        cmbNoOfRecords.Enabled = true;
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.ToString());
    }
    finally
    {
        connection.Close();
        btnLoad.Enabled = true;
        this.Cursor = Cursors.Default;
        prgProgress.Value = 0;
        prgProgress.Update();
        prgProgress.Refresh();
        ticker.Stop();
    }
}

This method actually binds the data to the DataGridView and is called for all paging functions. Depending upon the current index and all, the required number of records are fetched.

C#
private void CreateTempTable(int startRecord, int noOfRecords)
{   
    if (startRecord == 0 || startRecord < 0)
    {
        btnPrevious.Enabled = false;
        startRecord = 0;
    }
    int endRecord = startRecord + noOfRecords;
    if (endRecord >= totalRecords)
    {
        btnNext.Enabled = false;
        isLastPage = true;
        endRecord = totalRecords;
    }
    currentPageStartRecord = startRecord;
    currentPageEndRecord = endRecord;
    lblPageNums.Text = "Records from " + startRecord + " to " 
        + endRecord+ " of " + totalRecords;
    currentIndex = endRecord;

    try
    {
        userTable.Rows.Clear();
        if (connection.State == ConnectionState.Closed)
        {
            connection.Open();
        }
        adapter.Fill(ds, startRecord, noOfRecords, cmbTables.Text.Trim());
        userTable = ds.Tables[cmbTables.Text.Trim()];
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.ToString());
    }
    finally
    {
        connection.Close();
    }

    userDataGridView.DataSource = userTable.DefaultView;
    userDataGridView.AllowUserToResizeColumns = true;
}

Here is a sample method which gets SQL Server instances asynchronously. After BeginInvoke(), the user is free to perform any task. The callback function will catch the response. This is the way you can invoke a method asynchronously using a delegate.

C#
private void btnLoadSqlServers_Click(object sender, EventArgs e)
{
    ticker.Start();
    btnLoadSqlServers.Enabled = false;
    this.Cursor = Cursors.WaitCursor;
    cmbSqlServers.Items.Clear();
    called = CallFor.SqlServerList;
    intlDelg.BeginInvoke(new AsyncCallback(CallBackMethod), intlDelg);
}

Here is the callback method that will handle all the callbacks from the different methods. When you use an async architecture, the callback is always on a new thread other than the parent one. This new thread will not able to access the controls on the parent thread. Hence, we need to shift the call stack to the parent thread, and this can be done using control.InvokeRequired and control.Invoke(). The following method shows how to do that.

C#
private void CallBackMethod(IAsyncResult result)
{  
    if (this.InvokeRequired)
    {
        this.Invoke(new AsyncDelegate(CallBackMethod), result);
    }
    else
    {
        try
        {
            prgProgress.Value = prgProgress.Maximum;
            switch (called)
            {
                case CallFor.SqlServerList:
                    string[] sqlServers = intlDelg.EndInvoke(result);
                    cmbSqlServers.Items.AddRange(sqlServers);
                    if (cmbSqlServers.Items.Count > 0)
                    {
                        cmbSqlServers.Sorted = true;
                        cmbSqlServers.SelectedIndex = 0;
                    }
                    this.Cursor = Cursors.Default;
                    btnLoadSqlServers.Enabled = true;
                    txtUserName.Select();
                    txtUserName.Focus();
                    break;
                case CallFor.SqlDataBases:
                    string[] sqlDatabases = intlDelg.EndInvoke(result);
                    cmbAllDataBases.Items.AddRange(sqlDatabases);
                    if (cmbAllDataBases.Items.Count > 0)
                    {
                        cmbAllDataBases.Sorted = true;
                        cmbAllDataBases.SelectedIndex = 0;
                    }
                    this.Cursor = Cursors.Default;
                    btnGetAllDataBases.Enabled = true;
                    break;
                case CallFor.SqlTables:
                    reader = command.EndExecuteReader(result);
                    cmbTables.Items.Clear();
                    while (reader.Read())
                    {
                        cmbTables.Items.Add(reader[0].ToString());
                    }
                    if (cmbTables.Items.Count > 0)
                    {
                        cmbTables.Sorted = true;
                        cmbTables.SelectedIndex = 0;
                        grpDataManipulate.Enabled = true;
                    }
                    else
                    {
                        grpDataManipulate.Enabled = false;
                    }
                    break;
            }
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.ToString());
        }
        finally
        {
            if (called == CallFor.SqlTables)
            {
                btnGetAllTables.Enabled = true;
                this.Cursor = Cursors.Default;
            }
            prgProgress.Value = 0;
            prgProgress.Refresh();
            ticker.Stop();
        }
    }
}

Conclusion

This way, we can easily manipulate a DataGridView. The only this is we have to use the data source that is directly bound to the DataGridView. Async calling will be very efficient while loading huge data. Please let me know if you have any queries.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Symantec Services, Pune
India India
Dear Friends,
I'm from Pune and currently working with Symantec. I'm having 7+ yrs of software development experience and I'm working on .NET since 6+ years.
I'm a Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET.

Comments and Discussions

 
AnswerRe: Just 1 Question! Pin
jdkulkarni5-Jun-09 2:50
jdkulkarni5-Jun-09 2:50 
GeneralDatagrid Update,Insert,Delete,Cancel. Pin
somagunasekaran7-Sep-07 20:48
somagunasekaran7-Sep-07 20:48 
GeneralRe: Datagrid Update,Insert,Delete,Cancel. Pin
jdkulkarni9-Sep-07 21:57
jdkulkarni9-Sep-07 21:57 
Questionhow to load data in datagridview? Pin
lildiapaz13-Aug-07 16:23
lildiapaz13-Aug-07 16:23 
AnswerRe: how to load data in datagridview? Pin
jdkulkarni15-Aug-07 6:30
jdkulkarni15-Aug-07 6:30 
Generalupdating multiple tables with datagridview Pin
jayvaishnav8211-Jul-07 23:08
jayvaishnav8211-Jul-07 23:08 
Questiondatagridview save to excel format Pin
hithread13-Jun-07 16:32
hithread13-Jun-07 16:32 
AnswerRe: datagridview save to excel format Pin
jdkulkarni14-Jun-07 1:01
jdkulkarni14-Jun-07 1:01 
Check if this can help you.
The foloowing  Class takes a dataGridView and turn it into a recordset (adodb). It then formats the recordset before it exports it to excel. <br />
<br />
Eg:<br />
<br />
You will need to reference the Microsoft Excel Object Library in the project first. Then Add a bound dataGridview to a form and a command button. Then add the below Class "clsExcelReport" to the project.<br />
<br />
Name the datagrid "DataGridResults"<br />
<br />
Name the button btnExcelReport and the copy and paste the following Sub "btnExcelReport_Click"<br />
<br />
Private Sub btnExcelReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExcelReport.Click<br />
<br />
Dim clsExcelReport As New clsExcelReport<br />
<br />
Try<br />
<br />
clsExcelReport.openExcelReport(DataGridResults, False, True)<br />
<br />
Catch ex As Exception<br />
<br />
End Try<br />
<br />
End Sub<br />
<br />
'*************************************************************************************************<br />
<br />
Option Strict Off<br />
<br />
Public Class clsExcelReport<br />
<br />
Private Function CreateRecordsetFromDataGrid(ByVal DGV As DataGridView) As ADODB.Recordset<br />
<br />
Dim rs As New ADODB.Recordset<br />
<br />
'Create columns in ADODB.Recordset<br />
<br />
Dim FieldAttr As ADODB.FieldAttributeEnum<br />
<br />
FieldAttr = ADODB.FieldAttributeEnum.adFldIsNullable Or ADODB.FieldAttributeEnum.adFldIsNullable Or ADODB.FieldAttributeEnum.adFldUpdatable<br />
<br />
For Each iColumn As DataGridViewColumn In DGV.Columns<br />
<br />
'only add Visible columns<br />
<br />
If iColumn.Visible = True Then<br />
<br />
Dim FieldType As ADODB.DataTypeEnum<br />
<br />
'select dataType<br />
<br />
If iColumn.ValueType Is GetType(Boolean) Then<br />
<br />
FieldType = ADODB.DataTypeEnum.adBoolean<br />
<br />
ElseIf iColumn.ValueType Is GetType(Byte) Then<br />
<br />
FieldType = ADODB.DataTypeEnum.adTinyInt<br />
<br />
ElseIf iColumn.ValueType Is GetType(Int16) Then<br />
<br />
FieldType = ADODB.DataTypeEnum.adSmallInt<br />
<br />
ElseIf iColumn.ValueType Is GetType(Int32) Then<br />
<br />
FieldType = ADODB.DataTypeEnum.adInteger<br />
<br />
ElseIf iColumn.ValueType Is GetType(Int64) Then<br />
<br />
FieldType = ADODB.DataTypeEnum.adBigInt<br />
<br />
ElseIf iColumn.ValueType Is GetType(Single) Then<br />
<br />
FieldType = ADODB.DataTypeEnum.adSingle<br />
<br />
ElseIf iColumn.ValueType Is GetType(Double) Then<br />
<br />
FieldType = ADODB.DataTypeEnum.adDouble<br />
<br />
ElseIf iColumn.ValueType Is GetType(Decimal) Then<br />
<br />
FieldType = ADODB.DataTypeEnum.adCurrency<br />
<br />
ElseIf iColumn.ValueType Is GetType(DateTime) Then<br />
<br />
FieldType = ADODB.DataTypeEnum.adDBDate<br />
<br />
ElseIf iColumn.ValueType Is GetType(Char) Then<br />
<br />
FieldType = ADODB.DataTypeEnum.adChar<br />
<br />
ElseIf iColumn.ValueType Is GetType(String) Then<br />
<br />
FieldType = ADODB.DataTypeEnum.adVarWChar<br />
<br />
End If<br />
<br />
If FieldType = ADODB.DataTypeEnum.adVarWChar Then<br />
<br />
rs.Fields.Append(iColumn.Name, FieldType, 300)<br />
<br />
Else<br />
<br />
rs.Fields.Append(iColumn.Name, FieldType)<br />
<br />
End If<br />
<br />
rs.Fields(iColumn.Name).Attributes = FieldAttr<br />
<br />
End If<br />
<br />
Next<br />
<br />
'Opens the ADODB.Recordset<br />
<br />
rs.Open()<br />
<br />
'Inserts rows into the recordset<br />
<br />
For Each iRow As DataGridViewRow In DGV.Rows<br />
<br />
rs.AddNew()<br />
<br />
For Each iColumn As DataGridViewColumn In DGV.Columns<br />
<br />
'only add values for Visible columns<br />
<br />
If iColumn.Visible = True Then<br />
<br />
If iRow.Cells(iColumn.Name).Value.ToString = "" Then<br />
<br />
If (rs(iColumn.Name).Attributes And ADODB.FieldAttributeEnum.adFldIsNullable) <> 0 Then<br />
<br />
rs(iColumn.Name).Value = DBNull.Value<br />
<br />
End If<br />
<br />
Else<br />
<br />
rs(iColumn.Name).Value = iRow.Cells(iColumn.Name).Value<br />
<br />
End If<br />
<br />
End If<br />
<br />
Next<br />
<br />
Next<br />
<br />
'Moves to the first record in recordset<br />
<br />
If Not rs.BOF Then rs.MoveFirst()<br />
<br />
Return rs<br />
<br />
End Function<br />
<br />
Public Sub openExcelReport(ByRef DGV As DataGridView, _<br />
<br />
Optional ByVal bolSave As Boolean = False, _<br />
<br />
Optional ByVal bolOpen As Boolean = True)<br />
<br />
Dim xlApp As New Microsoft.Office.Interop.Excel.Application<br />
<br />
Dim xlBook As Microsoft.Office.Interop.Excel.Workbook<br />
<br />
Dim xlSheet As Microsoft.Office.Interop.Excel.Worksheet<br />
<br />
Dim rs As New ADODB.Recordset<br />
<br />
Dim xlrow As Integer<br />
<br />
Dim strColType() As String<br />
<br />
Try<br />
<br />
'opening connections to excel<br />
<br />
xlBook = xlApp.Workbooks.Add<br />
<br />
xlSheet = xlBook.Worksheets.Add()<br />
<br />
If bolOpen = True Then<br />
<br />
xlApp.Application.Visible = True<br />
<br />
End If<br />
<br />
xlrow = 1<br />
<br />
Try<br />
<br />
xlSheet.Columns.HorizontalAlignment = 2<br />
<br />
'formating the output of the report<br />
<br />
xlSheet.Columns.Font.Name = "Times New Roman"<br />
<br />
xlSheet.Rows.Item(xlrow).Font.Bold = 1<br />
<br />
xlSheet.Rows.Item(xlrow).Interior.ColorIndex = 15<br />
<br />
rs = CreateRecordsetFromDataGrid(DGV)<br />
<br />
If rs.State = 0 Then rs.Open()<br />
<br />
Catch<br />
<br />
GoTo PROC_EXIT<br />
<br />
End Try<br />
<br />
ReDim strColType(rs.Fields.Count)<br />
<br />
For j As Integer = 0 To rs.Fields.Count - 1<br />
<br />
xlSheet.Cells.Item(xlrow, j + 1) = rs.Fields.Item(j).Name<br />
<br />
xlSheet.Cells(xlrow, j + 1).BorderAround(1, ColorIndex:=16, Weight:=2)<br />
<br />
Next j<br />
<br />
'This does a simple test to see if the of excel held by the user is 2000 or later<br />
<br />
'This is needed because "CopyFromRecordset" only works with excel 2000 or later<br />
<br />
xlrow = 2<br />
<br />
If Val(Mid(xlApp.Version, 1, InStr(1, xlApp.Version, ".") - 1)) > 8 Then<br />
<br />
xlSheet.Range("A" & xlrow).CopyFromRecordset(rs)<br />
<br />
Else<br />
<br />
MessageBox.Show("You must use excel 2000 or above, opperation can not continue", "Excel Report", _<br />
<br />
MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)<br />
<br />
GoTo PROC_EXIT<br />
<br />
End If<br />
<br />
Dim strSearch As String = ""<br />
<br />
Dim strTemp As String = ""<br />
<br />
For j As Integer = 0 To rs.Fields.Count - 1<br />
<br />
'debug.Print(rs.Fields.Item(j).Name)<br />
<br />
'debug.Print(rs.Fields.Item(j).Type.ToString) 'finds out the format of the field<br />
<br />
If rs.Fields.Item(j).Type.ToString = "adBigInt" Then 'these if statements are used to select which format to use<br />
<br />
strSearch = "0;[Red]0"<br />
<br />
ElseIf rs.Fields.Item(j).Type.ToString = "adVarChar" Then<br />
<br />
strSearch = "@"<br />
<br />
ElseIf rs.Fields.Item(j).Type.ToString = "adDouble" Then 'type float/double<br />
<br />
strSearch = "0.00_ ;[Red]-0.00"<br />
<br />
ElseIf rs.Fields.Item(j).Type.ToString = "adCurrency" Then 'money<br />
<br />
strTemp = j & " " & strTemp 'used to keep track of currency for sum<br />
<br />
strSearch = "€#,##0.00;[Red]-€#,##0.00"<br />
<br />
ElseIf rs.Fields.Item(j).Type.ToString = "11" Then<br />
<br />
strSearch = "@"<br />
<br />
ElseIf rs.Fields.Item(j).Type.ToString = "adDBTimeStamp" Then 'type date/time<br />
<br />
If rs.Fields.Item(j).Name.Contains("Date") = True Then<br />
<br />
strSearch = "[$-1809]ddd, dd-mmm-yyyy;@"<br />
<br />
Else<br />
<br />
strSearch = "h:mm AM/PM"<br />
<br />
End If<br />
<br />
Else<br />
<br />
strSearch = "@"<br />
<br />
End If<br />
<br />
xlSheet.Columns(j + 1).NumberFormat = strSearch<br />
<br />
Next j<br />
<br />
If strTemp.Length > 0 Then<br />
<br />
Dim arrayStr() As String = Split(strTemp, " ")<br />
<br />
Dim X As Integer<br />
<br />
Dim lngLenght As Integer<br />
<br />
For i As Integer = UBound(arrayStr) To 0 Step -1<br />
<br />
'Asc (UCase$(Chr(KeyAscii)))<br />
<br />
lngLenght = InStr(1, strTemp, " ")<br />
<br />
If lngLenght > 0 Then<br />
<br />
X = CInt(Left(strTemp, lngLenght - 1))<br />
<br />
lngLenght = Len(strTemp) - lngLenght<br />
<br />
strTemp = Right(strTemp, lngLenght)<br />
<br />
End If<br />
<br />
'debug.Print X<br />
<br />
If X >= 26 Then<br />
<br />
X = X - 26<br />
<br />
arrayStr(i) = "A" & Chr(X + 65)<br />
<br />
Else<br />
<br />
arrayStr(i) = Chr(X + 65)<br />
<br />
End If<br />
<br />
'debug.Print arrayStr(i)<br />
<br />
xlSheet.Cells.Item(CInt(rs.RecordCount + 6), arrayStr(i)).Font.Bold = 1<br />
<br />
xlSheet.Cells.Item(CInt(rs.RecordCount + 6), arrayStr(i)) = "=SUM(" & _<br />
<br />
arrayStr(i) & xlrow & _<br />
<br />
":" & arrayStr(i) & CInt(rs.RecordCount + 4) & ")"<br />
<br />
Next i<br />
<br />
End If<br />
<br />
'some more formatting of the excel sheet. Thsi formats the way the<br />
<br />
'sheet looks in print preview<br />
<br />
xlSheet.PageSetup.LeftHeader = "&[Page]" & " of " & "&[Pages]"<br />
<br />
xlSheet.PageSetup.RightHeader = "&[Date]" & " &[Time]"<br />
<br />
xlSheet.PageSetup.HeaderMargin = 5<br />
<br />
xlSheet.PageSetup.BottomMargin = 5<br />
<br />
xlSheet.PageSetup.LeftMargin = 5<br />
<br />
xlSheet.PageSetup.RightMargin = 5<br />
<br />
xlSheet.PageSetup.TopMargin = 25<br />
<br />
xlSheet.Columns.AutoFit()<br />
<br />
xlSheet.Rows.AutoFit()<br />
<br />
xlApp.UserControl = True<br />
<br />
If bolOpen = False Then<br />
<br />
xlApp.DisplayAlerts = False<br />
<br />
xlBook.Close(True, Application.StartupPath & "\Excel\AVCDDUpdate.xls")<br />
<br />
xlApp.Application.Quit()<br />
<br />
ElseIf bolSave = True Then<br />
<br />
xlApp.DisplayAlerts = False<br />
<br />
xlBook.SaveAs(Application.StartupPath & "\Excel\AVCDDUpdate.xls")<br />
<br />
xlApp.DisplayAlerts = True<br />
<br />
End If<br />
<br />
Catch ex As Exception<br />
<br />
Call errLogger(ex)<br />
<br />
End Try<br />
<br />
PROC_EXIT:<br />
<br />
xlSheet = Nothing<br />
<br />
xlBook = Nothing<br />
<br />
xlApp = Nothing<br />
<br />
End Sub<br />
<br />
<br />
<br />
End Class


The link is
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=294490&SiteID=1[^]

Knowledge is power...
Questioncan u help me in gridview(edit,upadte,insert) with example Pin
crmanikandan19861-Jun-07 13:57
crmanikandan19861-Jun-07 13:57 
Generalautomatic display in grid Pin
anjulla17-May-07 2:34
anjulla17-May-07 2:34 
GeneralRe: automatic display in grid Pin
jdkulkarni17-May-07 2:45
jdkulkarni17-May-07 2:45 
GeneralRe: automatic display in grid Pin
anjulla17-May-07 3:01
anjulla17-May-07 3:01 
GeneralRe: automatic display in grid Pin
jdkulkarni17-May-07 4:31
jdkulkarni17-May-07 4:31 
GeneralRe: automatic display in grid Pin
anjulla17-May-07 3:05
anjulla17-May-07 3:05 
Generalthanks a lot for this work Pin
crmanikandan198623-Apr-07 7:24
crmanikandan198623-Apr-07 7:24 
GeneralRe: thanks a lot for this work Pin
jdkulkarni21-May-07 2:59
jdkulkarni21-May-07 2:59 
QuestionCan u help me? Pin
kyithar17-Apr-07 13:35
kyithar17-Apr-07 13:35 
AnswerRe: Can u help me? Pin
jdkulkarni18-Apr-07 3:04
jdkulkarni18-Apr-07 3:04 
GeneralRe: Can u help me? Pin
kyithar19-Apr-07 2:01
kyithar19-Apr-07 2:01 
GeneralRe: Can u help me? Pin
kyithar7-May-07 8:04
kyithar7-May-07 8:04 
GeneralRe: Can u help me? Pin
mcpoo7268-May-08 18:40
mcpoo7268-May-08 18:40 
GeneralRe: Can u help me? Pin
praveenkumar_mca6-Apr-09 21:12
praveenkumar_mca6-Apr-09 21:12 
Questionhow to calculate data in gridview Pin
danielwinata11-Apr-07 18:45
professionaldanielwinata11-Apr-07 18:45 
AnswerRe: how to calculate data in gridview Pin
jdkulkarni11-Apr-07 19:21
jdkulkarni11-Apr-07 19:21 
GeneralRe: how to calculate data in gridview Pin
danielwinata11-Apr-07 20:46
professionaldanielwinata11-Apr-07 20:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.