How ChildSheet access?

Posted by: ryl on 8 September 2017, 2:47 pm EST

  • Posted 8 September 2017, 2:47 pm EST

     Hi threr!

    I use  Spread for Windows Form framework 3.5

    Sheet databind 

     DataSet Relations add


    ds = new DataSet();  

    ds.Relations.Add("Full", ds.Tables["Table1"].Columns[Key], ds.Tables["Table2"].Columns[Key]);

    spread.Sheets[0].DataSource = ds;

     <img alt="" border="" hspace="" width="764" height="437" align="" title="undefined" src="">


    I hope cell Click Getvalue.

     But Childsheet cells not access (? view redbox)


      private void spread_CellClick(object sender, EventArgs e)


                textBox1.Text = spread.ActiveSheet.Cells[e.Row, e.Column].Text;                   



    How  VCODE, PCODE, PNAME column value Get, Set



  • Replied 8 September 2017, 2:47 pm EST


    When you expand a row in hierarchy, the new child view created is entirely a new SheetView. In the CellClick event, using the "View" property of the EventArgs e, you can get the view in which the cell is clicked, which would even return you the child views created on expanding the row. Once you get the view you can get the value of any cell clicked in that view. I have created a sample depicting the same, as soon as you click on any cell, its value gets added to the listbox contained in the form.

    Please have a look at the attached sample. Hope it will help you. Please let me know if you have any queries further.


    Manpreet Kaur.

  • Replied 8 September 2017, 2:47 pm EST

    Thanks very much!!

     very helpful 


    One question is more

     I want new child view properties change

    For example 

    spread.Sheets[0].OperationMode = FarPoint.Win.Spread.OperationMode.SingleSelect;

     like this child view properties change (I want parents view = SingleSelect and child view = SingleSelect)

     how to change?


    english does not improperly


  • Replied 8 September 2017, 2:47 pm EST


    To set the OperationMode you may first access the childsheet in ChildViewCreated event and then set the OperationMode for the same as desired.


     Private Sub FpSpread1_ChildViewCreated(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.ChildViewCreatedEventArgs) Handles FpSpread1.ChildViewCreated

            e.SheetView.OperationMode = FarPoint.Win.Spread.OperationMode.SingleSelect

     End Sub




Need extra support?

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

Learn More

Forum Channels