GrapeCity Forums

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

Not getting nonempty row count or cellvalue from the spread

Last post 07-04-2009, 4:24 AM by renjithnt999. 10 replies.
Sort Posts: Previous Next
  •  07-01-2009, 3:29 AM 79708

    Not getting nonempty row count or cellvalue from the spread

    Hi

    Actually am  new in farpoint spread for web . My requirement is to use the spread for web like the spread for windows application . That is i want to get the values one by one that is entered by user on the spread and save it in database.Direct binding is not needed. Am tried it by using the help. But no result . I can't able to access anything on the cell .  While accessing nonemptyrowcount  i am getting an  exception Please help me on this matter...

     

    with regards

    Renjith NT

  •  07-01-2009, 4:39 AM 79713 in reply to 79708

    Re: Not getting nonempty row count or cellvalue from the spread

    Hello Renjith, 

    You may use the NonEmptyRowCount property to get the number of non empty rows in the Spread. You may use following code to use it:

    MessageBox.Show(FpSpread1.ActiveSheetView.NonEmptyRowCount);

    Similarly, you may get the Text and Value of the cell using following code:

    FpSpread1.ActiveSheetView.Cells(RowIndex,ColIndex).Value 

    FpSpread1.ActiveSheetView.Cells(RowIndex,ColIndex).Text

    You may also use the GetText and GetValue methods

    FpSpread1.ActiveSheetView.GetValue(RowIndex,ColIndex) 

    FpSpread1.ActiveSheetView.GetText(RowIndex,ColIndex) 

    Regards, 


    Scott S.
    Product Manager, Spread ASP.NET
    GrapeCity FarPoint
  •  07-01-2009, 5:05 AM 79715 in reply to 79713

    Re: Not getting nonempty row count or cellvalue from the spread

    Harish actually this is working in spread for windows but not in spread for web.I am using c#.net am tried all these statements but no result . Either an exception or a null is the result
  •  07-01-2009, 10:23 AM 79733 in reply to 79715

    Re: Not getting nonempty row count or cellvalue from the spread

    Hello,

    The information  provided by Harish is correct even in case of Web Spread. Could you please let us know how are you using the same at your side or provide a zipped sample project which replicates the said issue at our side?

    Thanks


    Suresh Singh Dasila
    GrapeCity FarPoint
  •  07-02-2009, 2:37 AM 79761 in reply to 79733

    Re: Not getting nonempty row count or cellvalue from the spread

    Attachment: sample.rar

    Dear Suresh

    Thanks for your reply. But unfortunately it doesn't make any difference. I hereby attach the sample code along with this. Please go through the same and revert back with a solution at the earliest. An early response is much appreciated.

    Is there any configuration that i had to do on IIS while working with spread on web forms.

     

    Regards

    Renjith NT

  •  07-02-2009, 5:10 AM 79768 in reply to 79761

    Re: Not getting nonempty row count or cellvalue from the spread

    Hello Renjith, 

    Your sample application is working for me. I am able to get the text that I enter in FpSpread2 control. It seems that you're not clicking on the Update button of the Spread to commit the value/text in the cell.

    Just type the text in the cell and calling the GetText method will not fetch the CellText because it has not been commited to the Spread data model. If you want to automatically commit the values in the Cell, you may use the clientside event to call the EndEdit, UpdatePostbackData and then Update method of the spread. 

    Regards, 


    Scott S.
    Product Manager, Spread ASP.NET
    GrapeCity FarPoint
  •  07-02-2009, 7:06 AM 79776 in reply to 79768

    Re: Not getting nonempty row count or cellvalue from the spread

    Hello

    Thanks for your reply. I could retrieve the data now but not able to automate it. I am confuse how to call these Client side methods. Please guide me.

     

     

  •  07-02-2009, 3:07 PM 79805 in reply to 79776

    Re: Not getting nonempty row count or cellvalue from the spread

    Hello,

    What is that you want to automate? Below is the client side code to get cell value from ActiveRow and ActiveColumn:

    <script language="javascript">

      function getactval() {

      var ret FpSpread1.GetValue(FpSpread1.ActiveRow, FpSpread1.ActiveCol);

      }

    </script>

    Thanks


    Suresh Singh Dasila
    GrapeCity FarPoint
  •  07-03-2009, 1:04 AM 79811 in reply to 79805

    Re: Not getting nonempty row count or cellvalue from the spread

    Hello,

    By automate what I mean is that 

    A user enters some values in the spread and instead of clicking the update button of the component, the user clicks a button (ASP.net button) and the values in the spread should be retrieved. Previously Mr.Harish replied to use the clientside event to call the EndEdit, UpdatePostbackData and then Update method of the spread. Since I am confused to use which clientside events to be used, I kindly request you to guide me through the Code to accomplish this task.

    regards

    Renjith.N.T 

     

     

  •  07-03-2009, 11:17 AM 79829 in reply to 79811

    Re: Not getting nonempty row count or cellvalue from the spread

    Hello,

    If you want to save changes made client side to the Spread on the server by clicking an ASP button outside of the Spread, then you can call the SaveChanges method of the Spread as the first line of code in the ButtonClick event server side. Then, you can query all the updated values in the Spread server side using the GetValue method of the ActiveSheetView object.


    Scott S.
    Product Manager, Spread ASP.NET
    GrapeCity FarPoint
  •  07-04-2009, 4:24 AM 79844 in reply to 79829

    Re: Not getting nonempty row count or cellvalue from the spread

    Thanks for the reply .Its working for me ,
View as RSS news feed in XML
     FarPoint Forums Home