I tried different ways to set the width for my gridview clumns but nothing worked out for me. Can some one guide me about how o achieve ths. i am including my code below...
Thanks.
<SharePoint:SPGridView ID="gvSearchResults" EnableViewState="true" runat="server"
AlternatingRowStyle-BackColor="#f4f8fd" AllowSorting="true" DataKeyNames="ID"
AutoGenerateColumns="false" OnSorting="gvxxxResults_Sorting" OnPageIndexChanging="gvxxxResults_PageIndexChanging">
<Columns>
<asp:HyperLinkField HeaderText="Name" DataTextField="FileLeafRef"
DataNavigateUrlFields="FileLeafRef" Target="_parent" DataNavigateUrlFormatString="/pp/ll/lp/llDocs/{0}"
ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Wrap="false"
SortExpression="Name" ItemStyle-Width="50px" />
<asp:BoundField DataField="Home_x0020_Number" HeaderText="Home Number" NullDisplayText=" " SortExpression="Home_x0020_Number">
<HeaderStyle Width="150px" Wrap="false" HorizontalAlign="Left" />
<ItemStyle Width="150px" Wrap="false" HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="Phone_x0020_Number" HeaderText="Phone Number" NullDisplayText=" " SortExpression="Phone_x0020_Number">
<HeaderStyle Width="150px" Wrap="false" HorizontalAlign="Left" />
<ItemStyle Width="150px" Wrap="false" HorizontalAlign="Left" />
</asp:BoundField>
</Columns>
</SharePoint:SPGridView>
Have you tried using the SPBoundField control instead? Try setting the SPBoundField.ControlStyle.Width property.
Related
I'm building an automation that reads an excel file with two columns (name and date), stores this to a collection and then sends out calendar invites based on those same parameters.
Extracting the data and sending the invites are both working fine individually but what I need to do now is convert the column that contains the names into email address format e.g. 'Person One' into 'Person.One#emailaddress.com'.
Added to this some of the 'name' rows contain two people in the following format - 'Person One & Person Two' so I'd need to split them into two seperate email addresses so they can both receieve the calendar invite for the appropriate date.
I'm guessing that I should be looking to do this using something in the 'Utility - Strings' function? Can anyone point me in the right direction? Much appreciated, thanks
Rota Example
needs to become
New Collection
There are two major components you'll need to accomplish this conversion of a name to an email address:
Split the initial list of recipients on the & (space-ampersand-space) sequence.
For each of the recipients, calculate the e-mail address by replacing whitespaces with full stop (.) characters and appending the #email.com domain.
As such, your process would look similar to the following:
You can use this in your Blue Prism 6.9 environment by saving the following XML as a .bpprocess or .xml file and importing it using the File > Import > Process / Object menu option in the Blue Prism Interactive Client:
<process name="Test Process" version="1.0" bpversion="6.9.0.26970" narrative="" byrefcollection="true" preferredid="f848bd78-240d-4b87-82b4-ade6ea8e40d8">
<view>
<camerax>0</camerax>
<cameray>-21</cameray>
<zoom version="2">1.25</zoom>
</view>
<preconditions />
<endpoint narrative="" />
<stage stageid="81bc6e0a-2151-4fae-80d7-3ad8d2d9826a" name="Start" type="Start">
<display x="15" y="-105" />
<onsuccess>69469193-4784-4519-bd10-974fb3d7e1da</onsuccess>
</stage>
<stage stageid="b527e78b-915b-4498-bf59-5f662104bb9d" name="End" type="End">
<display x="15" y="165" />
</stage>
<stage stageid="92f4087e-5cdf-41a1-a889-088d7ef7c469" name="Stage1" type="ProcessInfo">
<display x="-195" y="-105" w="150" h="90" />
</stage>
<stage stageid="f9d08d9a-ac87-4c6b-8aa9-2dc864ce8d8d" name="Input" type="Block">
<loginhibit onsuccess="true" />
<display x="-270" y="-45" w="150" h="60" />
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="9fd57578-1b94-43f5-989e-f0fac142744f" name="Recipients" type="Data">
<loginhibit onsuccess="true" />
<display x="-195" y="-15" w="150" h="30" />
<datatype>text</datatype>
<initialvalue xml:space="preserve">Person One</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="5ea9beac-25e7-4560-9253-28706cf4f247" name="Output" type="Block">
<loginhibit onsuccess="true" />
<display x="-270" y="30" w="150" h="90" />
<font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
</stage>
<stage stageid="71130d29-3d68-4809-809f-11429da8ca1d" name="Recipient Contacts" type="Collection">
<display x="-195" y="75" w="150" h="60" />
<datatype>collection</datatype>
<private />
<alwaysinit />
<collectioninfo>
<field name="Name" type="text" />
<field name="Email" type="text" />
</collectioninfo>
</stage>
<stage stageid="69469193-4784-4519-bd10-974fb3d7e1da" name="Utility - Strings::Split Text" type="Action">
<loginhibit onsuccess="true" />
<display x="15" y="-60" w="120" h="30" />
<inputs>
<input type="text" name="Text to Split" friendlyname="Text to Split" narrative="The text to split" expr="[Recipients]" />
<input type="text" name="Split Char" friendlyname="Split Char" narrative="The split delimiter" expr="" & "" />
<input type="text" name="Collection Field Name" friendlyname="Collection Field Name" narrative="The name of the field for the resulting collection" expr=""Name"" />
</inputs>
<outputs>
<output type="collection" name="Split Values" friendlyname="Split Values" narrative="The resulting collection containing the split values" stage="Split Values" />
</outputs>
<onsuccess>fe157559-e2e0-4a5d-95b7-4681fc9089ce</onsuccess>
<resource object="Utility - Strings" action="Split Text" />
</stage>
<stage stageid="54353e0c-0125-4a3f-9870-8adc655e82a1" name="Split Values" type="Collection">
<display x="165" y="-60" w="90" h="60" />
<datatype>collection</datatype>
<private />
<alwaysinit />
</stage>
<stage stageid="fe157559-e2e0-4a5d-95b7-4681fc9089ce" name="Loop Split Values" type="LoopStart">
<loginhibit onsuccess="true" />
<display x="15" y="-15" w="150" h="30" />
<onsuccess>1f522616-2dbf-4355-97f1-082fa9a00406</onsuccess>
<groupid>31b533a9-c80b-49d2-bba7-2fa7f270cd72</groupid>
<looptype>ForEach</looptype>
<loopdata>Split Values</loopdata>
</stage>
<stage stageid="174f331c-b597-4053-aba2-e65f3f054f7c" name="Loop Split Values" type="LoopEnd">
<loginhibit onsuccess="true" />
<display x="15" y="120" w="150" h="30" />
<onsuccess>b527e78b-915b-4498-bf59-5f662104bb9d</onsuccess>
<groupid>31b533a9-c80b-49d2-bba7-2fa7f270cd72</groupid>
</stage>
<stage stageid="1f522616-2dbf-4355-97f1-082fa9a00406" name="Add Row to Output Collection" type="Action">
<loginhibit onsuccess="true" />
<display x="15" y="30" w="120" h="30" />
<inputs>
<input type="text" name="Collection Name" friendlyname="Collection Name" narrative="The name of the collection to act upon" expr=""Recipient Contacts"" />
</inputs>
<onsuccess>6547bfb9-ae7e-4735-96b4-07fbca2678f0</onsuccess>
<resource object="Blueprism.AutomateProcessCore.clsCollectionActions" action="Add Row" />
</stage>
<stage stageid="6547bfb9-ae7e-4735-96b4-07fbca2678f0" name="Store Name and Calculated Email for Recipient" type="MultipleCalculation">
<loginhibit onsuccess="true" />
<display x="15" y="75" w="120" h="30" />
<onsuccess>174f331c-b597-4053-aba2-e65f3f054f7c</onsuccess>
<steps>
<calculation expression="[Split Values.Name]" stage="Recipient Contacts.Name" />
<calculation expression="Replace([Split Values.Name], " ", ".") & "#email.com"" stage="Recipient Contacts.Email" />
</steps>
</stage>
</process>
I have master child relationship form.
In child form, I have a Grid, I want my own "Insert" functionality so i just disabled "AddNew" Grid action button and Add new Custom button,
Now what i want
In custom Add button, I am calling child.Insert() method to add row,
Now i can see added row in Grid,
I want to update added row using Detail form, not using Grid row so i added a Formview, below of Grid
In formview i want to show inserted row detail, it is showing the current added row.
On selection of Grid row, I want to show detail in detail Grid
If user edit the detail then i wanted to show all edit detail in the Grid,
so similarly user can add/edit multiple rows using detail form, How may i achieve this?
After adding a row, If i want to add another row then on click add button getting unsaved data error, How may i achieve above functionality?
<px:PXFormView ID="rootCauseanaDataTab" runat="server" Width="100%" DataMember="MyData"
DataSourceID="ds" SkinID="Transparent">
<Template>
<px:PXLayoutRule runat="server" StartRow="true" StartColumn="True" LabelsWidth="SM" ControlSize="XM"></px:PXLayoutRule>
<px:PXButton ID="pxAddNew" runat="server" CommandName="AddNewData" CommandSourceID="ds" Text="Add Rootcause"></px:PXButton>
<px:PXLayoutRule runat="server" StartRow="true" StartColumn="True" LabelsWidth="SM" ControlSize="XM"></px:PXLayoutRule>
<px:PXSelector ID="edRootId" runat="server" AlreadyLocalized="False" DataField="CauseId" AutoRefresh="true">
</px:PXSelector>
<px:PXRichTextEdit ID="edRootCauseDesc" runat="server" AlreadyLocalized="False" DataField="Description">
</px:PXRichTextEdit>
</Template>
</px:PXFormView>
<px:PXGrid ID="PXGridNCTranRootCauseanaData" RepaintColumns="true" runat="server" Caption="Root Cause anaData" DataSourceID="ds" Height="150px" Width="100%" SkinID="Details" SyncPosition="true">
<ActionBar>
<Actions>
<AddNew Enabled="false" />
</Actions>
</ActionBar>
<Levels>
<px:PXGridLevel DataKeyNames="CauseId" DataMember="MyData">
<RowTemplate>
<px:PXLayoutRule runat="server" ControlSize="XM" LabelsWidth="M" StartColumn="True" />
<px:PXSelector ID="gdRootcauseId" runat="server" AllowEdit="true" AlreadyLocalized="False" DataField="RootCauseId" AutoRefresh="true">
</px:PXSelector>
<px:PXSelector ID="gdanaDataPerformedBy" AllowEdit="true" runat="server" AlreadyLocalized="False" DataField="anaDataPerformedBy" AutoRefresh="true">
</px:PXSelector>
</RowTemplate>
<Columns>
<px:PXGridColumn DataField="CauseId" TextAlign="Left" Width="135px" />
<px:PXGridColumn DataField="Description" Width="80px" />
</Columns>
</px:PXGridLevel>
</Levels>
<AutoCallBack Target="tree" Command="Refresh" ActiveBehavior="True">
<Behavior RepaintControlsIDs="rootCauseanaDataTab"></Behavior>
</AutoCallBack>
</px:PXGrid>
Regarding your issue that the form is not being refreshed I noticed that your Target is set as Tree, can you try changing that to rootCauseanaDataTab as well? And also try adding BlockPage="True" CommitChanges="True"
Sample Code:
<AutoCallBack Target="rootCauseanaDataTab" Command="Refresh" ActiveBehavior="True">
<Behavior RepaintControlsIDs="rootCauseanaDataTab" BlockPage="True" CommitChanges="True"></Behavior>
</AutoCallBack>
Am trying to bring Two grids in one tab in Acumatica base sales order screen
Like below show
Ex:In custom PAX tab with "Passengers" grid and "Flights" grid by using Split container
enter image description here
Can anyone suggest me.
You need to add a PXSplitContainer with the split bar set to Vertical orientation.
ASPX Code:
<px:PXTabItem>
<Template>
<px:PXSplitContainer runat="server" Orientation="Vertical" SplitterPosition="640" ID="gridContainer" Height="100%" Width="100%" BorderWidth="14px" BorderStyle="Solid" BorderColor="Transparent" AllowResize="True">
<AutoSize Enabled="True" Container="Parent" />
<Template1>
<px:PXGrid runat="server" ID="gridLeft" Height="100%" SkinID="Details" Caption="Left Grid Caption" CaptionVisible="True" Width="640px" SyncPosition="True" Style='height:100%;width:100%;'>
<Levels>
<px:PXGridLevel DataMember="LeftDataView">
<Columns>
<px:PXGridColumn DataField="columnX" />
<px:PXGridColumn DataField="columnY" />
<px:PXGridColumn DataField="columnZ" />
</Columns>
</px:PXGridLevel>
</Levels>
</px:PXGrid>
</Template1>
<Template2>
<px:PXGrid runat="server" ID="gridRight" Height="100%" SkinID="Inquire" Caption="Right Grid Caption" CaptionVisible="True" Width="100%" SyncPosition="True" Style='width:100%;height:100%;'>
<Levels>
<px:PXGridLevel DataMember="RightDataView">
<Columns>
<px:PXGridColumn DataField="columnX" />
<px:PXGridColumn DataField="columnY" />
<px:PXGridColumn DataField="columnZ" />
</Columns>
</px:PXGridLevel>
</Levels>
</px:PXGrid>
</Template2>
</px:PXSplitContainer>
</Template>
</px:PXTabItem>
It is easier to make these kind of modifications using EDIT ASPX feature.
Additional information on adding Split Containers can be found here:
https://asiablog.acumatica.com/2018/05/split-container-in-browser.html
This question is about p:dataTable header manipulation.
I want to find a way to manipulate the header p:dataTable (primefaces) from java code directly, to make something like this:
<p:dataTable id="genericReport" value="#{mb.lazyData}" >
<!-- header -->
<p:columnGroup type="header" binding="#{mb.header}" >
</p:columnGroup>
<!-- some data -->
<p:column>
<h:outputText value="..." />
</p:column>
</p:dataTable>
Where #{mb.header}" is a java code read from a XML, manipulated by a tree through XPath.
I want to do this because I have a lot of reports with a complex header; I mean, diferents levels, diferents conbination of cells.
UPDATE
The header could be with a lot of rows, not only one. Here is an example of a a table.
This header has to be generated by an xml configuration. Here is the XML.
<header id="report">
<column text="Granpa Pather">
<column text="Pather 1">
<column text="Child 1">
<column text="Grand Child 1" />
<column text="Grand Child 2" />
</column>
<column text="Child 2" />
<column text="Child 3" />
</column>
<column text="Pather 2">
<column text="Child 4" />
<column text="Child 5" />
</column>
<column text="Pather 3">
<column text="Child 6" />
<column text="Child 7" />
<column text="Child 8" />
</column>
</column>
</encabezado
The colspan and rowspan is calculated by tree theory, it is not the problem.
I achievement to do this in a PDF y XLS (Itext and ApachePOI, respectly), using XPath and tree manipulation. My problem here is that HTML it is not so easy to manipulate. I think it could be to make using the API Primefaces.
I've a boolean variable in my view-state:
<set name="flowScope.render" value="false" type="java.lang.Boolean" />
Now i render a commandButton with this variable
<p:commandButton value="Show Dates"
rendered="#{!render}"
update="table1,buttons" />
Now i want to change the value of the variable with a click on this commandButton. I tried the setPropertyActionListener, but it doesn't work:
<p:commandButton value="Show Dates" rendered="#{!render}" update="table1,buttons">
<f:setPropertyActionListener value="true" target="#{render}" />
</p:commandButton>
I don't find much about how to change the value. So how is this possible?
Now i figured it out.
I must work with transitions. In the same view-state where the variable is set, there i define two transitions:
<transition on="rendertrue">
<set name="flowScope.render" value="true" type="java.lang.Boolean" />
</transition>
<transition on="renderfalse">
<set name="flowScope.render" value="false" type="java.lang.Boolean" />
</transition>
I don't change the value of the exist variable, i just overwrite it. If this is the best or cleanes solution, i don't know, but it works.
Now i call the specific transition with the action statement in the commandButton:
<p:commandButton value="Show Date"
rendered="#{!render}" update="table1,buttons"
action="rendertrue" />
<p:commandButton value="Hide Date"
rendered="#{render}" update="table1,buttons"
action="renderfalse" />