How to calculate inline grid column without relationship with grid datasource

Hello, I hope someone of you guys can help me figure out what to do here.

So, I have a grid with inline edit that has as data source the table "Shifts". In editing mode, between the various columns, there is one that must be populated according to another.

In practice, the column "Project" has a relationship with the column "Client". And the latter has a relationship with the table from which I take the "Shifts" data. When I go into edit mode I need to be able to populate the dropdown of "Project", with the correct data, based on the selected "Client".

I don't know how to load the correct data during editing whether I do a single edit or multiple edits.

Hope I've been clear enough, the following is the DB structure.

DB structure:

Shifts Table (Used to populate the grid)

  • ShiftsId PK
  • ShiftsClientId FK
  • ProjectName

Client Table

  • ClientId PK
  • ClientName

Project Table

  • ProjectId PK
  • ProjectClientId FK
  • ProjectName

Hi @luf,

You can handle the Change event of the Client dropdown and filter the Project dropdown there. The Project dropdown can be initially empty until the user selects a Client.

Thanks for your reply @korchev!

Yes I thought about that, but the Project dropdown cannot be empty initially, because the user will only select a client if he's adding a new record, but all existing records have already a Client, so onLoad, the project dropdown must already be filled based on the current client!

So if I enter edit mode after I started my app, once in Edit mode, the Project dropdown is empty for the selected client.

My solution was to apply on the Click event of the Edit button another invoke with as filter the current client, but this makes entering in Edit mode a bit slower, as it must do the invoke before going into Edit mode...

So far I always found radzen super powerful, but it's strange there is not an option to manually select a query for a single dropdown, or for example, having a "onLoad" event on a dropdown would solve this, as I could do the invoke directly on the dropdown for example.

We managed to solve the issue finally, and we are posting the solution so that people with the same issue can find it.

Basically we created a Custom method, returning a A "dictionary of lists" and then use the first dropdown value of the curent row to access the correct list so our custom invoke will have its result saved in "getProjectDictionaryResult" and then in our second dropdown, that depends on the first dropdown, we will pass this as Data in the template:
${getProjectDictionaryResult[data.clientID]} where clientID is the value of the first dropdown!