 |
|
|
Control means you just drag & drop with .dll in your bin. But here you need to implement class. But idea is nice. Appreciate.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
act i wld like to know how to format the rows of the repeater control in asp.net where the rows of the table are dispalyed as list.. and also i need to hide certain columns when the particular row does not contain any data...........
plz its urgent could any1 help me a round.........
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
The lastvalue property is compared against the current dataitem during databind, and used to determine whether a group header/footer is required. Unfortunately, while it is set to null at CreateChildControls(), this does not guarantee that lastvalue is null if and when a rebind occurs. If the repeater is rebound after the initial databind, an extra group footer appears and child control numbering in the repeater gets out of whack. This in turn messes with the repeater's ItemCommand event such that ItemCommand event does not fire when a child control is clicked.
My fix: set lastvalue to null ondatabinding, e.g.
public GroupingRepeater() { ItemCreated += GroupingRepeater_ItemCreated; DataBinding += GroupingRepeater_DataBinding; }
private void GroupingRepeater_DataBinding(object sender, EventArgs e) { lastvalue = null; }
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
While you are exactly right, this bug only shows if you rebind the contents twice in a single postback, right? Anyway, I would suggest to overload the DataBind() method like so:
public override DataBind() { lastvalue = null; base.DataBind(); }
Thanks for your insight.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
your code sample declares GroupingRepeater as public class GroupingRepeater : System.Web.UI.Control, INamingContainer while this page declares it as public class GroupingRepeater : System.Web.UI.WebControls.Repeater
why is that so ?
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
Hi, couple questions: With GroupingRepeater : System.Web.UI.Control, INamingContainer: - How do you implement the Items property of GroupingRepeater? - Does it have to inherit from ICollection and IEnumerable also? - What needs to be implemented in order to make it a repeater replacement? Thanks
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
This is exactly what I've been looking forn unfortunately I cant seem to get it working. I am new to ASP.Net and have a simple five column repeater control that I want grouped by the second column. I just cannot figure out how to make the download work as an example.
I am trying to copy and paste the code behind the forms and I get compile errors. Can someone help me with this?
|
| Sign In·View Thread·PermaLink | 2.00/5 (3 votes) |
|
|
|
 |
|
|
Does anyone have this control as a compiled DLL. I'm unable to compile it using csc and do not use Visual Studio for my website.
|
| Sign In·View Thread·PermaLink | 2.00/5 (2 votes) |
|
|
|
 |
|
|
I'm having trouble making this work. The "downloadable" demo code is not complete. It only has Assembley.Info and an empty bin folder. Am I missing something? This control looks great, and I'm sure allot of the problem is my lack of experience.
David W. Hainsworth
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Items.Count does not appear to work inside this control.
For instance, say I have a recordset with 30 items in it and that I bind this data to the GroupingRepeater control.
Also assume that four of these items will be grabbed as GroupHeader items via a customer Comparer object.
This makes for 30 records, plus 4 GroupHeader items, making 34 total items.
However, if you call the Items.Count property then it returns a value of 30. This 30, when looped through refers to the first 30 items, INCLUDING the GroupHeader items. Which results in the last 4 records magically inaccessible.
Any thoughts on how to fix this?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I'm aware of this problem. My approach to a grouping repeater does have some terrible side effects, and this is one of them. It has something to do with me inserting additional items on the fly. This is also shown when you use controls in the templates that generate postback events.
I do not see a solution how to fix this, other than developing an entirely different control.
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
It seems that on each Postback (if I dont't rebind the GroupedRepeater) al GroupHeader-Items get normal Repeater Items. Does anyone have a solution to this already?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I have an updated version of this control which does not have this bug.. Send me a note when you're interested.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Although the article text hasn't changed, I've updated the download so that this bug is fixed! Good luck!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Scenario: a blog application with items grouped by day, every item with a linkbutton, the grouprepeater element with onItemCommand event handler to fires the linkbuttons click. Only the pair groups (the 2nd, the 4th, the 6th and so on) items event are fired. Repeater output example:
--day1-- item1 (with linkbutton) item2 (with linkbutton) --day2-- item1 (with linkbutton) item2 (with linkbutton) --day3-- item1 (with linkbutton) item2 (with linkbutton) --day4-- item1 (with linkbutton) item2 (with linkbutton)
Only day2 and day4 item's linkbuttons are fired in the itemCommand eventhandler. What's wrong?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
To be honest, I haven't actually tried this control with postbacking controls myself.. Could you please send me some of your code so I can test it out?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I've found another solution and change some code, now I've tried to re-create the problem without success... Probably my mistake Joe
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
I am also seeing some problem with onItemCommand not firing for every item, it seems to fire for some but not others, sometimes two out of a group of three will work, other times, a group with a single item will not fire the event, but the postback occurs..
any ideas on why this is occuring?
thanks
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
It seems like injecting rows into a databound object may not result in expected behaviour.. It looks like the injected rows receive misplaced events (e.g. if a row is injected between row 1 and 2, row 2 effectively becomes row 3. In case an event needs to be fired, it is sent to the wrong row.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I have developed a more elaborate version of the grouping repeater control that DOES work correctly with postbacking controls. As soon as I find out how to update this article, i will upload it along with its documentation.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Please can you post the updated control? It really would be nice to have that bug fixed as strange things currently happen when I try to do postbacks with controls.
thanks and great job on the control Rob!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Did this change ever get implemented? I just downloaded the code, but the notes mention that the control has a bug that will not allow it work with postbacks. I originally had a grouped repeater containing linkbuttons to direct use, but the events never fired. I just wanted to make sure I didn't miss another update.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |