(Imagine the results you get back from an image search on google)
I want to use the built in binding and paging capabilities of the RadGrid to do the heavy lifting of displaying a "grid" of user controls containing similarly formatted content. That's easy enough ;) The catch is I want to have the items going across the page as well as down. I have a grid now that is bound to a datasource which binds a single value for each row. This value is passed to a user control which manages everything to do with rendering the content for that item. This all works nicely as rows.
However users will want to see say, 4 columns x 4 rows (but can change this according to their prefs)
The two things I haven't fathomed:
Any guidance or better still pointers to examples would be much appreciated!
Thanks,
Mark
I want to use the built in binding and paging capabilities of the RadGrid to do the heavy lifting of displaying a "grid" of user controls containing similarly formatted content. That's easy enough ;) The catch is I want to have the items going across the page as well as down. I have a grid now that is bound to a datasource which binds a single value for each row. This value is passed to a user control which manages everything to do with rendering the content for that item. This all works nicely as rows.
However users will want to see say, 4 columns x 4 rows (but can change this according to their prefs)
The two things I haven't fathomed:
- How do I override the standard behaviour of the RadGrid so I can manage the output of TR and TD tags myself when data rows are being rendered?
- How can I detect the last record being displayed on a page so that if not all the columns have been output in the table I can put out the necessary <TD> </TD> strings to complete the row?
Any guidance or better still pointers to examples would be much appreciated!
Thanks,
Mark
8 Answers, 1 is accepted
0
Mark H
Top achievements
Rank 1
answered on 20 May 2009, 11:34 AM
I found the answer here:
http://www.telerik.com/help/aspnet-ajax/grid-list-view-data-list-like-grid.html
:)
Mark
http://www.telerik.com/help/aspnet-ajax/grid-list-view-data-list-like-grid.html
:)
Mark
0
Mark H
Top achievements
Rank 1
answered on 20 May 2009, 01:52 PM
Well I thought I had but it doesn't seem to do quite what I want/how I want.
I want to manage all the TR/TD tagging for the complete data row (happy that this sits in an overall table where pager stuff etc sits in its own TR areas - even if I construct my own ItemTemplate it sis still being output within TR tags so I am not getting my "row" items going across the page as I want.
Any suggestions???
Mark
I want to manage all the TR/TD tagging for the complete data row (happy that this sits in an overall table where pager stuff etc sits in its own TR areas - even if I construct my own ItemTemplate it sis still being output within TR tags so I am not getting my "row" items going across the page as I want.
Any suggestions???
Mark
0
Hi Mark,
If I understand you correctly, you want to completely control the HTML output of the RadGrid data rows, i.e. change the rendering, which by default is a <tr> including some <td>s. I am afraid this cannot be done in a trivial way - even if you use an <ItemTemplate> for the whole data row, it will be output in a <tr> element with a single <td> inside.
That's why the ListView-like RadGrid example
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx
demonstrates how to "inject" <table> tags with a display:none style for each data row <tr>, so that the content and layout of the data can be controlled with custom HTML elements.
If you want something different, please explain a little bit more what your requirements are. Thanks.
Regards,
Dimo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
If I understand you correctly, you want to completely control the HTML output of the RadGrid data rows, i.e. change the rendering, which by default is a <tr> including some <td>s. I am afraid this cannot be done in a trivial way - even if you use an <ItemTemplate> for the whole data row, it will be output in a <tr> element with a single <td> inside.
That's why the ListView-like RadGrid example
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx
demonstrates how to "inject" <table> tags with a display:none style for each data row <tr>, so that the content and layout of the data can be controlled with custom HTML elements.
If you want something different, please explain a little bit more what your requirements are. Thanks.
Regards,
Dimo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Mark H
Top achievements
Rank 1
answered on 25 May 2009, 12:07 PM
Hi - yes that is what I was after and had assumed that the way the templates worked was like the MS controls which give complete control - I've had to switch to using a templated MS ListView instead which is a shame because I would really like to use the paging etc of teh radgrid but don't like the kludgy feel of your workaround :(
Mark
Mark
0
Accepted
Hi Mark,
I am sorry that RadGrid does not meet your requirements in this case. Hopefully you will be able to implement it with a Telerik ListView, once it comes into existence in the future.
Sincerely yours,
Dimo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I am sorry that RadGrid does not meet your requirements in this case. Hopefully you will be able to implement it with a Telerik ListView, once it comes into existence in the future.
Sincerely yours,
Dimo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Chris
Top achievements
Rank 1
answered on 03 Oct 2009, 03:10 PM
Hello,
I've also run into several issues where I would like a Repeater / ListView with paging capability. Do you have an estimated time when this Telerik ListView is going to be released?
Also, I've been trying to search the forums but do you know if there's a known issue with integrating a RadTabStrip into the RadGrid when using the ListView implementation given in the demos? I had the ListView thing working fine then added a RadTabStrip and no more columns. I've started digging into the html, but I thought I'd post something on here anyway and now, I may just give up doing a ListView thing since it is kludgy.
0
Hello Chris,
You may be interested in the Q3 2009 Beta version of RadControls for ASP.NET AJAX, expected at the end of the next week, where we will introduce new RadListView and RadDataPager controls as part of the suite. I suggest you play with them and share with us your feedback concerning their object model and features. I hope that you will find it useful.
Regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
You may be interested in the Q3 2009 Beta version of RadControls for ASP.NET AJAX, expected at the end of the next week, where we will introduce new RadListView and RadDataPager controls as part of the suite. I suggest you play with them and share with us your feedback concerning their object model and features. I hope that you will find it useful.
Regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Chris
Top achievements
Rank 1
answered on 06 Oct 2009, 01:51 PM
Thanks Sebastian,
I will definitely check these out. I'm glad that these are coming out soon! The Grid is great, but there are also a number of cases where having a repeater with paging would save me a ton of time rather than doing the paging myself.
I'll also provide any feedback if there's anything that needs it.
Thanks,
Chris
