Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Dec 22, 2011 @ 07:24
    Markus Johansson
    0

    ListView inside a umb:Pane

    Hi all!

    Yesterday I almost started to cry because I was about to make a simple grid (in form of a ListView) with update functions on one om my custom backoffice pages for Umbraco.

    I created this nice ListView inside of a "umbraco pane" to keep the design consistent.

    Everything worked fine, the OnItemEditding-event was fired, but after the edit, when the OnItemUpdated or the OnItemCommand for that matter was supposed to get fired nothing happend. I made tests, I tripple checked everything and could't find the problem.

    I woke up this morning and after a closer look it stricked me that the pane and the tabview could have something to do with this. I moved my ListView outside the pane and removed the tab. Wola!!!

    I'm woundering, is this normal? I think it has something to do with the tabview that plays around with the controls on the page but I haven't look closer at it. Anyone else experianced the same? How did you solve it? I want to keep the tabview and the panes!

    / Markus

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Dec 22, 2011 @ 08:26
    Jeroen Breuer
    0

    How do you add you tabview and pane? I've created several ListViews in my custom section an everything works. Have a look at this wiki for an example on how to use these controls: http://our.umbraco.org/wiki/reference/umbraco-best-practices/standard-ui-controls/umbracouicontrols-page-samples.

    Jeroen

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Dec 22, 2011 @ 08:39
    Markus Johansson
    0

    It's in the code of the aspx-file. Some stuff work, but some dosen't. The listing of the ItemTemplates works fine!

    But when the control is performing postbacks some events never fires. And the fact that it works great after I moved the control out of the pane indicates to me that it has something to do with the TabView that interupes the creation of the controls on the page. Jeroen, are you updating the content in the listview? are you using the EditItemIndex-property?

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Dec 22, 2011 @ 08:43
    Jeroen Breuer
    0

    No I don't update data in the Listview so I can't test that, but it does support paging. So it does a postback with paging and it works fine. Do you do everything the same as in that wiki?

    Jeroen

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Dec 22, 2011 @ 08:57
    Markus Johansson
    0

    Yes I have looked at the wiki and thats basic stuff about having a custom backoffice page, thats not the problem. The problem is that the events is not fireing as the should.

    I think its becuse the control is added/removed to the page by the tabview in some way but I haven't have the time to look at the source code. So pageing seems to work, I havet test that but the first postback, the "Edit"-command fires of the OnItemEditing-event and the ListView goes into "edit mode". But when the "Update"-button with the command "Update" is clicked the page postbacks, the listview goes back to "ItemTemplate", but no event is fired.

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Dec 22, 2011 @ 08:58
    Markus Johansson
    0

    Yes I have looked at the wiki and thats basic stuff about having a custom backoffice page, thats not the problem. The problem is that the events is not fireing as the should.

    I think its becuse the control is added/removed to the page by the tabview in some way but I haven't have the time to look at the source code. So pageing seems to work, I havet test that but the first postback, the "Edit"-command fires of the OnItemEditing-event and the ListView goes into "edit mode". But when the "Update"-button with the command "Update" is clicked the page postbacks, the listview goes back to "ItemTemplate", but no event is fired.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Dec 22, 2011 @ 09:05
    Jeroen Breuer
    0

    Sorry I don't know why that might happen. I never use the edit mode. I have an overview page and a detail page. The detail page has the default Umbraco ui and is always in edit mode. That way it's consistent with how Umbraco works everywhere.

    Jeroen

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Dec 22, 2011 @ 09:20
    Markus Johansson
    0

    I think it may have something to do with the TabPage-class that overrides the render-method and renders the page it self. Anyone else experianced the same thing?

  • Peter Mason 20 posts 40 karma points
    Apr 19, 2012 @ 01:54
    Peter Mason
    0

    I wonder if this was solved? I have the same problem - events are not returned from the listview (example, _ItemCommand, _ItemUpdating) when it is in edit mode. I can delete and add new records OK.

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Apr 19, 2012 @ 09:23
    Markus Johansson
    0

    Hi Peter!

    No I did not have any succes in this issue. I've seen people implementing there own logic for generating the html-structur for the tabs myself I solved it by handwriting the html/javascript thats needed to avoid the tab-control från umbraco.uicontrols (it's the tabcontrol that messes it). Have a look at the "Subscription.aspx" file in my Newsletter Studio packge: http://our.umbraco.org/projects/backoffice-extensions/newsletter-studio

    // M

  • Peter Mason 20 posts 40 karma points
    Apr 24, 2012 @ 05:23
    Peter Mason
    0

    Markus,

    Thanks for the reply and suggestion to look at "Subscription.aspx". It looks like you're doing the whole thing with divs and not using the tab view.

    This looks like the solution for those who need a Listview with edit capabilities in a tabview.

    Your package doesn't have the code behind so to get your solution up and running would take me too long.

    In our case edit functionality is not essential as the user can simply delete a record and then re-add it (only two fields to each row).

    I was just curious why the edit functionality of the Listview didn't "just work".

    Thanks again for your help and useful suggestion.

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Apr 24, 2012 @ 07:03
    Markus Johansson
    0

    Yes, like I said it's a dirty solution but the fastes one I could come up with at that time and allt the control events on the listview was needed for my solution to work.

    / M

Please Sign in or register to post replies

Write your reply to:

Draft