开发者

How to create more than one dynamic grid from a single data source using ASP.net?

开发者 https://www.devze.com 2023-01-02 19:16 出处:网络
I am a beginner. I want to know how can I create more than one dynamic data grid for a single data source. I need to show dup开发者_JS百科licate rows separately in different grids. For example If i ha

I am a beginner. I want to know how can I create more than one dynamic data grid for a single data source. I need to show dup开发者_JS百科licate rows separately in different grids. For example If i have 4 duplicate values for ID 1 and 3 duplicate values for ID 2 then ID 1 should be displayed in separate grid and ID 2 should be displayed in separate gris.

Reply me ASAP.

KP


You should iterate through your data and select duplicate rows and show it in different grids in code behind. You can't do that via gridview properties window. the road map is:

//connect to database get results in a list List<YourDomainObject> resultList = //parse your results and resultList1 and 2 //..... //bind to gridview GridView1.DataSource = resultList1; GridView1.DataBind(); //same for GridView2

0

精彩评论

暂无评论...
验证码 换一张
取 消