1. I'm creating a file in reogrideditor and placing a data/letter in a cell (example, in cell A1 I put the word "test")
2. I'm loading it in runtime via worksheet.Load
3. When I load it, the word "test" that I wrote on reogrideditor is seen on cell A1, I write another word for checking if it was saving, I write "test2" on cell A2.
4. I save the worksheet by clickin a button with worksheet.Save
5. I open the rgf file via reogrideditor, and sadly, the whole sheet was clean like the picture I've shown in my post I've posted above. Edit: The word "test" and "test2" I've written in reogrideditor and via runtime was gone.
My question is, is there a special code for it to work like that sir? sorry for troubling you, or can you create a code that can answer my problem in my step by step problem in this post?
I hope you can help me sir thanks
In previous posts I could see that you have created your template file (rgf file), if you send me your whole solution, please send this template file together.
]]>//worksheet.Load("C:\\Users\\Dave\\Desktop\\test7.rgf");
Since I haven't this file, I commented out it and everything works fine.
ReoGrid works without problems and you should check your code firstly, rather than post in here.
It is hard to help you without your environment.
In addition,
var worksheet = grid.CurrentWorksheet;
var sheet = grid.CurrentWorksheet;
These code does work but should just one.
]]>edit: here's what I was doing to check if it was saving the work, basically, when I run it, on visual studio, I type on the cell then click save, then I check that file on reogrideditor if the typed word
will show, unfortunately sir, it doesn't show
I sent again my project for you to see, I typed "test" in one of the cells in runtime but still, it doesn't show the word "test" when I view it on reogrideditor, please help me sir
I hope you're not getting tired with me sir
edit: and sir, this is the file that was saved, no default lines so many things going on, so sorry for troubling you sir, I hope you can help me
]]>var grid = new unvell.ReoGrid.ReoGridControl();
to
grid = new unvell.ReoGrid.ReoGridControl();
See my code above. Green line is normal, it comes from your Windows theme color.
]]>edit: thanks for helping me sir!
edit2: and if you can see the grid part, it has a green line
Every time you saved the worksheet you created actually a new instance of control, that's why you couldn't save any changes from end-user.
The instance displayed on the form is not the instance of you saved. You should keep an instance as form member.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private ReoGridControl grid;
private void Form1_Load(object sender, EventArgs e)
{
grid = new unvell.ReoGrid.ReoGridControl()
{
// put to fill the parent control
Dock = DockStyle.Fill,
};
this.Controls.Add(grid);
}
private void button2_Click(object sender, EventArgs e)
{
// save
var worksheet = grid.CurrentWorksheet;
worksheet.Save("C:\\Users\\Dave\\Desktop\\test6.rgf");
}
}
Good Luck
]]>