Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>OK - This is the final answer - the code work and the data stays where it should --</p> <p>Thanks for the help!</p> <p>My Class:</p> <pre><code>Public Class GridData Private _clientno Private _manifest Private _packagerate Public Property PackageRate() As Double Get Return _packagerate End Get Set(ByVal value As Double) _packagerate = value End Set End Property Public Property manifest() As String Get Return _manifest End Get Set(ByVal value As String) _manifest = value End Set End Property Public Property client() As Int16 Get Return _clientno End Get Set(ByVal value As Int16) _clientno = value End Set End Property </code></pre> <p>End Class</p> <p>The linq:</p> <pre><code> Dim query = From m In db.details _ Where m.InboundDate &gt;= CType(MonthCalendar1.SelectionStart, DateTime) _ And m.InboundDate &lt;= CType(MonthCalendar1.SelectionEnd, DateTime).AddHours(23).AddMinutes(59) _ And m.ClientNo = 1 _ Join md In db.Manifests On md.ManifestID Equals m.MainID _ Select New GridData With {.PackageRate = Nothing, .manifest = m.MainID, .client = m.ClientNo} 'No No -- billingDatagrid.Columns.Add("PackageRate", "PackageRate") </code></pre> <p>and a little code to fill in the packagerate with the value from the client number:</p> <pre><code> billingDatagrid.DataSource = query Dim currentrow As Int16 = 0 For Each r In billingDatagrid.Rows billingDatagrid("PackageRate", currentrow).Value = billingDatagrid("client", currentrow).Value currentrow += 1 Next </code></pre> <p>The above code now works...</p> <p>Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload