{"id":108,"date":"2020-12-10T14:31:34","date_gmt":"2020-12-10T06:31:34","guid":{"rendered":"https:\/\/www.tonghin.com.my\/blog\/?p=108"},"modified":"2020-12-10T14:31:36","modified_gmt":"2020-12-10T06:31:36","slug":"user-action-validation-on-pick-module","status":"publish","type":"post","link":"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/","title":{"rendered":"User action validation on Pick Module"},"content":{"rendered":"\n<p>After the color indicator for pick module had been completed, for this week, I&#8217;ve implement the features that will alert user when they did not save their pick. <\/p>\n\n\n\n<p>In order to implement the feature, I&#8217;ve used the data grid SelectionChanged event. This event will be fire when the selected item in the data grid had been changed. Therefore, I&#8217;ve retrieve the RemovedItems from the SelectionChangedEventArgs and compared its pickQuantity with database. If the pickQuantity is same with the database, it allow user to proceed with another row,  reset to previous row if it is not same with database and prompt error dialog. <\/p>\n\n\n\n<p>However, I&#8217;ve faced problem when the selected item is reset to previous item, but the focus is pointed on another row. Therefore, the PreviewLostKeyboardFocus event is used to solve the problem. It fired when the user attempt to leave the textbox focus. When the event is fired, it will work the same as the SelectionChanged event which compare the value of pickQuantity with database to verify whether user had modify the value. If the pickQuantity had been modified, it will reset the focus back to the previous textbox by using OldFocus.Focus();<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After the color indicator for pick module had been completed, for this week, I&#8217;ve implement the features that will alert user when they did not save their pick. In order to implement the feature, I&#8217;ve used the data grid SelectionChanged event. This event will be fire when the selected item in the data grid had &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;User action validation on Pick Module&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[36,37],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>User action validation on Pick Module | Tong Hin&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"User action validation on Pick Module | Tong Hin&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"After the color indicator for pick module had been completed, for this week, I&#8217;ve implement the features that will alert user when they did not save their pick. In order to implement the feature, I&#8217;ve used the data grid SelectionChanged event. This event will be fire when the selected item in the data grid had &hellip; Continue reading &quot;User action validation on Pick Module&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/\" \/>\n<meta property=\"og:site_name\" content=\"Tong Hin&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-10T06:31:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-10T06:31:36+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\",\"name\":\"TONG HIN MACHINERY\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"sameAs\":[\"https:\/\/www.youtube.com\/channel\/UC60EoxJMNbu8mV0LuEGfrBg\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/wp-content\/uploads\/2020\/10\/web_logo_180_180.jpg\",\"width\":180,\"height\":180,\"caption\":\"TONG HIN MACHINERY\"},\"image\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Tong Hin&#039;s Blog\",\"description\":\"Sharing About Technology\",\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.tonghin.com.my\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/#webpage\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/\",\"name\":\"User action validation on Pick Module | Tong Hin&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\"},\"datePublished\":\"2020-12-10T06:31:34+00:00\",\"dateModified\":\"2020-12-10T06:31:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/\",\"name\":\"User action validation on Pick Module\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/b6d8e09279640ee3576051fb9790a8c8\"},\"headline\":\"User action validation on Pick Module\",\"datePublished\":\"2020-12-10T06:31:34+00:00\",\"dateModified\":\"2020-12-10T06:31:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"keywords\":\"pickmodule,uiux\",\"articleSection\":\"Experiential\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2020\/12\/10\/user-action-validation-on-pick-module\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/b6d8e09279640ee3576051fb9790a8c8\",\"name\":\"Chong Pui Man\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/34cf8e981acb44d194d4c713de79fd90?s=96&d=mm&r=g\",\"caption\":\"Chong Pui Man\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/108"}],"collection":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":2,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"predecessor-version":[{"id":110,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/108\/revisions\/110"}],"wp:attachment":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}