ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

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.

https://github.com/unvell/ReoGrid/issues

#1 2016-01-07 04:52:30

williamlee1982
Member
Registered: 2016-01-06
Posts: 8

ReoGridControl on UserControl

Hi Jing,
I am making a UserControl witch combines ReoGridControl and some other standard .net controls,
and then use it in a custom dropdown. The problem is, after click the dropdown button, the usercontrol
show up and automatically hide immediately. even i try to put only the ReoGridControl on the user
control without any other control and logic, the same thing happened. but if i use standard control for
Dropdown.DropdownControl instead of user control, it works fine.
So please kindly check if there is bug or just I missed something.
thank you.

Last edited by williamlee1982 (2016-01-07 08:34:15)

Offline

#2 2016-01-07 09:23:01

williamlee1982
Member
Registered: 2016-01-06
Posts: 8

Re: ReoGridControl on UserControl

williamlee1982 wrote:

Hi Jing,
I am making a UserControl witch combines ReoGridControl and some other standard .net controls,
and then use it in a custom dropdown. The problem is, after click the dropdown button, the usercontrol
show up and automatically hide immediately. even i try to put only the ReoGridControl on the user
control without any other control and logic, the same thing happened. but if i use standard control for
Dropdown.DropdownControl instead of user control, it works fine.
So please kindly check if there is bug or just I missed something.
thank you.

seems like I need to override the OnDropdownControlLostFocus(),
after avoid calling base.OnDropdownControlLostFocus(), it works.

Offline

#3 2016-01-07 12:17:40

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: ReoGridControl on UserControl

Hi, I can confirm that problem you mentioned, it looks like a default user control doesn't get focus when it shown on screen, ReoGrid assumes the user control lost focus and close the drop-down panel automatically.

Thanks for the information, overriding the method OnDropdownControlLostFocus could be a solution for now, or you could force to make user control getting focus when the drop-down panel is opened.

Edit: this solution doesn't help, we will fix this problem in next release.

class MyDropdownCell : DropdownCell
{
  public MyDropdownCell()
  {
    DropdownControl = new MyUserControl();
  }

  public override void PushDown()
  {
    base.PushDown();

    ((MyUserControl)DropdownControl).Focus();
  }
}

class MyUserControl : UserControl { }

I will check this problem for a solution that doesn't need to get focus explicitly, and push to release it in next version.

Last edited by Jingwood (2016-01-08 12:54:56)

Offline

#4 2016-01-08 12:53:32

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: ReoGridControl on UserControl

Because current implementation checks the focus to close drop-down panel, this is not a good implementation and we decide to rewrite this part and fix this problem in next release. Also, the solution in previous reply doesn't work for solving this problem.

Offline

#5 2016-01-19 02:06:59

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: ReoGridControl on UserControl

This problem has been fixed in release 1.0. https://reogrid.net/change-log

Offline

#6 2016-01-22 10:05:20

prag001
Member
Registered: 2015-10-01
Posts: 3

Re: ReoGridControl on UserControl

Hi Jing,
i'm not able to navigate that... from where, i should start a new thread of issues i am facing, that's why posting here.
Really sorry for that.
Actually i want to use ReoGridControl in my web user control on (on .ascx).Please advise is it possible to do. If yes, then how is it possible.
Thanks in advance.
prag001

Offline

#7 2016-01-23 02:42:46

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: ReoGridControl on UserControl

If you mean showing a spreadsheet on web, unfortunately that ReoGrid can't help you because it was designed work in Windows Form and WPF; If you mean generating Excel to download or reading Excel from upload in code behind of a web page then you may use the Memory workbook feature. See: https://reogrid.net/document/memory-workbook

Offline

Board footer

Powered by FluxBB