Visible Row Count

I wish to have paged results(something like 10-20 rows out of
a few hundreds) in a data grid. When resizing the screen, the
datagrid changes size, and thus the number of row displayed
changes. I did not find the property or function which allows me to
bind unto in order to get the number of visible rows.
DataGrid.rowCount is 0 unless set, and it is not bindable. Any idea
how I can find that information?

Hi,
1) The rowCount is the right property. It is zero until the
app is finished laying out and sizing all components.
2) rowCount IS bindable; it just does not dispatch an update
event, so if for instance a Label's text property is bound to
DataGrid.rowCount, it will always read zero.
So what you really need to do is get the rowCount AFTER the
application's creationComplete event, and whenever the DataGrid
changes its size.
The following code uses the app's creationComplete event to
get the initial rowCount property and display it in a Label. I also
add an event handler for the DataGrid's render event, which is
fired whenever the DataGrid has to re-draw itself.
There may be an easier way to do it. Maybe someone else has a
more elegant solution. Hope this helps.

Similar Messages

  • How to increase the ALV visible row count

    Hi Experts,
    My standard ALV display is displaying only 10 rows.
    My requirements is to display 20 rows.
    Please advise.
    Regards,
    Chitrasen

    hi ,
    u can set the row count to any number , here I am setting it to 5 using the method set_visible_row_count
    1 Change the visible row count to u20185u2019
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
      DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
      lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
        DATA lo_value TYPE REF TO cl_salv_wd_config_table.
        lo_value = lo_interfacecontroller->get_model(
        lo_value->if_salv_wd_table_settings~set_visible_row_count( '5' ).
    u can also go thru this useful links for CONFIGUIRING ALV :
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4;jsessionid=(J2EE3417400)ID0488867050DB10849380333905377829End
    SAP List Viewer (ALV) [original link is broken]
    Configuring ALV
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d33d9?overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/db22242d-0701-0010-28a2-aeaa1fefd706;jsessionid=(J2EE3414800)ID0133346050DB00727847586176044227End?overridelayout=true&bcsi_scan_06B6B0A4B65849C2=0
    I hope it shud solve ur query.
    regards,
    amit

  • How to get  visible row  count  in JTable ?

    I have one table which is added to one scroll pane. For example my table have total 1000 rows, but at a time only 20 rows should be visible to the scroll pane. And I want to scroll the rows and show only 20 at a time.When user scrolls JTable then next time he can view only 1 to 21, then 2 to 22, and so on. I want to know how to get that number which represents the visible row( in this case it is 20).So kindly help me how to get visible row count. Any help regarding this will be appriciated.
    Thanks and Regards,
    Sheetal

    how to get visible row count.First you need to get the viewport used by the scrollpane. Then you can use methods like getViewPosition() and getViewSize() to get information about the current postition of and size of the viewport.
    Then you can use the table method getRowAtPoint(). to determine the first and last visible row which can then be used to calculate the visible row count.
    When user scrolls JTable then next time he can view only 1 to 21, then 2 to 22, and so onThis is the default behaviour when a "block" scroll is done.
    However when you click on the arrow button on the scrollbar it will only scroll a single row. You could override the getScrollableUnitIncrement() method to return the value from the getScrollableBlockIncrement() method.
    However the user can still drag the scrollbar manually which would cause a problem. So you would also need to remove the MouseMotionListeners from the scrollbar to prevent this.

  • How to set visible row count dynamically

    i  need to place input field so that user enters value for visible row count in ALV WEBDYNPRO

    Hi Prabhu,
    As Suggested use set_visible_row_count. First count your table entries. based on count display records.
    count = LINES( lt_n_contract ).
      IF count > 5.
        lt_table_settings->set_visible_row_count( value  = 10 ).
      ELSE.
        lt_table_settings->set_visible_row_count( value  = 3 ).
      ENDIF.
    Cheers,
    Kris.

  • Setting the Vissible Row count Dynamicaly

    Hi,
        I need to set the Vissible row count dynamically in Webdynpro Java, depending upon the number of rows in the internal table.

    Hi Delphi,
    This is Webdynpro ABAP Forum, Try to post in Webdynpro Java. I dont know WD Java.
    Create one attribute of type i  ex : COUNT TYPE I, and bind to visible row count property of table.
    In code Describe table and get total no of records to one variable.
    Finally use Set_attribute - Pass COUNT Value. Now Based on Count Value you get no of table rows.
    Hope it Helps.
    Cheers,
    Kris.

  • Create a group based on row count

    I am looking for a way of reducing the size of tables I am displaying in my monthly report, by counting some rows together, and naming them 'other'
    I would like to always show all rows, where count of item is >= 50, but all rows where count of item < 50, total up and call 'other'.  I will add an example image as soon as my account has been verified
    I can hide rows using this in the visibility =iif(Count(Fields!Item.Value) >= 50, False, True)
    I have duplicated the line, and added a filter to each (one for greater than 50, one for less than 50) but my totals are still counting all the data, and not just the filtered data.
    Ideally, I would like to add a column using something like =iif(Count(Fields!Item.Value) >= 50, "Over50", "Under50"), or a group based on the same sort of idea, but I keep getting errors about using aggregates in columns.
    Any suggestions?
    Cheers

    What you can do is to add derived column in query behind like this
    SELECT other columns...,
    CASE WHEN Cnt >= 50 THEN YourGroupingField ELSE 'Other' END AS GrpName
    FROM
    SELECT *,COUNT(1) OVER (PARTITION BY YourGroupingField) AS Cnt
    FROM Table
    )t
    Then in your reports use =Fields!GrpName.Value as the Grouping column and you will get required output
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to group by a number of visible rows in drill down report

    hi,
    i have a drill down report with no detail row. 
    I need to control the number of rows shown on the page based on a variable that a user supplies, however it  needs to be only visible rows.
    if I add an outmost group based on an expression like this one:
    =Ceiling(RowNumber(
    "table1")/Parameters!recordsPerPage.Value)
     it will count all rows - visible or not.
    any help would be appreciated.
    thanks
    Inna

    Hi Inna,
    Based on my research, a drilldown report is a layout design that at first hides complexity and enables the user to toggle conditionally hidden report items to control how much detail data they want to see. Drilldown reports are used to change the report
    layout interactively. So it wouldn’t affect the rows displayed in the outmost group. Though some rows are hidden when the report is initially run, it will still count them. This is by design.
    Furthermore, if I understand correctly, you also expect the outmost group is a dynamic group depends on the drilldown action, right? As per my understanding, this function still cannot be achieved at this moment.
    Thanks for your understanding.
    Regards,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • VBA crashes on "rowNum = objXLAppln.Range("A" & Rows.Count).End(xlUp).Row"

    I have code that has the line "rowNum = objXLAppln.Range("A" & Rows.Count).End(xlUp).Row". Every once in a while the macro crashes on this line. It doesn't happen regularly or with a pattern. The entire code is below. I have several
    modules that use this line of code. Any ideas?
    Function ImportScores()
    Dim RecSet As DAO.Recordset
    Dim objXLAppln As Excel.Application
    Dim objWBook As Excel.Workbook
    Dim rowNum As Variant
    Dim i As Integer
    Dim j As Integer
    Dim StrPathFile As String, strFile As String, strPath As String
    Dim strBrowseMsg As String, strInitialDirectory As String, strFilter As String
    'show dialogue box
    strBrowseMsg = "Select the EXCEL file:"
    'set directory to load files from
    strInitialDirectory = "C:\Bridge_CIP_Part-A_B\"
    'run strFilter function
    strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.xlsx)", "*.xlsx")
    StrPathFile = ahtCommonFileOpenSave(InitialDir:=strInitialDirectory, _
    Filter:=strFilter, OpenFile:=True, _
    DialogTitle:=strBrowseMsg, _
    Flags:=ahtOFN_HIDEREADONLY)
    If StrPathFile = "" Then
    MsgBox "No file was selected.", vbOK, "No Selection"
    Exit Function
    End If
    'Set Excel application object. Critical for macro to run properly. Do not change.
    Set objXLAppln = New Excel.Application
    'Open workbook and worksheet to load data.
    With objXLAppln
    Set objWBook = .Workbooks.Open(StrPathFile)
    objXLAppln.Visible = True
    End With
    Set RecSet = CurrentDb.OpenRecordset("Performance_Scores")
    'Copy data from Excel cells to Access fields
    objXLAppln.Sheets("Performance_Attributes").Select
    rowNum = objXLAppln.Range("A" & Rows.Count).End(xlUp).Row
    objXLAppln.Range("A10").Select
    'Add records to table from Excel
    With RecSet
    For i = 0 To rowNum - 9
    RecSet.AddNew
    RecSet.Fields("CIP_ID").value = objXLAppln.ActiveCell.Offset(i, 0).value
    RecSet.Fields("5YearScore").value = objXLAppln.ActiveCell.Offset(i, 53).value
    RecSet.Fields("10YearScore").value = objXLAppln.ActiveCell.Offset(i, 54).value
    RecSet.Fields("15YearScore").value = objXLAppln.ActiveCell.Offset(i, 55).value
    RecSet.Fields("20YearScore").value = objXLAppln.ActiveCell.Offset(i, 56).value
    RecSet.Update
    Next i
    End With
    'Close everything
    RecSet.Close
    objWBook.Close SaveChanges:=False
    objXLAppln.Quit
    Set RecSet = Nothing
    Set objWBook = Nothing
    Set objXLAppln = Nothing
    End Function

    I rewrote as below.
    But rather than doing it this way, I would create a linked table to this workbook and import the data using an Append query.
    Function ImportScores()
        Const FOOTER_ROWS_TO_SKIP As Integer = 10
        Const COL_CIP_ID As Integer = 1
        Const COL_5YEARSCORE As Integer = 54
        Dim RecSet      As DAO.Recordset
        Dim objXLAppln  As Excel.Application
        Dim objWBook    As Excel.Workbook
        Dim objXLSheet  As Excel.Worksheet
        Dim rowNum      As Variant
        Dim row         As Integer
        Dim j           As Integer
        Dim StrPathFile As String, strFile As String, strPath As String
        Dim strBrowseMsg As String, strInitialDirectory As String, strFilter As String
        'show dialogue box
        strBrowseMsg = "Select the EXCEL file:"
        'set directory to load files from
        strInitialDirectory = "C:\Bridge_CIP_Part-A_B\"
        'run strFilter function
        strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.xlsx)", "*.xlsx")
        StrPathFile = ahtCommonFileOpenSave(InitialDir:=strInitialDirectory, _
                                            Filter:=strFilter, OpenFile:=True,
                                            DialogTitle:=strBrowseMsg,
                                            Flags:=ahtOFN_HIDEREADONLY)
        'StrPathFile = "C:\Users\Tom\Documents\test.xlsx"        'testonly
        If StrPathFile = "" Then
            MsgBox "No file was selected.", vbOK, "No Selection"
            Exit Function
        End If
        'Set Excel application object. Critical for macro to run properly. Do not change.
        Set objXLAppln = New Excel.Application
        'Open workbook and worksheet to load data.
        With objXLAppln
            Set objWBook = .Workbooks.Open(StrPathFile)
            objXLAppln.Visible = True
            Set objXLSheet = objXLAppln.Sheets("Performance_Scores")
        End With
        rowNum = objXLSheet.UsedRange.Rows.Count
        'Add records to table from Excel
        Set RecSet = CurrentDb.OpenRecordset("Performance_Scores", dbOpenDynaset)
        With RecSet
            For row = 1 To rowNum - FOOTER_ROWS_TO_SKIP
                RecSet.AddNew
                RecSet.Fields("CIP_ID").Value = objXLSheet.Cells(row, COL_CIP_ID).Value
                RecSet.Fields("5YearScore").Value = objXLSheet.Cells(row, COL_5YEARSCORE).Value
                'etc.
                RecSet.Update
            Next row
        End With
        'Close everything
        RecSet.Close
        objWBook.Close SaveChanges:=False
        objXLAppln.Quit
        Set RecSet = Nothing
        Set objWBook = Nothing
        Set objXLAppln = Nothing
    End Function
    -Tom. Microsoft Access MVP

  • Number of visible rows

    hi,
    I want to display all the records of the table without restriction. Normally If I have 1000 records then the number of visible rows will be equal to the length of the table and we get scroll option to see the other records. If I want to make the number of visible rows equal to number of records is it possible?
    thanks,

    Hi,
    Assign the count of records to the 'No of rows' property of the table.
    Regards
    Basheer

  • Row Count

    What I would like to do is do row counts across 2 schemas with same tables and see if there are any differences in row counts and if there is any would like to generate an email and alert the user.
    Is it possible?

    Hello,
    Yes it is possible, you need to
    grant select on user2.table_name1 to user1; (you can grant select to all tables of user2 to user1 or otherway) and then write pls/sql procedure to send email using utl_smtp.
    Check this link for example
    http://www.quest-pipelines.com/newsletter-v2/smtp.htm
    Regards
    Edited by: OrionNet on Dec 30, 2008 5:48 PM

  • There was an error while updating row count for "SH".."SH".CHANNELS

    Hi All,
    Am new to OBIEE.Pls help in this regard.
    Am building the physical layer as per Repository guide.When am importing the data in to this,am getting the below error.
    *"There was an error while updating row count for "SH".."SH".CHANNELS" :"*
    channles is the table name and having 5 rows.
    but am able to see the data in the sql prompt. like SELECT * FROM SH.CHANNELS then 5 rows data would be displaying..
    pls help in this regard and where is the excat problem?
    Thanks,

    what is the error?
    Make sure that your connection pool settings are okay..
    Make sure that, you are using correct driver in case of if you are using ODBC dsn..
    Also make sure that, your oracle server is running... TNS and Oracle server services

  • DataTable.Rows.Count property is occasionally wrong

    I have a web service in C#.NET which calls a stored procedure using ADO.NET. The stored procedure is always returning 1 row, which is then loaded into a DataTable. The Rows.Count property of the DataTable is then examined.
    When this web service is called repeatedly with numerous requests, it occasionally returns Rows.Count as 0 when it should be 1. I have debugged and examined it at runtime and found that there is indeed 1 row in the datatable, but that the Rows.Count property
    is 0.
    Is this a known bug?
    I'm using .Net Framework 2.0
    Note: This is an issue that occurs very rarely. My testing shows that it takes about 90 minutes to recreate it when you have 2 concurrent processes sending requests repeatedly at a rate of about 10 requests per second.

    Are you sure that there aren't multiple threads access the DataTable?
    Can you post a repro? 
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Dynamically set maximum row count in Interactive Report

    Hi,
    Has anyone worked out a way of dynamically setting (e.g. via select list) the maximum row count value for an Interactive Report, taking into account issues with order by when the report is filtered. I'm aware of solutions like this: http://www.talkapex.com/2010/10/apex-reports-no-limit-downloads.html but as far as I can tell this doesn't work when the report is filtered and the IR is rewritten in the background. Data sets then become unreliable because they are reordered.
    Thanks,
    Mike

    Hi Mike,
    You can do that with javascript
    gReport.search('SEARCH',100)the 100 you can replace for any number you like.I have a report with filter,sorting and groups and it is gives no problem there.
    any number means any number but not higher than the number you set at Maximum Rows Per Page.
    You probably can mix the solution from Martin and the above code.
    Regards,
    Kees Vlek
    <tt>Company: http://www.orcado.nl
    Blog: http://www.orcado.nl/blog/blogger/listings/69-kvlek
    Twitter: http://www.twitter.com/skier66</tt>
    If the question is answered please change it to answered and mark the appropriate post as correct/helpfull.
    Edited by: kvlek on 24-apr-2013 12:29
    Edited by: kvlek on 24-apr-2013 12:35

  • How to add the Row count(number of rows in table)  in  the table header?

    Hi,
    I'm having a table. This table is viewed when i click on a search button.
    <b>On the table header it should dynamically display the number of rows in the table, i.e., the row count.</b>
    How to do this? could any one explain me with the detailed procedure to achieve this.
    Thanks & Regards,
    Suresh

    If you want to show a localized text in the table header, you should use the <b>Message Pool</b> to create a (parameterized) message "tableHeaderText" like "There are table entries".
    Next, create a context attribute "tableHeaderText" of type "string" and bind the "text" property of the table header Caption UI element to this attribute.
    Whenever the table data has changed (e.g. at the end of the supply function for the table's data source node), update the header text:
    int numRows = wdContext.node<TableDataSourceNode>().size();
    String text = wdComponentAPI.getTextAccessor().getText
      IMessage<ComponentName>.TABLE_HEADER_TEXT,
      new Object[] { String.valueOf(numRows) }
    wdContext.currentContextElement().setTableHeaderText(text);
    Maybe you want to provide a separate message for the case that there are no entries.
    Alternatively, you can make the attribute calculated and return the header text in the attribute getter.
    Armin

  • Unable to get the row count of supplier site for each supplier

    Hi,
    In the sourcing module, suppliers page is having an advanced table in which there is a field 'supplier' and another filed 'supplier sites' (supplier field is of type picklist).Now, how can i get the count of 'supplier sites' for each supplier???

    Hi sumit,
    Thanks for the reply, can u please help in writing the code to loop through the VO...
    I was trying to get the first row and then finding the count of supplier sites, but in each iteration of for loop(for each row) i am getting the same count value for each and every row...
    Code :
    int j=vo.getrowcount();//count of no. of rows
    for (int i=0;i<j;i++)
    row=(xxVORowImpl)rowsetiterator.getRowAtRangeIndex(1);
    int a=am.getSupplierSitesVO.getRowCount();//this is the view object in the pick list
    oapagecontext.writeDiagnostics(this,"value of   a is :"+a,1);
    this code is giving row count of last row of supplier.
    How to get the count for each and every row of supplier sites ?
    Thanks.

Maybe you are looking for

  • Very urgent: Travel Request Error in production server

    Hi All, While creating Travel request in production server, we are getting an error.. Error while writing to the database PTRV_HEAD/PTRV_PERIO/Cluster TE Someone please help me on this. This is very urgent.. Thanks in advance!

  • Incoming purchase order  vs out bound goods receipt processing

    Hi any body know how to develop an interface for below requrement creating an interface for incoming purchase order creation and out bound goods receipt processing please let me know anybody knows this Thanks in advance, Best regards Alleiah

  • Negative reporting - Show employees who haven't attended a course

    Hi I have two infocube, one containing all employees within the company and on containing courses (incl employee participant information). Now I would like to create a query which shows employees which havent attended a specific cause. It should be p

  • How to read trace files alerted in the alert.log file

    Hello, My alert.log file indicated multiple trace files to review. How to read these trace files to understand the cause of errors. Do I open the trace files with vi and do a search for 'ORA-' error. Are there tools to read and understand trace files

  • ANNOUNCEMENT:: JSFOne Conference Sep 4th-6th in Washington, DC

    Hello, I'm pleased to announce the [JSFOne Conference|http://www.jsfone.com/conference/washington_dc/2008/09/index.html] , which I'll be hosting along with the [ No Fluff Just Stuff Symposiums|http://www.nofluffjuststuff.com/] . I think we've truly p