C# ASPXGRIDVIEW GET TOTAL SUMMARY

protected void Buttonhepsiniode_Click(object sender, EventArgs e)
{

    //for (int i = 0; i < ASPxGridView2.VisibleRowCount; i++)
    //{
    //    var items = ASPxGridView2.GetRowValues(i, new string[] { "FISNO", "TL_BORC" }) as object[];
    //    // ASPxListBox1.Items.Add(rowValues[0].ToString());
    //    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["CarringtonWebConnectionString1"].ConnectionString);
    //    con.Open();
    //    SqlCommand cmd = new SqlCommand("update ACIKHESAP set ODEME_DURUMU=2, ODENEN_TUTAR=" + items[1].ToString() + " where ID=" + items[0].ToString(), con);
    //    cmd.ExecuteNonQuery();
    //    Labeltesekkurler.Visible = true;
    //}
    Decimal SMTUTAR = Convert.ToDecimal(ASPxGridView2.GetTotalSummaryValue(ASPxGridView2.TotalSummary["TL_BORC"]));
    Global.TUTAR = null;
    Global.TUTAR = SMTUTAR.ToString();
    Server.Transfer("payment.aspx");
}

C# DEVEXPRESS ASPXGRIDVIEW SELECTED ROWS TOTAL

protected void Button1_Click(object sender, EventArgs e)
{
    //List SelectedDebts = grid.GetSelectedFieldValues(new string[] { "FISNO", "TL_BORC" });
    //foreach (object debts in SelectedDebts)
    //{
    //    IList items = debts as IList;
    //    if (items == null) return;
    //    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["CarringtonWebConnectionString1"].ConnectionString);
    //    con.Open();
    //    SqlCommand cmd = new SqlCommand("update ACIKHESAP set ODEME_DURUMU=1, ODENEN_TUTAR=" + items[1].ToString() + " where ID=" + items[0].ToString(), con);
    //    cmd.ExecuteNonQuery();
    //    Labeltesekkurler.Visible = true;
    //}


    //List SelectedDebts = grid.GetSelectedFieldValues(new string[] { "FISNO", "TL_BORC" });
    Decimal selectedTUTAR = 0;
    foreach (object value in ASPxGridView2.GetSelectedFieldValues("TL_BORC"))
    {
        {
            selectedTUTAR += Convert.ToDecimal(value);
        }

    }

    Global.TUTAR = null;
    Global.TUTAR = selectedTUTAR.ToString();
    Server.Transfer("payment.aspx");

}

Devexpress gridview export to excel with savefiledialog

            string filename;
            saveFileDialog1.Filter = "xlsx files (*.xlsx)|*.xlsx";
            saveFileDialog1.FilterIndex = 2;
            saveFileDialog1.RestoreDirectory = true;
            saveFileDialog1.ShowDialog();
            filename = saveFileDialog1.FileName;
            if (filename == "") filename = "";
            else
            {
                gridView1.ExportToXlsx(filename);
                System.Diagnostics.Process.Start(filename);
            }

VISUAL STUDIO 2013 VISUAL BASIC GRIDE EXCELDEN YAPIŞTIR

VISUAL STUDIO 2013 VISUAL BASIC GRIDE EXCELDEN YAPIŞTIR

ONCE BU FONKSIYONU EKLE;
———————-
Sub pastefromclipboardtodatagridview(ByVal dgv As DataGridView)
        Dim rowSplitter As Char() = {vbCr, vbLf}
        Dim columnSplitter As Char() = {vbTab}

        ‘get the text from clipboard

        Dim dataInClipboard As IDataObject = Clipboard.GetDataObject()
        Dim stringInClipboard As String = CStr(dataInClipboard.GetData(DataFormats.Text))

        ‘split it into lines
        Dim rowsInClipboard As String() = stringInClipboard.Split(rowSplitter, StringSplitOptions.RemoveEmptyEntries)

        ‘get the row and column of selected cell in grid
        Dim r As Integer = dgv.SelectedCells(0).RowIndex
        Dim c As Integer = dgv.SelectedCells(0).ColumnIndex

        ‘add rows into grid to fit clipboard lines
        If (dgv.Rows.Count < (r + rowsInClipboard.Length)) Then
            dgv.Rows.Add(r + rowsInClipboard.Length – dgv.Rows.Count)
        End If

        ‘ loop through the lines, split them into cells and place the values in the corresponding cell.
        Dim iRow As Integer = 0
        While iRow < rowsInClipboard.Length
            ‘split row into cell values
            Dim valuesInRow As String() = rowsInClipboard(iRow).Split(columnSplitter)
            ‘cycle through cell values
            Dim iCol As Integer = 0
            While iCol < valuesInRow.Length
                ‘assign cell value, only if it within columns of the grid
                If (dgv.ColumnCount – 1 >= c + iCol) Then
                    dgv.Rows(r + iRow).Cells(c + iCol).Value = valuesInRow(iCol)
                End If
                iCol += 1
            End While
            iRow += 1
        End While

    End Sub

—————

1 ADET DATAGRIDVIEW YARAT
1 ADET BUTTON YARAT
CİFT TIKLA BUTTONA
KOD:
        DataGridView1.AllowUserToAddRows = False
        DataGridView1.Rows.Add()
        pastefromclipboardtodatagridview(DataGridView1)
        DataGridView1.AllowUserToAddRows = False
        DataGridView1.Rows.Add()
        pastefromclipboardtodatagridview(DataGridView1)