Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In my attempt to present multiple list data, I have ventured into the territory of the DVWP.

I have three lists A, B, C. Each of these lists are interrelated. When click the title from List A, I want to show data related to that row from list B. So I created a custom DispForm.aspx, added a Text Filter and Dataview Web Parts. I created a parameter in the DVWP that is written to based upon the text filter. Using jquery, I am writing to the hidden text filter and calling its change method (below). I added some handling to ensure I am only doing this once.

What I have now noticed is that the Page group in the ribbon is now not loading after I write to the text filter and call the change(). I recognize I am likely doing this wrong, so will accept any help in delving into this....Paging sympmarc? LOL

    $(document).ready(function(){
    var input = $('input[id$="SPTextSlicerValueTextControl"]');     
    if (input.val() == "") {
        var StoreNum = $("#tdStoreNumber").text();
        input.val(StoreNum);
        input.change();
        //alert(inputs);
    }       
});
share|improve this question

1 Answer 1

up vote 2 down vote accepted

It's not really clear what you're trying to do, but you may be having an issue because DVWPs are interpreted and rendered on the server, while script runs on the client side. Because of that, what you are writing into the filter may not have the effect you intend.

As for the ribbon thing, I'm not sure what's going on there or how it might be related.

EDIT based on clarifications below: Assuming that the notices have the ID of the facility as a column value, I think what you want to do is to add a parameter to your DVWP which grabs the ID for the facility from the Query String. Then you can filter the DVWP based on that value. You do this in the DVWP; no need for the Filter Web Part.

share|improve this answer
    
On my custom Display Form for a list item, I have the DataFormWebPart for that specific list. In addition, I have a Text Filter Web Part and a DataView Web Part, which pulls records from a related list. I am using jquery to populate the Text filter and call the onChange method. I have a connection between the text filter and the DVWP. Is there a better way to link the Data Form Web Part to the DVWP? –  websch01ar Jun 10 '11 at 11:24
    
I'm not sure that makes it any clearer. You've restated what you're doing technically, but I still can't picture what you're actually trying to accomplish. –  Marc D Anderson Jun 10 '11 at 12:05
    
I have a list Facilities and another Notices. Each facility may have a notice. When a user clicks the facility from the All Items view, I want to show any Notices that may exist in addition to the data for that specific facility. Any better? –  websch01ar Jun 10 '11 at 12:18
    
Absolutely. I added another idea above. –  Marc D Anderson Jun 10 '11 at 12:38
    
I did not have the ID in the Notices list, but I just added it and found where I was going wrong! Thanks for showing me the error of my ways Marc. –  websch01ar Jun 10 '11 at 12:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.