This question is locked. New answers and comments are not allowed.
Hello, using RadComboBox I want to add some attributes from the OpenAccessLinqDataSource that populates it on the DataBound event. The DataItem looks good but I can't figure out what to cast the DynamicClass to! Doh.
ASPX DataSource
c# for DataBound Event
See attached file re: DataItem has data
ASPX DataSource
<telerik:OpenAccessLinqDataSource ID="OAL_Stock_Topic" runat="server" ContextTypeName="Flow.Financials_ST2" EntityTypeName="" ResourceSetName="Stock_topics" Select="new (ID, Market, IsIndex, IsHolidayClosed)" Where="Enabled == @Enabled"> <WhereParameters> <asp:Parameter DefaultValue="1" Name="Enabled" Type="Int16" /> </WhereParameters></telerik:OpenAccessLinqDataSource>c# for DataBound Event
protected void MarketItemDataBound(object o, RadComboBoxItemEventArgs e){ // Does this work? No :( Stock_topic st = e.Item.DataItem as Stock_topic; // Silly guesses var st2 = e.Item.DataItem as Flow.Financials_ST2; var st3 = e.Item.DataItem as OpenAccessLinqDataSource; // the goal e.Item.Attributes["IsIndex"] = "Index Here"; e.Item.Attributes["IsHolidayClosed"] = "Closed Status Here";}See attached file re: DataItem has data