• Advertisement
Sign in to follow this  

[.net] Spreadsheet component?

This topic is 4333 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a spreadsheet component that could act much like excel? I've been fooling around with the DataGrid component but I haven't figured out how to manipulate it. All I need is something that looks like this [x] [y] [position] [centre] [scale] [..] and am able to manipulate the data inside.

Share this post


Link to post
Share on other sites
Advertisement
Here's the question I have with that, if I do use an excel control does the user have to have excel loaded to use it?

Share this post


Link to post
Share on other sites
I tried adding an excel component to the application and it couldn't find some of the DLLS (which resulted in me spending half an hour fixing the references after I deleted them all).

Is there anyway to just use DataGrid in this case?

Share this post


Link to post
Share on other sites
How are you using the data grid?

You need to add a Table to it. You can do this like so:

C# 1.1 (Similar to .net 2.0 though)

private void Form1_Load(object sender, System.EventArgs e)
{
dataGrid1.RowHeadersVisible = true;

DataSet ds = new DataSet();
ds.Tables.Add("RSS Content");
ds.Tables["RSS Content"].Columns.Add("Foo");
ds.Tables["RSS Content"].Columns.Add("Bar");

object[] o = {"Hello","world!"};
ds.Tables["RSS Content"].Rows.Add(o);

dataGrid1.DataSource = ds.Tables["RSS Content"].DefaultView;
dataGrid1.Expand(0);
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement