Object Data Source Computed Column

G

Guest

I have a list box that is bound to an object data source. I added a column,
say ColumnC, to my typed data set and for it's expression I entered

ColumnA + ': ' + ColumnB

When I preview the data in the designer I get exactly what I want.

Now I go over to the object data source on my web page, refresh it and
refresh the schema. I can now see ColumnC as an option for the list box's
data text field. However, when I run the page nothing shows up in the list
box. However, when I view the page source, I see that the data value field
did render

Does anyone know what I missed?

Thanks
 
L

Larry Bud

I have a list box that is bound to an object data source. I added a column,
say ColumnC, to my typed data set and for it's expression I entered

ColumnA + ': ' + ColumnB

When I preview the data in the designer I get exactly what I want.

Now I go over to the object data source on my web page, refresh it and
refresh the schema. I can now see ColumnC as an option for the list box's
data text field. However, when I run the page nothing shows up in the list
box. However, when I view the page source, I see that the data value field
did render

Does anyone know what I missed?

Gotta be a problem the way the listbox is rendering. Can you post the
HTML?
 
G

Guest

Thanks Larry -

<asp:ObjectDataSource ID="ReferralCodesBindingSource" runat="server"
OldValuesParameterFormatString="original_{0}"
SelectMethod="GetData"
TypeName="InvestorComplaints.DAL.SecuritiesHotlineDataTableAdapters.ReferralCodesTableAdapter">
</asp:ObjectDataSource>


<asp:ListBox ID="lstReferralCode" runat="server" Rows="5"
SelectionMode="Multiple" DataSourceID="ReferralCodesBindingSource"
DataTextField="ReferralCodeAndAgency"
DataValueField="ReferralCodeID"></asp:ListBox>

and the rendered html

<p class="flLeft"><label for="lstReferralCode"
id="lblReferralCodes">Referral Code(s):</label><br />
<select size="5" name="lstReferralCode" multiple="multiple"
id="lstReferralCode">
<option value="3"></option>
<option value="4"></option>
<option value="5"></option>
<option value="6"></option>
<option value="7"></option>
<option value="8"></option>
<option value="9"></option>
<option value="10"></option>
<option value="11"></option>
<option value="12"></option>
<option value="13"></option>
<option value="14"></option>
<option value="15"></option>
<option value="16"></option>
<option value="17"></option>
<option value="18"></option>
<option value="19"></option>
<option value="20"></option>
<option value="21"></option>
<option value="22"></option>
<option value="23"></option>
<option value="24"></option>
<option value="25"></option>
<option value="26"></option>
<option value="27"></option>
<option value="28"></option>
<option value="29"></option>
<option value="30"></option>
<option value="31"></option>
<option value="32"></option>
</select>
</p>


and the rendered html is my calculated field
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top