<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sam</title>
    <description>The latest articles on DEV Community by Sam (@ford).</description>
    <link>https://dev.to/ford</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F913820%2F3927c893-002c-4828-9e5a-fe9e2ba73af8.jpg</url>
      <title>DEV Community: Sam</title>
      <link>https://dev.to/ford</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ford"/>
    <language>en</language>
    <item>
      <title>Issue while updating the value in the column of Editable DetailsList React</title>
      <dc:creator>Sam</dc:creator>
      <pubDate>Tue, 23 Aug 2022 08:40:02 +0000</pubDate>
      <link>https://dev.to/ford/issue-while-updating-the-value-in-the-column-of-editable-detailslist-react-5ho</link>
      <guid>https://dev.to/ford/issue-while-updating-the-value-in-the-column-of-editable-detailslist-react-5ho</guid>
      <description>&lt;p&gt;Hi All,&lt;/p&gt;

&lt;p&gt;I have developed an Editable React Grid using a Fluent UI (i.e. using DetailsList control). And I’m facing an issue while updating the value in the column.&lt;/p&gt;

&lt;p&gt;For Example, I want to update the &lt;strong&gt;“Total Amount”&lt;/strong&gt; column on change of the &lt;strong&gt;“Quantity”&lt;/strong&gt; using the formula &lt;strong&gt;(Quantity*Price Per Unit)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h-tfxHrH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/srm2crdm41oq4r11fnsb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h-tfxHrH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/srm2crdm41oq4r11fnsb.png" alt="Image description" width="873" height="82"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, when the user enters any value inside the &lt;strong&gt;“Quantity”&lt;/strong&gt; column. I am updating the &lt;strong&gt;“Total Amount”&lt;/strong&gt; column value based on the &lt;strong&gt;formula (Quantity*Price Per Unit)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But the updated value is not showing in the UI (i.e. &lt;strong&gt;“Total Amount”&lt;/strong&gt; column).&lt;/p&gt;

&lt;p&gt;I have observed that the value is getting updated in the backend, but not showing the same in UI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Query:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;So can anyone please let me know how I can refresh the value of the “Total Amount” column in real-time? &lt;br&gt;
OR &lt;br&gt;
How I can show the updated value inside the “Total Amount” column without refreshing the page in real time?&lt;br&gt;
**&lt;br&gt;
Below is the code I am using to update the State of “&lt;/strong&gt;DetailsList **” items:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
          this.setState({&lt;br&gt;
            items: this._allItems&lt;br&gt;
          })&lt;br&gt;
&lt;strong&gt;&lt;code&gt;&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note: *&lt;em&gt;The above variable i.e. *&lt;/em&gt;“items”&lt;/strong&gt; (inside the setState), is passed inside the **“DetailsList” **control.&lt;/p&gt;

&lt;p&gt;Any help will be appreciable.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
      <category>react</category>
    </item>
  </channel>
</rss>
