GrapeCity Forums

The GrapeCity Message Boards
Welcome to GrapeCity Forums Sign in | Join | Help
in Search

Not to append Data in cell while editing Data in Numeric column !

Last post 06-30-2009, 8:35 AM by kamlesh. 4 replies.
Sort Posts: Previous Next
  •  06-26-2009, 8:49 AM 79541

    Not to append Data in cell while editing Data in Numeric column !

    Hi ,

        When i am editing data in any cell it keeps appending Data it.I would like to restrict it.

         i need when ever i go to particular cell by arrow key and type some thing it should not append data in existing data.

       i have used

    FarPoint.Win.Spread.InputMap inputMap;

    inputMap = grdProductName.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused);

    inputMap.Put(new FarPoint.Win.Spread.Keystroke(Keys.F2, Keys.None), FarPoint.Win.Spread.SpreadActions.StartEditing);

    Though it is editing when i press F2 but i want this when ever i press 1-10 or any number  it should start edit.

     

    regards

    kamlesh


    kamlesh
  •  06-26-2009, 12:27 PM 79551 in reply to 79541

    Re: Not to append Data in cell while editing Data in Numeric column !

    Kamlesh,

    What is that you want to do? Do you want the cell to be non-editable.In case you want the cell/column to be non-editable or read only, then you can set the column/cell's Locked property to True.

    FpSpread1.ActiveSheet.Columns(1).Locked = True

    FpSpread1.ActiveSheet.Cells(1,1).Locked=True

    In case you want to start editing upon pressing the keys 1-10, you can map the NumPad0-NumPad9 in your above snippet. E.g.

            Dim im As New FarPoint.Win.Spread.InputMap
            im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused)
            im.Put(New FarPoint.Win.Spread.Keystroke(Keys.NumPad0, Keys.None), FarPoint.Win.Spread.SpreadActions.StartEditing)

    Thanks


    Suresh Singh Dasila
    GrapeCity FarPoint
  •  06-30-2009, 6:35 AM 79656 in reply to 79551

    Re: Not to append Data in cell while editing Data in Numeric column !

     

    Hi,

       I would like to not to append data on existing data in cell.

    i.e. if i have 123.00 in any cell and i would like to edit this cell value it keeps appending data on it if i will type 4 the cell value become 1234.00

    i want just 4.00.

    FarPoint.Win.Spread.SpreadActions.StartEditing is not working

     

    please suggest


    kamlesh
  •  06-30-2009, 7:17 AM 79658 in reply to 79656

    Re: Not to append Data in cell while editing Data in Numeric column !

    Hello,

    You can use FpSpread1.EditModeReplace = True to replace the data that is there in the cell already.

    Hope it helps.

     

    Regards,

     


    Deepak Sharma
    GrapeCity FarPoint
  •  06-30-2009, 8:35 AM 79663 in reply to 79658

    Re: Not to append Data in cell while editing Data in Numeric column !

    thanks,

    its working fine.

     

    regards

    kamlesh


    kamlesh
View as RSS news feed in XML
     FarPoint Forums Home