Hi!
I am building a custom list on the fly where I build a Hashtable (it could also be a dictionary if needed... it does not matter to me). Then, I insert the hashtables in a list and want to bind the list in a RadGrid. The problem is that every field of each row is blank (empty). The row count is good which means to me that something is kinda happening but I'm not doing everything correctly!
I've seen another example on the forum where a user was doing a similar thing through a webservice but even when downloading the code, I could not make it work. So here is what I'm doing :
My ASPX :
My code behind :
What is missing to make that work ?
Thank you!
I am building a custom list on the fly where I build a Hashtable (it could also be a dictionary if needed... it does not matter to me). Then, I insert the hashtables in a list and want to bind the list in a RadGrid. The problem is that every field of each row is blank (empty). The row count is good which means to me that something is kinda happening but I'm not doing everything correctly!
I've seen another example on the forum where a user was doing a similar thing through a webservice but even when downloading the code, I could not make it work. So here is what I'm doing :
My ASPX :
<telerik:RadGrid ID="gridList" AutoGenerateColumns="False" runat="server"> <MasterTableView> <Columns> <telerik:GridBoundColumn HeaderText="Ticker" DataField="SecurityTicker" > </telerik:GridBoundColumn> </Columns> </MasterTableView></telerik:RadGrid>My code behind :
Private Sub gridList_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles gridList.NeedDataSource Dim myList As New List(Of Hashtable) Dim h1 As New Hashtable h1.Add("SecurityTicker", "MAX") h1.Add("SecPrice", 99) Dim h2 As New Hashtable h2.Add("SecurityTicker", "ZZZ") h2.Add("SecPrice", 100) myList.Add(h1) myList.Add(h2) gridList.DataSource = myListEnd SubWhat is missing to make that work ?
Thank you!