Repeater within Gridview in C# ASP.NET 2.0

Inserting a repeater within gridview is an easy task, but binding the headline in gridview and having data items correspond to the particular headline into a repeater, is a little bit tricky. Following a requirement I was given, I had to bind company name as a headline and the top four news of the company as data items under the headline. Then the next company name, and the top four news of that respective company and so on.

In this article, I have used a repeater control to bind news while I am binding company name in gridview. We can also make the company name as a link button which, on clicking, will navigate to the corresponding page. For this we have to pass navigate the URL for a company dynamically. We can do this by writing code in the OnRowDataBound event of gridview. We can also make the news row as link.

>>Read complete article & download sample code

Comments

  1. Hi Navin,

    Its really very good article. It helped me lots. Many thanks for sharing.

    ReplyDelete

Post a Comment

Popular posts from this blog

A new threat to users on “Incoming Calls” – VISHING

Session Storage - a client-side state management technique

HTTP Error 500.21 - Internal Server Error: ExtensionlessUrlHandler-ISAPI-4.0_32 bit has a bad module