C# .NET - C# table - Asked By Srinivasan S on 22-Nov-11 07:23 AM

I want to show a table with rows and columns in a form. I want to drag,resize,merge that table. Want it in c# windows application.

Help me.
s j replied to Srinivasan S on 22-Nov-11 07:33 AM


You can use gridview and add columns and rows(data) a you like.

Try this.

Reena Jain replied to Srinivasan S on 22-Nov-11 07:40 AM

As samanath suggest you to use datagrid, I will also suggest for same. here you can perform multiple other operation also. I am providing you the code to bind the datagrid

    string query=null;
    query = "select * from Studies";
    SqlCeDataAdapter adp = new SqlCeDataAdapter(query, "Data Source=dbname;Persist Security Info=False;");
    DataTable dt = new DataTable();
if(dt.rows.count >0)
    dataGridViewStudies.DataSource = dt;

check how many rows dt is generating by debug the code

hope this will help you
Srinivasan S replied to Reena Jain on 22-Nov-11 08:00 AM
I dont want to use datatable,dataset and datagridview and all.

1. I just want to create a table with resizable rows and columns in a form using c#.

2. I want to merge the cells during runtime using c#.

Help me for this.....
Riley K replied to Srinivasan S on 22-Nov-11 08:01 AM

Since you want drag, drop resize features you have to use some Third party control

like OBOUT Grid, Radgrid from Telerik