Grid question


I am trying to create a grid based on the attach file but I am not able to merge the columns 6 to 9 the way it is shown.

Can anyone please help me with this? I am using html tags in C# class

I am attaching the excel file on how my grid should look like.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Deepak LakkadCommented:

I think you cannot get this result in Simple GridView, you have to use Repeater control for that

- Deepak Lakkad
ram1217Author Commented:
Can you provide me a sample of code on how this can be done based on the file attached?
Deepak LakkadCommented:
Ok, I will work on it and try to solve your problem

- Deepak Lakkad
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

SAMIR BHOGAYTAFreelancer and IT ConsultantCommented:
hi.. you can do this with this example

I have created ASP.NET page which is very straight forward with only one Button and GridView control on it. Following is the HTML source for the (.aspx) file.

<form id="form1" runat="server">
   <asp:button id="Button1" runat="server" onclick="Button1_Click" text="Display Excel Data" />
   <asp:gridview id="GridView1" runat="server" cellpadding="6" gridlines="None"
        bordercolor="#336699" borderstyle="Solid" borderwidth="1px">
        <headerstyle backcolor="#336699" font-bold="True" forecolor="White" />

In the C# code of the button Click event I will connect and read Excel file and then I will bind the data to GridView control. To connect Excel file you need to use Microsoft Jet OLEDB data provider as you can see from the following connection string. The path of the excel file is provided by using ASP.NET DataDirectory feature which points to the App_Data folder in your Website.

string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|SearchEngines.xls;Extended Properties='Excel 8.0;HDR=Yes;'";

string query = "SELECT * FROM [Sheet1$]";

DataSet excelDataSet = new DataSet();
OleDbDataAdapter da = new OleDbDataAdapter(query, strConn);


GridView1.DataSource = excelDataSet;

I hope this will help many of you specially.
ram1217Author Commented:
Thank you for the code above but I cannot implement this way of adding a button since that is not part of requirement.

Any other way to do this? I need to get this done asap, any help would be great.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ram1217Author Commented:
Thank you johny_bravo1, the links you sent me worked amazing.

I was able to create the grid and everything looks fine.

Thank you very much for your help!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.