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.
Why can i not see the beforecelledit method in vb.net?
That is the code from the c# demo and i want do something like that in vb.net but i can not see the beforecelledit method.
I have imported unvell.reogrid.actions? or is this in another dll file?
private void btnSetEditableRange_Click(object sender, EventArgs ee)
{
var editableRange = new ReoGridRange(3, 1, 2, 3);
grid.SetRangeBorder(editableRange, ReoGridBorderPos.Outline, ReoGridBorderStyle.SolidBlack);
grid[2, 1] = "Edit only be allowed in this range:";
grid.BeforeCellEdit += (s, e) => e.IsCancelled = !editableRange.Contains(e.Cell.GetPos()); (how would rewrite that line of code in vb.net?)
grid.FocusPos = editableRange.StartPos;
}
and also, How can i stop the control from scrolling with only 2 rows in it?
Thank you
Shane
Last edited by asparatu (2014-08-22 09:20:50)
Offline
You could use AddHandler in VB.NET:
Dim range As New ReoGridRange("A1:D3")
AddHandler grid.BeforeCellEdit, Sub(s, eventArgs) eventArgs.IsCancelled = Not range.Contains(eventArgs.Cell.GetPos())
For prevent scrolling, you could disable the scrolling behavior and hide scroll bars:
grid.DisableSettings(ReoGridSettings.Behavior_MouseWheelToScroll Or _
ReoGridSettings.View_ShowHorScroll Or ReoGridSettings.View_ShowVerScroll)
P.S. I noticed that Behavior_MouseWheelToScroll does not work, please wait the next version to fix this problem.
Last edited by Jingwood (2014-08-23 02:08:42)
Offline
ok, thank you again..
For the scroll bar or mouse scroll you can limit the space on the bottom of the grid just to be very last row and have no padding..
Shane
Offline