jQGrid column chooser hidden column - plugins

I'm using the column chooser feature of jQgrid.
Is there a way to hide certain column (e.g. db id) from the column chooser so that user will not be able to 'reveal' them?

Yes you should use
hidedlg: true
property in colModel additionally to hidden: true.

Related

Hide column name in personalization dialog box based on condition

I have p13n dialog box in a table, where I am displaying 2 columns coming from the backend.
Now, I want to implement condition in column 2. For example,
if(mainCondition === true)
{
display column2;
}
else
{
hide columns2;
}
The issue here is, these column names are coming from CDS view & with entity set.
I can, of course, hide them completely using the setIgnoreFromPersonalisation method, however, I don't know how can I implement condition on these field's visibility property.
Thanks.
Since the two columns are coming from the backend, you can add Filter to the model to filter out the ones to be hidden.

Tableau parameter filter with multiple values?

In Tableau 9.2, I currently have a parameter set up which contains multiple string values and an additional "All" value. I also have a calculated field which only contains the Str([some_field]) function. I have then dragged this calculated field into the "filters" pane and from there enabled "use all" and put the following formula under the "condition" tab:
// If All is selected, then do not filter
[my_filter_parameter] = 'All' OR
// Otherwise, filter on the current parameter
[my_filter_parameter] = [my_calculated_Field]
After creating the calculated field for multiple sheets in my dashboard (which use different data sources all contain the common some_field), then I can change the parameter's value and it will filter all of the sheets at once.
My issue is that I need this to take on multiple values at once via a check-box. I understand that a parameter can only take on one value at a time, so I am wondering how I can do this without making the same filter for each individual sheet in the dashboard. Perhaps this can be done with a calculated field?
EDIT: I have tried the technique here to make a global filter via a control view. This allows me to use Ctrl+Clicking to select multiple values in some_field at once, however I still do not have a dropdown box. Alternatively, if anyone knows how to use this method with a dropdown box, then that would be another solution.
If I am understanding your situation correctly, I have accomplished this using the following:
Create a calculated field and put the following code:
if [parameters].parametername = 'All' then true
elseif [parameters].parametername = FILTEREDCOLUMN then true
else false
end
Add that calculated field to the filters pane and select "True" - in other words, filter out any records where the calculated field is False. If the parameter you selected is "All" then all records will be True. Otherwise, it will only be True if the parameter matches the FILTEREDCOLUMN. I hope that helps.
Parameter can pass only one value at a time ,i.e. Parameter Control will have Single Drop Down List.

How to set a look up field value to null/blank in access 2010?

I need some help with Access 2010 forms. My form has a number of fields (from one table). One of the field is a logical field. If the user selects true, then the next field (text field) should be enabled. This is working fine - I created an after update event procedure. The problem I have is if the user accidentally selects true, and then selects a value/s for the text field (the text field looks up a query - it is a look up field and it can have more than one value - the user can select/check as many from the list and they will be stored to the text field, separated by coma).
How will I set the text field (look up field) value to blank, if the user goes back and set the logical field to false? me.textfield.value = null gives an error.
Can anyone please help me? Thank you!
Just keep in mind that in fact a multi-value column is in fact a normalized data table.
So the display looks like this:
To clear the records selected in this child table, which is your mult-value selection, you can use this code behind the above button:
Dim rstChild As DAO.Recordset
Set rstChild = Me.Recordset.Color.value
Do While rstChild.EOF = False
rstChild.Delete
rstChild.MoveNext
Loop
Me.Color.Requery
An easy way to insert a blank lookup field is to select the field in design view and click on the lookup tab in the field properties. Before the first entry in Row Source insert the following " ";

Dynamic SQL and C#.Net

I am using Dynamic SQl in my stored Procedure. In front end I am using C#.net gridview to display the data.
I have three fields in my Table,
1) Active- Bit
2) DateMadeInactive-smallDate
3)Comments-Varchar(Max)
Depending on the condition of the active Value I have to display those three or two fields in the gridview.
If Active= true, Then I have to display active and Comments.
If Active =false, Then I have to DateMadeInactive and Comments Fields.
For Rendering the Active field I am using the following
<asp:TemplateField HeaderText="Comments" SortExpression="Comments" >
<ItemTemplate>
<%#Eval("Comments")%>
</ItemTemplate>
</asp:TemplateField>
In my stored Procedure I am checking Like this for null, if its null then I am displaying as false
set #SQLQuery = #SQLQuery+ ',isnull(Register.Active,''0'')as Active,
Could anybody tell me where do I check for the Active value or Is there any method in SQL which Checks for the True/False condition of the field.
I am not expecting complete answer, just a hint only...
Thank you.
Hari
The GridView.RowDataBound event is what you're looking for.
When handling the event check the value of the field and show or hide your controls accordingly.
Beware: You can't hide the whole column, as it affects every row, you must show or hide the controls inside the column.

How do I gain Control of a row in Tabular Layout in Oracle

This might be simple but I am new to Oracle. I am using Oracle 10g and have a form that lists our information from a linked table in a tabular Layout. The last column of data is a "list Item" item type that has the Element list of Enabled (T) and Disabled (F).
What I need is when a user changes this dropdown, to disabled, I want ONLY that row to have some of the columns be disabled and not the entire column.
This is also assuming on load of the form, it will disable and enable rows of data depending on what values are being pulled from the EnabledDisabled column in the database.
Thanks for the help!
Option 1: use the ENABLED item property.
Unfortunately Oracle Forms does not allow changing the ENABLED property of an item at the item instance level.
What you can do, however, is enable or disable the whole item when the user enters a record - use the WHEN-NEW-RECORD-INSTANCE trigger - depending on the value of the current record's value for the list item, the trigger would set the ENABLED property to PROPERTY_TRUE or PROPERTY_FALSE.
Of course, your list item would also have the same code in its WHEN-LIST-CHANGED trigger.
The downside to this approach is that the whole column will "look" disabled to the user, and they will not be able to select a different record using those disabled items.
Option 2: use the INSERT_ALLOWED and UPDATE_ALLOWED properties.
You can set these properties at the item instance level using SET_ITEM_INSTANCE_PROPERTY. You would set them in the block's POST-QUERY trigger, as well as in the list item's WHEN-LIST-CHANGED trigger.
This would not, however, change how the items look on the screen. To solve this, you could also set a visual attribute at the item instance level (e.g. change the items to use a dark gray background or something).
More comments.