Welcome to MSDN Blogs Sign in | Join | Help

Visual Studio For Devices

A Team blog from the Visual Studio for Devices Team

Syndication

Code Snippet for getting a record from a binding source

For those who attended my SqlMobile webcast today, here is the code snippet I used to get the current record for a binding source. You may have to update the name of the bindingSource variable to match the name used in your application. To use this snippet save it to a text file called ".snippet" and put it in your My Documents\Visual Studio 2005\VB\My Code Snippets folder.

<?xml version="1.0" encoding="UTF-8"?>
<CodeSnippets xmlns="
http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
  <Header>
   <Title>Current Row From Binding Source</Title>
   <Shortcut>CurrentRowFromBindingSource</Shortcut>
   <Description>Code snippet for getting a DataRowView object out of the BindingSource.Current property</Description>
   <Author>Microsoft Corporation</Author>
   <SnippetTypes>
    <SnippetType>Expansion</SnippetType>
   </SnippetTypes>
  </Header>
  <Snippet>
   <Code Language="VB" Kind="method body">
    <![CDATA[Dim currentRowView As System.Data.DataRowView = DVDsBindingSource.Current
        Dim currentRow As DVDDataSet.DVDsRow = currentRowView.Row]]>
   </Code>
  </Snippet>
 </CodeSnippet>
</CodeSnippets>

Published Wednesday, June 29, 2005 12:59 PM by MobileDevGroup

Filed under:

Comments

# The Mobile Minute 100 @ Sunday, July 03, 2005 12:00 PM

&amp;nbsp;Wooo Hooo!&amp;nbsp;&amp;nbsp; TMM 100.&amp;nbsp; Thought I&amp;rsquo;d never get here at the rate I post &amp;lt;g&amp;gt;;...

Nino.Mobile

New Comments to this post are disabled
Page view tracker