Option to hide columns completely on an extnet GridPanel - user-controls

I was using this based on a condition
GridPanelName.ColumnModel.SetHidden([ColumnIndex], true)
while I was working on something else, I noticed that when I click on the sorting menu arrow on a column header, under the columns I can put a tick next to the "hidden" column and it becomes visible again.
Is there a way for not showing columns except hidden, someway a curious user can not walk around ?

Try this on client side:
<ext:Column ID="ColumnID" runat="server" Text="ID" DataIndex="ID" Width="100" Visible="false" />

Related

p:selectBooleanCheckbox *look only* shifted after adding a row to a p:dataTable

I have a p:dataTable. In this table, I have a checkbox in a column. This is the code:
<p:selectBooleanCheckbox
value="#{var.selected}"
itemLabel="#{var.description}"
/>
After I add a row and update the whole table, the selected checkboxes after the row inserted have the checks shifted up! But it's only a graphical problem! The checkboxes that now appears unchecked are yet checked, because I show other things in the row if the checkbox is selected. On the contrary, the checkbox that now appear checked do not show the additional components.
I checked the html, and the classes and attributes that make them checked disappears. But debugging the backend I see that the in the list connected to the table, after the add, all the items have the expected value.
This is a minimal reproducible example:
https://ufile.io/6a60kxpn
I don't know why, but I solved putting process="#this" to the actionButtons. If someone can explain me why, I'll accept the answer.

ADF af:query reset table on "Reset"

I am fairly new to the ADF, and I am trying to figure out how to reset the entire table on "Reset" with af:query Component.
Thank you in advance!
Just add the following line in af:table
<af:column id="c165" align="center" rowHeader="true" width="10" />
Make it as the first column, there will be a small pen when click on , it will clear the filter

Add tool tip to column headers

Is there any way in acumatica to add a tool tip for a grid column header? I tried adding the tool tip property for the rowtemplate as it is not available for gridcolumn, but doesn't help.
<RowTemplate>
<px:PXDropDown ID="edDocType" runat="server" DataField="DocType" CommitChanges="True" ToolTip="test">
</px:PXDropDown>
</RowTemplate>
The above code works when the grid is in Form View, but how to give it for a column header?
The easiest way to get this is to go to Customization open your grid's column go to Properties turn off Filter find section Header open it and set Tooltip like as in the screen:
As the result you will get such Tooltip for Grids Column

Column Click in Rich Faces 4

I am using an extendedDataTable from Richfaces 4. I want to show a detail-page for the element in a row when the user clicks it. Therefore I have added something like
onrowclick="showDetails(#{item.id})"
to the table. This triggers a corresponding <a4j:jsFunction/> tag. This is working so far.
However, one of the columns has a commandLink in it (for switching to an edit-view of the details). The link works in webkit-based browsers (Chrome/Safari). But IE and firefox only execute the onclick on the row. The commandlink doesn't work there.
Is it somehow possible to only set an oncolumnclick or the columns, that do not contain the commandlink? I havn't found a way to add an onclick-handler to specific columns (I am using rich:column for the columns.)
Or is there a better/cleaner/nicer way to achive the "click somewhere in the row to show details, click the link in the last column to show the edit view"-behaviour I am after?
Try putting this in your commandButton
onclick="Event.stop(event||window.event)"
My current workaround HACK is to not use the onrowclick but add a styleClass="clickable" to all my columns except the one with the link. In the first column, I added the following:
<h:outputText value="#{item.id}" style="display: none;" styleClass="id"/>
Then after the table I use the following jQuery:
<rich:jQuery selector=".myTable td.clickable" query="live('click', function(event) {
showDetails($(this).parent().children().children('.id').text());
});"/>
I really don't like this solution, but it is working fine so far.
I am still open for better solutions though :)

how to get data from HTMLDataTable in jsf?

<h:dataTable width="100%" border="1" cellspacing="0"
cellpadding="2" style="border-collapse:collapse;display:block"
styleClass="Header" value="#{adminBean.displayResults}"
var="aResult" binding="#{adminBean.browseResultsHTMLDataTable}">
This is what i am trying to do. I have a dynamic list of data, which i try to display in the HTML Table format using h:dataTable (the bounded value is an arrayList). The table has got a radio button for each row it displays (boolean w/ h:selectOneRadio ) now when i select the radio button in one of these rows, i want to get the values of the row that is selected for which i try to use binding attribute. But i get Row Unavailable exception - is my approach wrong? any suggestions?
Selecting rows by radio button in a datatable is a tricky task since the radio buttons aren't grouped. Long story short: Select row by radio button.
I think you can use <t:selectOneRadio> with layout="spread" and then <t:radio> on each row.

Resources