GrapeCity Forums

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

Paste to multiple cells

Last post 01-26-2010, 5:08 PM by DeepakSharma. 1 replies.
Sort Posts: Previous Next
  •  01-26-2010, 9:51 AM 86864

    Paste to multiple cells

    Hi,

    We have need to paste a single data item ti multiple cells like excel does. I want to implement functionality of Pasting data from clipboard to cells being selected by hovering mouse on the spread for ASP.NET. I am not sure if this is already has been answered in these forums here.

    Thanks,

    Vinod

     

  •  01-26-2010, 5:08 PM 86870 in reply to 86864

    Re: Paste to multiple cells

    Hello,

    There is no any direct method or property available to paste a single value to multiple selected cells.You would need to write code for paste for every selected cell.I have written a server side code that might give you an idea about how to do so, you might need to write code on client side as clipboard is not accessible server side.

     Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

            Dim row, row2, col, col2 As Integer

            row = FpSpread1.ActiveSheetView.SelectionModel.AnchorRow

            row2 = FpSpread1.ActiveSheetView.SelectionModel.LeadRow

            col = FpSpread1.ActiveSheetView.SelectionModel.AnchorColumn

            col2 = FpSpread1.ActiveSheetView.SelectionModel.LeadColumn

            FpSpread1.ActiveSheetView.Cells(row, col, row2, col2).Text = Text

        End Sub 

     

     Thanks,

     


    Deepak Sharma
    GrapeCity FarPoint
View as RSS news feed in XML
     FarPoint Forums Home