Add columns in a CRUD page

Hi, I'm moving slowly to understand how things work.

On my page Sailing Event Participants I will have all Participants that will be in the Event. As you can see I have a Boat column and I would like to add more columns from the Boat table (boats). In the Boat table I have NationalCode, SailNumber and i would like to have them i the Grid. I tried to create a view but when using a view I don't get and Add and Edit page because views are by default Read only.

Hi,
If you are using RBS select the datagrid component and you can add columns by clicking the + button as seen in redbox here

Hi, but the record set that comes from the database call does not have the column that I want to add in the grid, so how can I alter the select from the database or is that hidden?

Hi,

  1. You need to add the required columns in the table
  2. In radzen You need to edit the datasource and infer schema again.
    image
    After the above steps database models will be updated with new columns.

@VictorW60 Does the database table have the column you want to display or not?

Hi

The table SailingEventParticipants is where I store information about what person and boat that takes part in the SailingEvent, as you can see table contain a lot of FK. When i present the information in the grid I don't only want to see the BoatName (Boat) and FullName (person) I would lie to see the NationalCode, SailNumber from (Boats)

So my question is, can I alter the SQL question that is autoamtic created in Radzen or should I do it another way?

If you run the project and navigate to the page that is displaying the Sailing Event Participants grid. What does the first record i that grid say in the Boat Column?

The CRUD pages generated by Radzen should include foreign keys by default and display the first text property from the related table in a column. You can try generating a page for the SailingEventParticipant entity and check the generated code.

Hi I understand how CRUD pages works, but my question is how can I display more columns from the FK table like Boats. Is it some simple that is is not possible and that I need to do it by busing Stored Procedures?

Where can I check the code?

It is indeed simple and that's why I suggested to check the code. The documentation explains what a Radzen application consists of.