Skip to main content
gamedev.net
🔒 Locked

[.net] Spreadsheet component?

Started by PumpkinPieman 3 replies 650+ views
Original Post
PumpkinPieman
PumpkinPieman
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.
PumpkinPieman
PumpkinPieman
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?
Krisc
Krisc
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);}

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.