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

Good day

I need to set default value for ParameterBinding of DVWP as follows:

  <ParameterBinding Name="StartDate" Location="Postback;Connection;" DefaultValue="2012-07-01T00:00:00Z"/>
  <ParameterBinding Name="EndDate" Location="Postback;Connection;" DefaultValue="2012-09-30T00:00:00Z"/>

I want this defaul value change programmatically depending on quarter of the year. I use javascript function on page load where i get first and last day of the Quarter. But i have no idea how to send these paramenters to DVWP not using Query variable

When i use __doPostBack(WP, ) the page reloads endless :))) Can ECMAscript object model access these parameters and change it?

Do you have any idea?

Thank you!

share|improve this question
1  
Lena, can you use Query string parameters to send the required default dates in URL ? –  Arsalan Adam Khatri Oct 16 '12 at 12:08
    
well, i'm not sure, i'd like to use just like postback parameter. How to use as query string parameters via javascript? –  Lena Oct 17 '12 at 4:39
    
Yes, via javascript you can send parameters as Query String and then use those parameters in Binding... –  Arsalan Adam Khatri Oct 17 '12 at 7:56
    
You can have a look here, I have used Content Editor Web Part to take input the text parameters and send them as Query String and filter the XSLTListViewWebPart... You can skip the external list part... –  Arsalan Adam Khatri Oct 17 '12 at 8:13
    
Thanx, I see) Frankly speaking, when you suggested me to use QueryString, I've already done some Ecmascripts (where i get webpart ID) and _doPostBack for applying filters. I didn't want filter parameters show up in URL string. But now I decided to do like you, i used Query String Filter after window.location.href..... Thak you for idea ) –  Lena Oct 17 '12 at 11:16
show 1 more comment

1 Answer 1

up vote 1 down vote accepted

Lena,

Can you use Query string parameters to send the required default dates in URL ?

If yes, You can have a look here, I have used Content Editor Web Part to take input the text parameters and send them as Query String and filter the XSLTListViewWebPart... You can skip the external list part...

share|improve this answer
    
Oh!! So many thanks! even if it doesn't make sence for your reputation))) ha-ha)))) :P –  Lena Oct 18 '12 at 3:26
    
hehe, you are most welcome.. if we were sharing the location, I might have asked you for a dinner or lunch.. but since we are living in different countries - marking as answer will serve the purpose :P –  Arsalan Adam Khatri Oct 18 '12 at 12:03
    
@Arsalan - please stop using signatures, see sharepoint.stackexchange.com/faq#signatures –  Ryan Oct 23 '12 at 8:22
1  
@Ryan, okay I won't be using from now onwards! :) –  Arsalan Adam Khatri Oct 23 '12 at 8:25
add comment

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.