Grid as Excel: Auto edit mode etc

14 posts, 0 answers
  1. Lovsten
    Lovsten avatar
    72 posts
    Member since:
    Aug 2007

    Posted 15 Oct 2007 Link to this post

    I'd like to use the grid like Excel.

    1. As soon as the user selects a datacell it goes into edit mode (not using F2 or key stroke to enter edit mode). Is this possible?
    2. When the user press Enter key, move to next datacell  (and go in to Edit mode of course)
    3. When in datacell and end of text and user press Right arrow key, move to next datacell  (and go in to Edit mode of course)
    4. When in datacell and beginning of text and the user press Left arrow key, move to previous datacell (and go in to Edit mode of course)

    Everything to get the grid to act as Excel.
  2. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 16 Oct 2007 Link to this post

    Hi Lovsten,

    Unfortunately, the RadGridView is designed to behave as much as possible in compliance with the standard Microsoft DataGridView. Currently there is no way to enforce it to act as the grid in Excel.

    It is possible only to implement the behavior of your first question using the CellClick event and the BeginEdit() method of the RadGridView. However we constantly extend the capabilities of our grid control and we'll have in mind such scenarios in the future releases.

    Greetings,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Lovsten
    Lovsten avatar
    72 posts
    Member since:
    Aug 2007

    Posted 16 Oct 2007 Link to this post

    Well Excel or MS DataGrid act pretty much the same. We were using MS Datagrid before moving to your control and there was no problem doing this i MS datagrid.

    CellClick is fine, but what if the user uses navigation keys to select cell.
  5. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 16 Oct 2007 Link to this post

    Hi Lovsten,

    We agree with you that MS DataGridVIew could also be set up in a manner that its default behavior is similar to the Excel's grid. However, the editors' logic and the API of our grid is still under development, and unfortunately, there are some glitches that interfere with your case.
     
    As to selecting with the navigation keys, CurrentRowChanged and CurrentCellChanged could be used. However this will not handle the Left/Right keys when the editor is opened.
     


    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Lovsten
    Lovsten avatar
    72 posts
    Member since:
    Aug 2007

    Posted 17 Oct 2007 Link to this post

    Are these glitches planned to be fixed in 2007 Q3 release?
  7. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 22 Oct 2007 Link to this post

    Hi Lovsten,

    We're constantly working on improving the RadGridView control and we hope it will be much improved in the next major release (Q3 2007).  However, the chances are slim to offer a spreadsheet control for Q3 2007.

     
    Regards,
    Rob
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. Dan
    Dan avatar
    6 posts
    Member since:
    Jul 2008

    Posted 16 Dec 2008 Link to this post

    Has any of this been addreses in the current release?
  9. Nick
    Admin
    Nick avatar
    767 posts

    Posted 18 Dec 2008 Link to this post

    Hello Dan,

    Thank you for your question.

    1. As soon as the user selects a datacell it goes into edit mode (not using F2 or key stroke to enter edit mode). Is this possible?

    If you click with the mouse, the cell enters edit mode. If you navigate up or down with the keyboard, the behavior depends on whether or not you have entered edit mode before initiating the action. It takes one more click to enter edit mode in the DataGridView control and if you are in edit mode you escape that mode when you navigate with the keyboard up and down keys.

    2. When the user press Enter key, move to next datacell  (and go in to Edit mode of course)

    Here the behavior is different from the DataGridView - pressing enter in the DataGridView moves you to the next row while in the RadGridView the cell just escapes the edit mode.

    3. When in datacell and end of text and user press Right arrow key, move to next datacell  (and go in to Edit mode of course)

    That works.

    4. When in datacell and beginning of text and the user press Left arrow key, move to previous datacell (and go in to Edit mode of course)

    Works too.

    Do not hesitate to write me back if you have more questions.

    Regards,
    Nick
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  10. Matt
    Matt avatar
    1 posts
    Member since:
    Mar 2009

    Posted 31 Mar 2009 Link to this post

    Hello:

    Are there any samples in the current release that demonstrate a excel-like keyboard editing mode for your ASP.NET grid, describing the events that need to configured for this to happen, as well as a button for a user to submit their changes to the server ( as a batch) when they are finished?

    At a minimum it would be good to know how to configure so that the user could click once to enter edit mode and then when the client-side editing has completed, a batch submit button that would send the updated data to the server using JSON.

    Thanks,
    Matt
  11. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 31 Mar 2009 Link to this post

    Hello Matt,

    I think that the sample project from the following code library thread can be a good starting point for you:

    http://www.telerik.com/community/code-library/aspnet-ajax/grid/excel-like-radgrid.aspx

    Best regards,
    Sebastian
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  12. MP
    MP avatar
    22 posts
    Member since:
    May 2009

    Posted 14 Oct 2009 Link to this post

    Dear Telerik,

    I am using the RadGridView control in one of my application and I like the current behaviour where 1st click just selects the cell and then the 2nd click puts the cell in Edit-Mode. However, there's a slight difference in the way it works from the MS Datagridview which causes the users to be confused (in the multi-select with cell-select mode).

    In the MS DataGridView, the cell is put in Edit Mode on mouse button up (release) instead of immediately on mouse button down. The advantage of this feature is the fact that I can still select a group of cells. In your current implementation, if a cell is already selected (highlighted), I cannot start the multi-select from within the same cell (as it immediately puts it in the edit mode).

    Is there a way to handle this scenario such that the cell only goes into edit mode when the user releases the mouse button? This will be a great help! and a nice feature on your great control.

    Regards,
    MP
  13. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 19 Oct 2009 Link to this post

    Hi MP,

    Thank you for your suggestion. We try to keep RadGridView behavior similar to MS DataGridView. So, we will consider your suggestion when planning our future releases. Unfortunately, it is not possible to change the behavior in the current version.

    I updated your Telerik points accordingly. Should you have any other questions, don't hesitate to contact us.

    Greetings,
    Jack
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  14. MP
    MP avatar
    22 posts
    Member since:
    May 2009

    Posted 19 Oct 2009 Link to this post

    Hi Jack,

    Thanks for the quick response. Yes, I would appreciate your bringing some of the easier to use features on the MS Datagrid especially on the multi-select cells. I have been getting this feedback from my user community a lot. They love all the new features on the grid. But would prefer to move back to the MS Datagrid control on screens that employ the multi-select cells functionality. Hope to see improvements on this area soon. Thanks. Let me know if you need any more details on this.

    Thanks,
    MP
  15. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 20 Oct 2009 Link to this post

    Hello MP,

    I found a way to suppress edit mode on mouse down. You have to inherit from RadGridView and override its OnMouseDown method. Here is the code:

    public class MyRadGridView : RadGridView
    {
        bool beginEdit;
        bool mouseIsDown;
        Point mouseDownPoint;
     
        public override string ThemeClassName
        {
            get { return typeof(RadGridView).FullName; }
            set {}
        }
     
     
        protected override void OnMouseDown(MouseEventArgs e)
        {
            mouseDownPoint = e.Location;
            mouseIsDown = true;
            base.OnMouseDown(e);
            mouseIsDown = false;
        }
     
        protected override void OnMouseUp(MouseEventArgs e)
        {
            if (e.Location == mouseDownPoint && beginEdit)
            {
                BeginEdit();
            }
            base.OnMouseUp(e);
            beginEdit = false;
        }
     
        public override bool BeginEdit()
        {
            if (mouseIsDown)
            {
                beginEdit = true;
                return false;
            }
            return base.BeginEdit();
        }
    }

    I hope it helps.

    Regards,
    Jack
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for WinForms is Visual Studio 2017 Ready