Here are the ways which we can solve the problem.
1) Code 2) NoCode
Code path: we can create a custom webpart with link buttons and do a CAML query to our list and bind it to a grid on click of link button.
NoCode:
a) Query String b) Standard filters
I'm giving the steps using Standard filters.
1) Need a list with glossary items.
2) create a view which sorts by glossaryValue
3) create a calculated column which will take the first letter, Call the column name as FilterAlpha (paste this in your formula =LEFT([glossaryValue], 1)
4) create a wiki page
5) select two columns with header and footer layout.
6) Insert your list webpart in footer and select the view which you created in 2nd step.
7) Insert HTML Form Webpart in header.
8) copy paste the below code in source editor of HTML Form Webpart and modify the script tag and add the tags to the input types.
scrip.. function passAlpha(num) { document.getElementById("result").value=num; javascript:_SFSUBMIT_ } ..scrip..
input type="button" value="A" onclick="passAlpha(this.value)" input type="button" value="B" onclick="passAlpha(this.value)"
9) on the html form webpart under edit webpart select edit connections -> Provider form values to -> select your list view webpart.
10) under choose connection tab select connect type as "Get Filter Values From"
11) click on configure
12) select provider field name as "T1".
13) select consumer field name as "FilterAlpha " this is the calculated field which you created in 3rd step.
14) click on save and close page.
you should see your expected result now.. :). I did a filter by clicking on "S". If you know Jquery and CSS you can do lot of fun things..like rendering your list view as well as styling your buttons..
4 comments:
Rendering a list view means ? I know a little bit of css so can play with custom styles of the buttons
Rendering means how you display the list to the users.
Hi, thank you very much for posting this solution. I still cannot make it work to pass the value to the input buttons
This would be great if I could make it work. Can you provide an example of the whole script? I don't know what you mean by modify the script tag and add tags to the input types? Thank you.
Post a Comment