I usually work with web forms, but I have a project that requires a Windows form. I need to display data using the DataRepeater control, however, I cannot directly bind to the data source, since I need to “massage” the data before it is displayed. Using a version of the datarepeater web form, this can be achieved by using an ItemTemplate and passing the returned data item to a public method, for example, as I pass it to the GetModel method in the example below. How can I accomplish something similar in the form of a window?
<ItemTemplate> <asp:Label ID="lbAsModel" runat="server" Text='<%# GetModel(Convert.ToInt32(Eval("ALAN8"))) %>' CssClass="repGridText" /> </ItemTemplate>
source share