In my application i have used WebDataGrid Infragistics control. I have total 5 columns(Status,CandidateName,WorkOrderId,VenderName,Rate) in this grid. I needed to apply filter on 2 columns only i.e; Status and CandidateName. I have explicitly write code to set filter only in 2 columns. Below is my code. But, the problem is, Filter is applying on all the 5 columns regardless of setting the filter explicitly.
<ColumnFilters>
<ig:ColumnFilter ColumnKey="Status">
<ConditionWrapper>
<ig:RuleTextNode Rule="Contains" />
</ConditionWrapper>
</ig:ColumnFilter>
<ig:ColumnFilter ColumnKey="CandidateName">
<ConditionWrapper>
<ig:RuleTextNode Rule="Contains" />
</ConditionWrapper>
</ig:ColumnFilter>
</ColumnFilters>
Please any one can tell me how to apply filter only on specific columns defined explicitly.
Thanks in Advance !!!!
You should be able to disable the other columns by setting Enabled=false as follows:
<Behaviors>
<ig:Filtering>
<ColumnSettings>
<ig:ColumnFilteringSetting ColumnKey="WorkOrderId" Enabled="false" />
<ig:ColumnFilteringSetting ColumnKey="VenderName" Enabled="false" />
<ig:ColumnFilteringSetting ColumnKey="Rate" Enabled="false" />
</ColumnSettings>
</ig:Filtering>
</Behaviors>
Related
We have Sterling B2B Integrator for our EDI processing. I have a need to add the date to a file name, however, I need to assign yesterday's date and have not found a good option. I'm too new to xslt to figure it out.
It is in xlst 1.0. It looks like we have a date extension - xmlns:date="http://exslt.org/dates-and-times
I have this set up in our style sheet which works to give me the date for when it's run. Any non complex suggestions on how to get this to be yesterday's date?
<xsl:variable name="CUSTOM4">
<xsl:value-of select="date:format-date(date:date(),'yyyyMMdd')"/>
</xsl:variable>
I found this link to help your question.I think this is the one what you need to get privious day.
http://www.xsltfunctions.com/xsl/functx_previous-day.html
Good Luck !
You might have better luck computing the date using a BP then injecting it as a parameter to the XSLT
Here is a BP fragment:
<operation name="PreviousDay">
<participant name="TimestampUtilService"/>
<output message="TimestampUtilServiceArgs">
<assign to="." from="*"></assign>
<assign to="action">add</assign>
<assign to="baseTime">now</assign>
<assign to="format">yyyyMMdd</assign>
<assign to="offsetTime">-1</assign>
<assign to="scale">day</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
I have the below xsl tag
<RectypeLegType>
<xsl:value-of select="../#id" />
</RectypeLegType>
and there can be two possible out come values of this as shown below..
1) <RectypeLegType>fixedLeg_612822</RectypeLegType>
2)<RectypeLegType>floatingLeg_194743</RectypeLegType>
but i want this value to be dispalyed as
<RectypeLegType>fixedLeg</RectypeLegType>
<RectypeLegType>floatingLeg</RectypeLegType>
now please advise how can i achieve this possible outcome i need to do cheanges in my please advise what changes need to be done
Assuming the underscore will always exist in the id attribute:
<RectypeLegType>
<xsl:value-of select="substring-before(../#id, '_')" />
</RectypeLegType>
I would like to limit the x-axis of my chart that is created by cfchart. I see the attribute scaleFrom and scaleTo that limit the y-axis, but I see nothing that limits the x-axis.
Also, I saw a similar question here:
ColdFusion Chart x-axis label limits
but neither of the answers were appropriate. ScaleMin and ScaleMax do not exists as far as I can tell and the other answer is more complicated than what I'd like to do.
The scaleMin and scaleMax attributes Saul mentioned are only available when using a custom style. Note, using type "scale" means your xAxis values must be numeric. If you want to use strings, you will probably need to use Ben's approach instead.
Here is a quick example that creates a chart with 24 points on the xAxis. Even though the query only contains the first six (6) points.
<!--- bare bones style --->
<cfsavecontent variable="style">
<?xml version="1.0" encoding="UTF-8"?>
<frameChart is3D="false" isInterpolated="true">
<frame xDepth="3" yDepth="1" />
<xAxis type="Scale" scaleMin="0" scaleMax="24" labelCount="25" isBucketed="false" />
</frameChart>
</cfsavecontent>
<!--- sample query --->
<cfset qry = queryNew("")>
<cfset queryAddColumn(qry, "xValue", listToArray("1,2,3,4,5,6"))>
<cfset queryAddColumn(qry, "yValue", listToArray("30,15,22,14,45,5"))>
<!--- chart code --->
<cfchart format="jpg" style="#style#" width="600">
<cfchartseries type="line"
markerstyle="circle"
query="qry"
itemColumn="xValue"
valueColumn="yValue" />
</cfchart>
We have in input an XML like following:
<R>
<MT N="folder" V="Folder1\Subfolder1" />
<MT N="folder" V="Folder2xx\Subfolder1" />
<MT N="folder" V="Folder3yyyy\Subfolder1" />
<MT N="folder" V="Folder4zzzz\Subfolder1" />
</R>
In our XSLT that performs the display, the entry:
<xsl:value-of select="MT[#N='folder']/#V"/>
displays:
Folder1\Subfolder1 Folder2xx\Subfolder1 Folder3yyyy\Subfolder1 Folder4zzzz\Subfolder1
What we need to achieve is to select the unique entry who starts with a pre-defined configurable list of strings, e.g. if our pre-defined list is
Folder2xx, Folder18ppp, Folder212aaa
I would like to display as output only
Folder2xx\Subfolder1
The optimal thing would be even:
Folder2xx\Subfolder1 (linked 3 times)
but I would really appreciate help on the selection of the unique element.
That is unfortunately too complex for my knowledge on XSLT, can someone please help?
Our system supports XSLT 2.0 and XPATH 2.0
thanks a lot!
Mario
Use:
MT[#N='folder']
/#V[substring-before(.,'\')
=
('Folder2xx', 'Folder18ppp', 'Folder212aaa')
]
I have the following codes in my page.
The style variable holds the custom style.
<cfchart chartheight="450" chartwidth="550" gridlines="9" yaxistitle="Score" scalefrom="20" scaleto="100" style="#style#" format="png" >
<cfchartseries query="variables.chart_query" type="scatter" seriescolor="##000000" itemcolumn="MyItem" valuecolumn="MyScore"/>
</cfchart>
Before I begin, please see chart_good.jpg. This is how I want my report to come up. On the x-axis, there will always be three items as long as at least one of them has values. If an item does not have any values (i.e. 2010), there would not be a marker in the chart.
The problem occurs only when only one item has value. Please see chart_bad.jpg. As you can see, 2008 and 2010 do not have any values; y-axis is now scaled from 0 to 100. I have tried setting one of the items (ex. 2008) a value of 0 or something off the chart; it would scale according to this off-the-chart value and the 2009 value. In short, I have to have at least two items with values between 20 and 100 in order for cfchart to scale from 20 to 100.
My question is, how can I correct the issue so that cfchart would ALWAYS scale from 20 to 100? I am running CF9.
What is inside your style variable?
I would suggest not using scaleFrom="" and scaleTo="" in the cfchart tag as they can be buggy sometimes. I believe that Coldfusion's cfchart tag attempts to scale the chart automatically to what it deems the best fit. Instead I would build the chart's minimum and maximum scales inside a frameChart tag.
Example of a style variable to build a chart
<cfsavecontent variable="style">
<?xml version="1.0" encoding="UTF-8"?>
<frameChart is3D="false" font="Arial-11-bold">
<frame xDepth="0" yDepth="0" outline="black" lightColor="#CCCCCC" darkColor="#CCCCCC"
wallColor="#CCCCCC" frameSize="5" dashSize="3" gridColor="#333333">
<background type="HorizontalGradient" maxColor="#828EB0"/>
</frame>
<!--- THE BREAD AND BUTTER
NOTE: if you use variables for the scaleMin and scaleMax
make sure to surround them with a cfoutput tag
--->
<yAxis scaleMin="20" scaleMax="100">
<!--- --------------------- --->
<labelFormat style="Currency" pattern="#,##0"/>
<parseFormat pattern="#,##0"/>
<titleStyle></titleStyle>
</yAxis>
<legend allowSpan="true" isVisible="false" placement="Bottom" valign="Bottom" foreground="black"
isMultiline="true">
<decoration style="None"/>
</legend>
<elements outline="black" shapeSize="40"/>
<popup background="#748BA6" foreground="white"/>
<paint palette="Modern" paint="Plain" isVertical="true"/>
<insets right="5"/>
</frameChart>
</cfsavecontent>
Then all you have to do is load the variable into the style attribute like you already mentioned.
<cfchart format="png" chartWidth="550" chartHeight="175" style="#style#">
Also a great resource to use, is the Webcharts program that will be in your C:/coldfusion/charting/ directory. Just open webcharts.bat, create your custom chart, copy the xml code into your style variable, and voila!
Make sure to remove the scaleTo= and scaleFrom= from your cfchart tag if you decide to go this route.