Main Region

Grid Problem - primary key column
1 answer | 486 views

CH
Jun 3, 2015 11:14 +00:00

Hi

I created an Grid where insert/update/delete is allowed. The Problem is, the primary key column is not displayed in the grid although I had set the option "show". Does anyone know whats wrong here?

Kind Regards, Christian

3 comments

CH
Christian86 Jun 3, 2015 13:17 +00:00 

Ok, I´ll do so. Thank you

JA
jaleman Aug 27, 2015 16:03 +00:00 

Hi,

I'm using a grid for a table that has defined a varchar PK, the user should be able to set the value for new records. What would be the way to do this?

Thank you!

MN
Matt Nolan Aug 28, 2015 06:44 +00:00 

In this case you will need to add an extra column in the grid SQL query and set it to say a text field and user a pre processing procedure to set the primary key value in the CRUD request record type using the value from this new column.

In this new column that is added you should put a PLSQL expression condition on it so it is excluded from the inbuilt processing: NOT fx_p_grid.processing

This way you can re-use the inbuilt processing rather than having to code your own routine. Alternatively you could just use a custom processing procedure to do exactly what you want.

MN
Jun 3, 2015 11:44 +00:00

The grid primary key column is always included and hidden. If you would like to show the value please include the column twice with a separate alias. e,g,

SELECT my_pk_column
,      my_pk_column my_pk_column_display
....
0 comments

You must log in or sign up to post questions and answers.