asp.net cannot convert type DataRowView to DbDataRecord
<p>working on asp.net with c#.
i have a dataset function.</p>

<p>The function is asigned to a datagrid datasource:</p>

<pre><code>DataGrid2.DataSource = datasetfunction(parameter);
</code></pre>

<p>but when the databind is reached:</p>

<pre><code>DataGrid2.DataBind();
</code></pre>

<p>it throws error: "cannot convert type System.Data.DataRowView to System.Data.Common.DbDataRecord"</p>

<p>One thing to note:  the same function was of type sqldatareader, but i needed to change to a dataset type. so in the function i converted the sqldatareader to datatable and then the datatable to a dataset. So then now i get this error.</p>

<p>How can i solve this?</p>

<p>Thanks</p>
