reverse the columns for arabic in data gridview

問題 reverse the columns for arabic in data gridview

  • 07 Maret 2012 3:58
     
     
    i am using a data gridview in vb.net web application....in gridview data is coming from the database.....i want to reverse the columns of gridview when the data is arabic.
    • Dipindahkan oleh Helen Zhou 09 Maret 2012 5:45 (From:Windows Forms Data Controls and Databinding)
    •  

Semua Balasan

  • 07 Maret 2012 17:35
     
      Memiliki Kode

    How are you binding your DGV as of now.

    Well, there is a example for changing the sequence of columns being displayed

    private void AdjustColumnOrder()
    {
        customersDataGridView.Columns["CustomerID"].Visible = false;
        customersDataGridView.Columns["ContactName"].DisplayIndex = 0;
        customersDataGridView.Columns["ContactTitle"].DisplayIndex = 1;
        customersDataGridView.Columns["City"].DisplayIndex = 2;
        customersDataGridView.Columns["Country"].DisplayIndex = 3;
        customersDataGridView.Columns["CompanyName"].DisplayIndex = 4;
    }
    


    Amit Govil | Email

    "Weeks of coding can save you hours of planning"

  • 08 Maret 2012 2:09
     
     

    Dear Amit,

    datagrid1.DataSource = dataset.Tables(0)
                datagrid1.DataBind()

  • 08 Maret 2012 16:53
     
     

    Sorry, i didn't noticed you are talking about DataGrid of ASP.Net and not DataGirdView as its a forum for Windows only.

    Check the link for your issue

    Although, for your issues related to asp.net go to ASP Forum .



    Amit Govil | Email

    "Weeks of coding can save you hours of planning"

  • 09 Maret 2012 5:44
     
     
    Hi kultuze,

    This is forum for Windows Forms issue, for ASP.NET questions, please post it on http://forums.asp.net/ . Thank you for your understanding.

    Regards,

    Helen Zhou [MSFT]
    MSDN Community Support | Feedback to us