I may have accidentally added a bracket in my code above. Problem is, that would be detected by Visual Studio anyway and would stop my code from compiling.
I am binding to an arraylist, yes, but each arraylist holds an object (struct) which has 5 values initialised in its parametered constructor. Is this a problem? I did do a test and I bound a standard arraylist just holding strings. This worked fine.
The datasource and arraylist both have a count of >0.
The grid's column count, however, is 0 though? Can this be right?
Some code samples:
Below, I loop through a collection of rss feed titles (I know the naming conventions arent 100%) and if it equals the title of the clicked radpanel member (I'm using radpanel for representing rss feed titles), then set the url to parse based on the title (so if the title is yahoo, I can get a yahoo rss feed - I have some code which does this). I get the articles into a collection called dict, which is of type Collection<T>.
foreach (string item in Items)
if (e.Item.Text == item)
// There is a match between the selected node and the item in the list of rss feeds
rssmanager.Url = feedUrl; // Url to parse is the url of the selected node, where it matches with the collection of feed titles (See above)
dict = rssmanager.GetFeed(feedUrl);
I call RadGrid1_NeedDataSource(this, null); which looks like this:
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
ArrayList arraylist = new ArrayList();
if (dict != null && dict.Count > 0)
foreach (var v in dict)
arraylist.Add(new RSSFeedItem(v.Date, v.Description, v.Title, v.Title));
RadGrid1.DataSource = arraylist;
Your suggestion didn't work. Any idea what is wrong? The markup for the grid is very simple:
<telerik:RadGrid ID="RadGrid1" runat="server" Enabled="true" Visible="true" Skin="Default"
I would submit a support ticket but I am not able to as I am just using the trial to evaluate the power of the product (quite impressed so far, just need to get some experience to really push the tools).