How can I change the value of a cell at runtime ?

I have two tables, table1 is empty, the user fills in as he chooses in a drop-down in article and another table2 with the different configurations of that article.
the user adds lines into a drop-down of articles in table1 that is empty, adds a line with only two columns filled in and then the desired configuration is selected in table2.

I have the problem in passing the data from one table to another, sometimes there is a calculation before on the value of table2 and then passing it to a specific row and column. Can you help me, Thank you

5 Replies 1 reply marked as answer

KK Karthikraja Kalaimani Syncfusion Team October 14, 2020 02:11 PM UTC


Hi jose,

You can achieve your requirement by storing the Table 1 values to static property and then using that Static property you can assign directly to the ItemSource of Table 2.  

Regards, 
Karthik Raja


JO José October 15, 2020 03:45 PM UTC

 Hello, I would have an example on this storing the Table 1 values to static property .... it's ok like this to get the data ?? private void TablaLotes_SelectionChanged(object sender, GridSelectionChangedEventArgs e) { var DatosLot = (DataRowView)e.AddedItems[0]; var rowData = TablaLotes.GetRecordAtRowIndex((TablaLotes.SelectedIndex)); var propertyCollection = TablaLotes.View.GetPropertyAccessProvider(); DatosArt.Unds = propertyCollection.GetValue(rowData, "Stock1").ToString(); DatosArt.Precio = propertyCollection.GetValue(rowData, "CostoU1").ToString(); TablaArticulos.Refresh(); TablaArticulos.SelectedIndex += 1; } On the other hand, how do I select in the table the row and column where I want to modify the cell. What I can't achieve is inserting the data into a specific row and column of the table using hardcoded, without using sfdategrid.itemsource Thank you


KK Karthikraja Kalaimani Syncfusion Team October 16, 2020 02:46 PM UTC

Hi  jose,

Thanks for the update.

Currently, we are validating your requirement. we will validate and update the details on or before 20th Oct 2020. We appreciate your patience until then.

Regards,
Karthik Raja 



SS Sivaraman Sivagurunathan Syncfusion Team October 20, 2020 12:08 PM UTC

Hi  jose,

Thanks for the patience.

We are still validating your requirement with high priority. we will validate and update the details on or before 22nd  October 2020. We appreciate your patience until then.

Regards,
Karthik Raja  



KK Karthikraja Kalaimani Syncfusion Team October 22, 2020 12:59 PM UTC

Hi Jose,

We can select the row in SfDataGrid by using the SelectedIndex property . And We can also move the selection to the next row by using the SelectedIndex property when the editing the is finished.

Code snippet :

 
<Button Clicked="Button_Clicked" Text="Click To go next Row"></Button> 
        <syncfusion:SfDataGrid x:Name="dataGrid" AllowEditing="True" 
                        ColumnSizer="Star" SelectionMode="Single" SelectionUnit="Row" NavigationMode="Cell" 
                        AutoGenerateColumns="True">
        private void Button_Clicked(object sender, EventArgs e) 
        { 
            dataGrid.SelectedIndex += 1; 
        } 


Regards,
Karthik Raja 


Marked as answer
Loader.
Up arrow icon