Flexgrid no drag and drop animation?

Posted by: jacobturley on 21 December 2017, 4:55 pm EST

    • Post Options:
    • Link

    Posted 21 December 2017, 4:55 pm EST

    Hey! So right now I have drag and drop working, but I can’t seem to get there to be any sort of effect… I have tried and tried but nothing is working. I can’t even get the DraggingColumn event to work with simple code

           c1FlexGrid1.DraggingColumn += C1FlexGrid1_DraggingColumn;
    
                //MessageBox.Show("Load complete");
            }
    
            private void C1FlexGrid1_DraggingColumn(object sender, DragRowColEventArgs e)
            {
                MessageBox.Show("column being dragged");
            }
    

    When I drag the column the event never gets triggered… any ideas?

  • Posted 22 December 2017, 5:29 am EST

    Hi!

    I created a small sample using your code with the latest build version 4.0.20173.286, in Windows 10 + VS 2015 environment. It works fine at my end.

    Attached is the video and the sample demonstrating the same. Kindly check with the mentioned build once.

    Prj_DragDrop.zip

    Best,

    Meenakshi

  • Posted 22 December 2017, 12:55 pm EST

    I get this error now (Looks like if you have a before mouse down event handler on the grid it overrides it?

    ************* Exception Text **************

    System.NullReferenceException: Object reference not set to an instance of an object.

    at #Iqb.#Ttb.#1Vv(Rectangle #zA, Control #A0b)

    at #s5.#Ojb.#Ejb(MouseEventArgs #tQ, Boolean #G1)

    at #s5.#Ojb.#ijb(MouseEventArgs #tQ)

    at #s5.#Ojb.#8ib(MouseEventArgs #tQ)

    at C1.Win.C1FlexGrid.C1FlexGridBase.OnMouseMove(MouseEventArgs e)

    at System.Windows.Forms.Control.WmMouseMove(Message& m)

    at System.Windows.Forms.Control.WndProc(Message& m)

    at C1.Win.C1FlexGrid.Util.BaseControls.ScrollableControl.WndProc(Message& m)

    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    AS you can see, it isn’t even hitting my program (lookupnet)…

    I noticed that the flexgrid build is a little behind, is there a place I can download the latest?

    C1.Win.C1FlexGrid.4

    Assembly Version: 4.0.20173.282

    Win32 Version: 4.0.20173.282

  • Posted 22 December 2017, 12:56 pm EST

    Just for reference, I removed the before mouse down event and that error is what I got. With the before mouse down event I did not receive an error.

  • Posted 26 December 2017, 4:33 am EST

    Here is the link to download our latest builds for WinForms:

    http://prerelease.componentone.com/dotnet40/c1winforms/2017-t3/C1WinForms.4_4.0.20173.286.zip

    > Just for reference, I removed the before mouse down event and that error is what I got. With the before mouse down event I did not receive an error.

    • I could not see any such problem at my end. Please check with the 286 build and let me know if you still get the exception. And, in that case, I would request you to share a stripped-down sample reproducing the issue.

    Regards,

    Meenakshi

  • Posted 2 January 2018, 7:02 pm EST

    Okay I have some more information!

    So to give you a little background to what is going on, the project we are doing actually creates a .dll file, that another application can then execute. Basically, the TopLevelControl object on c1flexgrid is null. There’s not really a way to get around this from what I know, because if I do settoplevel(true) then the other application fails because the dll class just took over control essentially… Any ideas? Basically its a windows form application that is inside a dll.

  • Posted 2 January 2018, 7:02 pm EST

    Okay I have some more information!

    So to give you a little background to what is going on, the project we are doing actually creates a .dll file, that another application can then execute. Basically, the TopLevelControl object on c1flexgrid is null. There’s not really a way to get around this from what I know, because if I do settoplevel(true) then the other application fails because the dll class just took over control essentially… Any ideas? Basically its a windows form application that is inside a dll.

  • Posted 3 January 2018, 7:38 am EST

    Hi!

    Thanks but is it possible for you to share your stripped-down sample as requested earlier, so that I can reproduce the exception, investigate this further and report this to the concerned team (if needed)?

    Also, kindly let me know the observations when you run your application with our latest build (4.0.20173.286).

    Best regards,

    Meenakshi

  • Posted 3 January 2018, 1:24 pm EST

    Unfortunately I cannot supply a stripped down sample, as it is reliant on you having a COBOL runtime environment to be able to run on. Basically what it comes down to is this: The way COBOL creates screens for whatever reason is passing a null for the top level control, and there is no way for us to get around it(I am reaching out to our cobol runtime provider as well). When that top level control field is null, c1flexgrid errors out on doing the drag + drop. I’m just at a loss.

  • Posted 4 January 2018, 6:00 am EST

    Since TopLevelCotrol of the grid becomes null in your situation, it seems that it does not allow the grid control to be initialized. And as a result, this null reference exception is thrown.

    Cause of this issue does not appear to be related to control actually. And, we would suggest you to get in touch with your cobol runtime provider.

    Best regards,

    Meenakshi

  • Posted 4 January 2018, 10:45 am EST

    I resolved this by essentially making my own drag and drop animation. Don’t know why you guys need that top level control for the drag + drop, but oh well. Thank you for your help!

  • Posted 4 January 2018, 10:45 am EST

    I resolved this by essentially making my own drag and drop animation. Don’t know why you guys need that top level control for the drag + drop, but oh well. Thank you for your help!

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels