Need to Change the (App variable) Datatable row's value within the app

Hello all,

Can I change the Datatable row’s value within the app (without running the process ~ start process)

I am getting error if I try to alter the data row of a data table (App variable)

Thanks for your help.

Hello @Ranveer_S_Thakur,

Switch to the Events tab of the Edit Grid control, then configure the corresponding rules — for modifying rows, click Create rule for Row modified, then use the Set Value rule.

The pattern is:

  1. Edit Grid → Row Modified event
  2. Set Value rule → Target: dt, Value: dt.UpdateRow(rowIndex, MainPage.EditGrid1.ModifiedItem)

Thanks,
Karthik

Hey @chinthakayala_karthik,

Due to the data wrapping issues and long input - I have used text area for input rather than just editing the Edit grid cell directly (I have disabled edit option for that specific column).

For all others column data update, I am using the approach you mentioned. And I am using the data table as input to start a process to update the DB.

Is there any work around? (I did though of using start process, but it will be increasing the loading times if I start the process for each row’s data update)

Hello @Ranveer_S_Thakur,

Since you’re not using inline editing, the Row Modified event won’t trigger automatically for that column — that’s expected.

In Apps, row updates have to go through rules. The supported approach is via Row Modified → Set Value using UpdateRowAt().

The pattern is:

Item to set:
Processes.<process_name>.<datatable_output_parameter>

Value:
Processes.<process_name>.<datatable_output_parameter>
.UpdateRowAt(MainPage.EditGrid.RowIndex, MainPage.EditGrid.SelectedItem)

So in your case (with TextArea), you’ll need to manually trigger a similar rule:

  • Capture the row index
  • Update the value in your object
  • Then call UpdateRowAt()

There isn’t a direct way to mutate a single cell in the DataTable outside of this pattern — it always has to go through UpdateRowAt()/rules.

Documentation: Apps - Use DataTable with Table and Edit Grid controls

Thanks,
Karthik

Thank you @chinthakayala_karthik

I tried to capture the row index of the Selected Item (Adding the event for row selected of Event Grid). I added a Show message to see the captured value- I am getting Rowindex as 0 when I select any row. (this might be the issue??)

str_EditGrid_Selected_Row: App.EditGrid.RowIndex.tostring()

Overview:

Main is the source data table for Edit Grid (Copy of Data table coming from Start Process)

And I have created any single row data table for Selected Item from Main, this is to store and update text area data and other variable -

dt_Selected_Row_Open : App.EditGrid.SelectedItem.Table.Clone().Rows.Add( App.EditGrid.SlectedItem.ItemArray).Table, New System.Data.Datatable())

Then I have added a button to update the underlying data table -

Event - set value - Main: Main.UpdateRowAt( CInt(str_EditGrid_Selected_Row), dt_Selected_Row_Open(0))

The Event Grid gets refreshed, but the values remain same