﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » How to add actual record number and total record number</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 12 Sep 2026 02:29:51 GMT</lastBuildDate><ttl>20</ttl><item><title>How to add actual record number and total record number</title><link>http://forum.strataframe.net/FindPost15109.aspx</link><description>Hi&lt;/P&gt;&lt;P&gt;I have a maintenance form, I want to show the number of the actual record and the total number of records, I have this:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; BO_Publicaciones_Navigated(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; e &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; MicroFour.StrataFrame.Business.NavigatedEventArgs) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Handles&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; BO_Publicaciones.Navigated&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;'-- Establish Locals&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; lcMsg &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;lcMsg = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.BO_Publicaciones.CurrentRowIndex.ToString() &amp;amp; &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;&lt;FONT color=#a31515 size=2&gt;"&amp;nbsp;0f "&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.BO_Publicaciones.Count.ToString()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.LabelControlNumberOfrecords.Text = lcMsg&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#1f5080&gt;This works for the total number, but the first record is 0 and if I have 17 records navigating goes 0, 1,2...16 I know that the count is correct but I need to star in 1 not in 0.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#1f5080&gt;Thanks for your help&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#1f5080&gt;Regards&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Mon, 24 Mar 2008 09:25:14 GMT</pubDate><dc:creator>Juan Carlos Pazos</dc:creator></item><item><title>RE: How to add actual record number and total record number</title><link>http://forum.strataframe.net/FindPost15128.aspx</link><description>Just FYI...any collection count will always return the actual count.&amp;nbsp; This is not just specific to the SF BOs, but any collection or array in .NET.&amp;nbsp; The only time that you have to take the zero based logic into account is when dealing with an index...this will always be zero based.&amp;nbsp;</description><pubDate>Mon, 24 Mar 2008 09:25:14 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to add actual record number and total record number</title><link>http://forum.strataframe.net/FindPost15117.aspx</link><description>Hola Juan Carlos,&lt;P&gt;Glad to be of any help, even though I had to try the code before posting because I am also new to SF :P.&lt;/P&gt;&lt;P&gt;Even though I live in USA for many years I am from Dominican Republic and do speak Spanish in case you or anyone else need some help in Spanish, well your English is pretty good, so I don't think you'll need it :cool:</description><pubDate>Sun, 23 Mar 2008 21:11:33 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add actual record number and total record number</title><link>http://forum.strataframe.net/FindPost15116.aspx</link><description>Hi Edji, Peter&lt;/P&gt;&lt;P&gt;I try both, Edji yours was the correct one, if I have 17 records and use Peter's code the it tells me that are 18 records.&lt;/P&gt;&lt;P&gt;Thanks both for your help and take the time to point me in the rigth direction.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;[quote]&lt;/P&gt;&lt;P&gt;Hi Peter, Juan,&lt;/P&gt;&lt;P&gt;Actually you don't need to add&amp;nbsp;"+ 1"&amp;nbsp;to the BO.Count property since it will have&amp;nbsp;the corrected total count&amp;nbsp;number.&amp;nbsp; So the code should be: &lt;P&gt;[codesnippet]lcMsg = String.Format("{0} of {1}", Me.BO_Publicaciones.CurrentRowIndex + 1, Me.BO_Publicaciones.Count)[/codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;[/quote]</description><pubDate>Sun, 23 Mar 2008 16:58:19 GMT</pubDate><dc:creator>Juan Carlos Pazos</dc:creator></item><item><title>RE: How to add actual record number and total record number</title><link>http://forum.strataframe.net/FindPost15113.aspx</link><description>[quote][b]Peter Jones (03/22/2008)[/b][hr]Hi Jaun,&lt;P&gt;Most indexes are 0 based so, to fix the display, you could try (haven't tested this so syntax may not be 100% correct):&lt;/P&gt;&lt;P&gt;lcMsg = String.Format("{0} of {1}", Me.BO_Publicaciones.CurrentRowIndex + 1, Me.BO_Publicaciones.Count + 1)&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;String.Format tends to be a better way to concatinate data like this.&lt;/P&gt;&lt;P&gt;Cheers, Peter&lt;/FONT&gt;[/quote]&lt;P&gt;Hi Peter, Juan,&lt;P&gt;Actually you don't need to add&amp;nbsp;"+ 1"&amp;nbsp;to the BO.Count property since it will have&amp;nbsp;the corrected total count&amp;nbsp;number.&amp;nbsp; So the code should be:&lt;P&gt;[codesnippet]lcMsg = String.Format("{0} of {1}", Me.BO_Publicaciones.CurrentRowIndex + 1, Me.BO_Publicaciones.Count)[/codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Sat, 22 Mar 2008 18:03:17 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to add actual record number and total record number</title><link>http://forum.strataframe.net/FindPost15111.aspx</link><description>Hi Jaun,&lt;/P&gt;&lt;P&gt;Most indexes are 0 based so, to fix the display, you could try (haven't tested this so syntax may not be 100% correct):&lt;/P&gt;&lt;P&gt;lcMsg = String.Format("{0} of {1}", &lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.BO_Publicaciones.CurrentRowIndex + 1, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.BO_Publicaciones.Count + 1)&lt;/P&gt;&lt;P&gt;String.Format tends to be a better way to concatinate data like this.&lt;/P&gt;&lt;P&gt;Cheers, Peter&lt;/FONT&gt;</description><pubDate>Sat, 22 Mar 2008 17:45:03 GMT</pubDate><dc:creator>Peter Jones</dc:creator></item></channel></rss>