Finding Item in Grid

Posted by: rodneybuxton on 8 September 2017, 3:06 pm EST

  • Posted 8 September 2017, 3:06 pm EST

    <p>I'm converting a Windows ListView to a fpsGrid. Using the ListView control there is a </p><p><span style="font-size:10pt;">Index = lstElements.FindItemWithText(sDerElemName, </span><span style="font-size:10pt;color:blue;">False</span><span style="font-size:10pt;">, 0, </span><span style="font-size:10pt;color:blue;">True</span><span style="font-size:10pt;">).Index</span> </p><p>command that allows you to find the index of an entry in the list, is there something would would be equivalent using the grid? Basically I'm trying to find out if there is a value in the list that begins with the value I'm testing with.</p><p>Thanks for any help you can provide.</p><p>Rodney </p>
  • Replied 8 September 2017, 3:06 pm EST

    <p>Hello,</p><p>You can use the Search method, to find the row and column indexes of a cell containing a particular text or value. Please refer to the following link that describes the same: <br></p><p></p><p>The last two parameters passed to this method returns the row and column index of the specific cell. Hope it helps.</p><p>Thanks,</p><p>Manpreet Kaur <br></p>
  • Replied 8 September 2017, 3:06 pm EST

    Will this work if I just want to find out if the value begins with something?
  • Replied 8 September 2017, 3:06 pm EST

    <p>Hello,</p><p>Yes, you can accomplish the same using the WildCharacters option available in this method, please have a look at the following link that describes the same:</p>,String,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Int32,Int32,Int32,Int32%29.html<p>I have attached a sample performing the search, to search for words starting with "A". Click on the button at the bottom, it displays the cell indexes of the cell having words starting with "A".  Clicking on the button multiple times, each time displays the next occurence of a word starting with "A". </p><p>Hope it helps.</p><p>Thanks,</p><p>Manpreet Kaur <br></p>
  • Replied 8 September 2017, 3:06 pm EST

    Thank you
Need extra support?

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

Learn More

Forum Channels