K
Kay Chan
Hi All,
I am going to using a editable datagrid, one of the field should be a
dropdownlist, here is my code
<EditItemTemplate>
<aspropDownList
ID="INVESTMENT_FUND_ID"
DataSource="<%# getINVESTMENT_FUND() %>"
DataTextField="NAME"
DataValueField="VALUE"
runat="server"
CssClass="table_list_item_text" Width="230px">
</aspropDownList>
</EditItemTemplate>
It is fine. But when I want to set the default SelectedIndex, I added
SelectedIndex="<%# getSelectedIndex() %>"
into the aspx, but the error occurs
Parser Error Message: The 'SelectedIndex' property is set only by the
runtime. It cannot be declared.
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032
Any other method I can solve this issue?
Thank you!
Regards,
Alan
I am going to using a editable datagrid, one of the field should be a
dropdownlist, here is my code
<EditItemTemplate>
<aspropDownList
ID="INVESTMENT_FUND_ID"
DataSource="<%# getINVESTMENT_FUND() %>"
DataTextField="NAME"
DataValueField="VALUE"
runat="server"
CssClass="table_list_item_text" Width="230px">
</aspropDownList>
</EditItemTemplate>
It is fine. But when I want to set the default SelectedIndex, I added
SelectedIndex="<%# getSelectedIndex() %>"
into the aspx, but the error occurs
Parser Error Message: The 'SelectedIndex' property is set only by the
runtime. It cannot be declared.
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032
Any other method I can solve this issue?
Thank you!
Regards,
Alan