You are not logged in.
This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.
Pages: 1
Topic closed
I've seen a post about referencing other sheets, is it possible in the latest version?
Example:
Dim sheet1, sheet2 As Worksheet
sheet1 = Me.ReoGrid1.Worksheets(0)
sheet2 = Me.ReoGrid1.Worksheets(1)
sheet1("A1") = 5
sheet2("B2") = "=Sheet1!A1"
(As I've seen in older post, but same to what I'm asking)
EDIT: sorry if my questions are quite noob, I'm new to this sorry.
grid.SetSettings(WorksheetSettings.Edit_AutoFormatCell, false);
why is it getting me 2 errors "Error 1 The best overloaded method match for 'unvell.ReoGrid.ReoGridControl.SetSettings(unvell.ReoGrid.WorkbookSettings, bool)' has some invalid arguments, and Argument 1: cannot convert from 'unvell.ReoGrid.WorksheetSettings' to 'unvell.ReoGrid.WorkbookSettings'
thanks sorry again if my questions are noobish
Last edited by cloud168 (2015-09-03 22:19:35)
Offline
Hi welcome! Multiple worksheet references now under development and will be available soon, within 2-3 days.
grid.SetSettings(WorksheetSettings.Edit_AutoFormatCell, false);
Is this code copied from somewhere? It may be a document mistake.
Please try this code:
var sheet = grid.CurrentWorksheet;
sheet.SetSettings(WorksheetSettings.Edit_AutoFormatCell, false);
Last edited by Jingwood (2015-09-04 11:42:24)
Offline
thanks for the reply sir Jing! Finally got the settings working, which brings me to another question,
1. how can I make a cell accept a user-typed value, and when I click save, it will save to the file? used worksheet.Save and worksheet.SaveRGF didn't worked, it just saved a blank rgf document, thank you for understanding my noob questions
(I used it on a button, to save the file)
2. the borders are basically gone, and it doesn't look like a spreadsheet when I opened the 'saved rgf file' from c#, what setting did I miss sir?
again sorry for these noob questions
edit:
3. and lastly, how to make my spreadsheet not docked? I mean, if I don't have Dock = DockStyle.Fill, code inside var grid = new unvell.ReoGrid.ReoGridControl() I can't see the spreadsheet, sorry for these noob questions sir
Last edited by cloud168 (2015-09-04 23:14:31)
Offline
bump
Offline
What's the meaning of 'worksheet.Save and worksheet.SaveRGF didn't worked'? Did you get any error messages? Post your code will be helpful.
Last edited by Jingwood (2015-09-07 02:05:24)
Offline
when I use it, it just saves a blank rgf file, like when I view it on reogrid editor, it is blank, it doesn't accept the user-typed data on the cell on runtime, how can it accept a user-typed data on a cell when ran sir?
(edit: btw this code is used on a button sir)
var grid = new unvell.ReoGrid.ReoGridControl();
var worksheet = grid.CurrentWorksheet;
worksheet.Save("C:\\Users\\Dave\\Desktop\\test6.rgf");
MessageBox.Show("Saved!", "Alert");
path is good, double checked, so what seems to be the problem sir?
and lastly, how to make the spreadsheet not docked sir? when I remove the
Dock = DockStyle.Fill,
the spreadsheet doesn't show up on the form, sorry for these questions sir and for troubling you,
I hope you can answer these questions sir!
Last edited by cloud168 (2015-09-07 05:08:27)
Offline
I tested your code and everything works as expected. Why there is only columns A-G on your picture, it must be A-CV, more columns exist by default, there must be others code that changes the column count?
For dock, you should give a size property for the control if it was not docked.
var f = new Form()
{
Bounds = new Rectangle(100, 100, 640, 480),
};
var grid = new unvell.ReoGrid.ReoGridControl()
{
Bounds = new Rectangle(10, 10, 400, 300),
};
f.Controls.Add(grid);
f.Show();
Or, follow on this article to add a toolbox shortcut, that allows you create the control on form by dragging mouse, it is more like a normal windows control.
https://reogrid.net/document/installation/
Offline
I set the rows and columns sir, that's why it's only A-G, so umm, why is mine not accepting user-typed entries when I run the program even when worksheet.Save is used.. can I see
what codes you used sir? are there any codes to accept user-typed entries per cell on runtime? I hope you can help me, that's my only problem sir, I'm sorry for troubling you
(edit: thank you for testing the codes, the code you gave for undocking the spreadsheet works, only problem now is how the cell will accept user-typed entries on runtime sir )
Last edited by cloud168 (2015-09-07 11:12:44)
Offline
Please send me your whole project and let me check your problem. Mail: jing at reogrid.net. Thanks.
Offline
I sent it sir, sorry for troubling you
Offline
OK thanks for the mail.
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
Offline
umm, sorry for troubling you again, I did put the code in the //save part, but when I click the button, here's what happening sir, what seems to be the problem sorry I can't troubleshoot that good
edit: thanks for helping me sir!
edit2: and if you can see the grid part, it has a green line
Last edited by cloud168 (2015-09-08 13:53:02)
Offline
Please change your code at line 32, from:
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.
Offline
Sir I'm sorry for troubling again, but I did the code you gave me, and when I save it on runtime, it still doesn't show when I open it via reogrideditor.exe I don't know why
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
Last edited by cloud168 (2015-09-09 17:55:53)
Offline
I don't see any problems from your picture, please send me your whole project.
Last edited by Jingwood (2015-09-11 07:29:02)
Offline
sent sir, please help
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
Last edited by cloud168 (2015-09-11 15:33:01)
Offline
Please comment out the code at line 40 and retry.
//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.
Offline
hello sir, sorry just got online now to do some things in the past few days, umm, the way it works is, if you create a file via reogrideditor, write something in it, then load it in runtime via worksheet.Load,
then the data you typed in reogrideditor will show up right? then I type on runtime in a cell, then click the button with worksheet.Save function, it will save it into the rgf file yes? then if you open in reogrideditor again, it should
load all data typed in before loading it on runtime, and during runtime, right? that's how I check if it saves, but sadly it doesn't sir. Please explain sir, is that how it works? or I'm mistaken?
sorry If I'm troubling you again sir, this is my only hope in finishing this project
I hope you can help me again
Offline
If you only say 'it doesn't work', I couldn't help you. Please debug your code step by step, let me know where and what code doesn't work, and how it doesn't work.
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.
Last edited by Jingwood (2015-09-26 00:18:41)
Offline
sir sorry for the very late reply, here's what I was doing in order to check if it was saving
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
Last edited by cloud168 (2015-10-06 07:44:08)
Offline
There is no special code needed for the case you mentioned. Just using worksheet.Load and worksheet.Save should be fine. Please make sure that you're using same version between ReoGridEditor and ReoGrid component, and the latest version is recommended.
Offline
OMG. does it have to be same version? where can I download the 0.9.0.0. reogrideditor? I was using the one with the 0.8.5. I think OMG OMG, I think that has to be the problem?
Offline
cloud168,
1. Go to https://reogrid.net/download/
2. Download ReoGrid-0.9.0.0-Beta-Build.zip
3. In the package find "ReoGrid-0.9.0.0-Beta-Editor-Source.zip"
4. Unpack it and build into Visual Studio 2013
5. And you have Reogrid Editor 0.9.0.0
;-)
My English is perfect! (My version of the English language ;-) )
Offline
Pages: 1
Topic closed