{"id":13020,"date":"2016-07-21T05:31:44","date_gmt":"2016-07-21T05:31:44","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagecrm\/?p=13020"},"modified":"2016-07-21T05:31:44","modified_gmt":"2016-07-21T05:31:44","slug":"how-to-bind-custom-list-in-dot-net-using-select-sql","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/","title":{"rendered":"How to bind Custom List in Dot net using Select SQL"},"content":{"rendered":"<p>As we know we can create list in <a href=\"http:\/\/www.sagesoftware.co.in\/product-sage-crm\" target=\"_blank\" rel=\"noopener\">Sage CRM<\/a> which can be attached to a table or view. Using .net technology, we can filter the list with specific record with certain condition given to it. But, what if we need to bind the custom list with Select SQL statement. This blog article will help you to understand this.<br \/>\n<span style=\"color: #993300;\"><em><strong>New Stuff:<\/strong><\/em>\u00a0<span style=\"color: #000000;\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/20\/troubleshooting-apache-tomcat-service-issue-of-sage-crm\/\" target=\"_blank\">Troubleshooting Apache Tomcat Service issue of Sage CRM<\/a><\/span><\/span><br \/>\nIt\u2019s possible for this follow the below steps.<\/p>\n<ol>\n<li>Create a List in <a href=\"http:\/\/www.sagesoftware.co.in\/product-sage-crm\" target=\"_blank\" rel=\"noopener\">Sage CRM<\/a>.<\/li>\n<li>Below is the sample code snippet which can be used.<\/li>\n<\/ol>\n<p>&lt;Snippet&gt;<br \/>\n<em>string sSQL = &#8220;&#8221;;\/\/Write your Select Sql Query.<\/em><br \/>\n<em>\/\/Create the list object.<\/em><br \/>\n<em>List Test = new List(&#8220;List&#8221;);<\/em><br \/>\n<em>Test.Clear(); \/\/For Clear the List Column <\/em><br \/>\n<em>\/\/Create the list column object.<\/em><br \/>\n<em>GridCol ColumnName1 = new GridCol(&#8220;ColumnName&#8221;);<\/em><br \/>\n<em>GridCol ColumnName2 = new GridCol(&#8220;ColumnName&#8221;);<\/em><br \/>\n<em>GridCol ColumnName3 = new GridCol(&#8220;ColumnName&#8221;);<\/em><br \/>\n<em>\/\/Add the column in list.<\/em><br \/>\n<em>Test.Add(ColumnName1);<\/em><br \/>\n<em>Test.Add(ColumnName2);<\/em><br \/>\n<em>Test.Add(ColumnName3);<\/em><br \/>\n<em>Test.SelectSql = sSQL;<\/em><br \/>\n<em>Test.ToList();<\/em><br \/>\n<em>\/\/Add List on Page.<\/em><br \/>\n<em>AddContent(Test);<\/em><br \/>\n&lt;\/Snippet&gt;<br \/>\n<strong>Note: &#8211; Use the Column name which is present in Select Query.<\/strong><br \/>\n<span style=\"color: #993300;\"><em><strong>Also Read:<\/strong><\/em><\/span><br \/>\n<strong>1.<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2013\/07\/24\/create-custom-screen-in-sage-crm-using-padbottom-property\/\" target=\"_blank\">Create Custom screen in Sage CRM using PadBottom property<\/a><br \/>\n<strong>2.<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/06\/08\/apply-underline-to-a-column-header-in-list-or-grid\/\" target=\"_blank\">Apply underline to a Column Header in List or Grid<\/a><br \/>\n<strong>3.<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/07\/10\/adding-image-under-status-column-on-grid\/\" target=\"_blank\">Adding Image Under Status Column on Grid<\/a><br \/>\n<strong>4.<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2014\/05\/03\/control-column-visibility-in-sage-crm-grids-and-lists\/\" target=\"_blank\">Control Column Visibility in Sage CRM Grids and Lists<\/a><br \/>\n<strong>5.<\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2011\/11\/05\/dot-net-api-development-hints-adding-buttons-to-list-page\/\" target=\"_blank\">Dot Net API Development Hints \u2013 Adding buttons to List page<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we know we can create list in Sage CRM which can be attached to a table or view. Using .net technology, we can filter the list with specific record with certain condition given to it. But, what if we need to bind the custom list with Select SQL statement. This blog article will help\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[332,380,1],"tags":[856,868,2061,2088,2325],"class_list":["post-13020","post","type-post","status-publish","format-standard","hentry","category-sage-crm","category-sql","category-uncategorized","tag-custom-dot-net","tag-custom-list","tag-sage-crm-custom-list","tag-sage-crm-list","tag-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to bind Custom List in Dot net using Select SQL - Sage CRM \u2013 Tips, Tricks and Components<\/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.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to bind Custom List in Dot net using Select SQL - Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"og:description\" content=\"As we know we can create list in Sage CRM which can be attached to a table or view. Using .net technology, we can filter the list with specific record with certain condition given to it. But, what if we need to bind the custom list with Select SQL statement. This blog article will help\u2026 Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage CRM \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2016-07-21T05:31:44+00:00\" \/>\n<meta name=\"author\" content=\"greysagecrm\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"greysagecrm\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/\",\"name\":\"How to bind Custom List in Dot net using Select SQL - Sage CRM \u2013 Tips, Tricks and Components\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\"},\"datePublished\":\"2016-07-21T05:31:44+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to bind Custom List in Dot net using Select SQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/\",\"name\":\"Sage CRM \u2013 Tips, Tricks and Components\",\"description\":\"Explore the possibilities with Sage CRM insights through our comprehensive blogs. As a leading Sage partner, Greytrix helps businesses maximize their Sage CRM potential with its rich expertise and immense knowledge. Here, you will find blogs that feature expert advice, tips &amp; tricks, best practices, and comprehensive guides on customizing and configuring Sage CRM for your business. Stay informed with our regular updates and expert insights!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f\",\"name\":\"greysagecrm\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"caption\":\"greysagecrm\"},\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagecrm\/author\/greysagecrm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to bind Custom List in Dot net using Select SQL - Sage CRM \u2013 Tips, Tricks and Components","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/","og_locale":"en_US","og_type":"article","og_title":"How to bind Custom List in Dot net using Select SQL - Sage CRM \u2013 Tips, Tricks and Components","og_description":"As we know we can create list in Sage CRM which can be attached to a table or view. Using .net technology, we can filter the list with specific record with certain condition given to it. But, what if we need to bind the custom list with Select SQL statement. This blog article will help\u2026 Read More &raquo;","og_url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/","og_site_name":"Sage CRM \u2013 Tips, Tricks and Components","article_published_time":"2016-07-21T05:31:44+00:00","author":"greysagecrm","twitter_card":"summary_large_image","twitter_misc":{"Written by":"greysagecrm","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/","name":"How to bind Custom List in Dot net using Select SQL - Sage CRM \u2013 Tips, Tricks and Components","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website"},"datePublished":"2016-07-21T05:31:44+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f"},"breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/2016\/07\/21\/how-to-bind-custom-list-in-dot-net-using-select-sql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/"},{"@type":"ListItem","position":2,"name":"How to bind Custom List in Dot net using Select SQL"}]},{"@type":"WebSite","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#website","url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/","name":"Sage CRM \u2013 Tips, Tricks and Components","description":"Explore the possibilities with Sage CRM insights through our comprehensive blogs. As a leading Sage partner, Greytrix helps businesses maximize their Sage CRM potential with its rich expertise and immense knowledge. Here, you will find blogs that feature expert advice, tips &amp; tricks, best practices, and comprehensive guides on customizing and configuring Sage CRM for your business. Stay informed with our regular updates and expert insights!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/e7ff1c8f4763b47730d6bc5e74d59c1f","name":"greysagecrm","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","caption":"greysagecrm"},"url":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/author\/greysagecrm\/"}]}},"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/13020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/comments?post=13020"}],"version-history":[{"count":0,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/posts\/13020\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/media?parent=13020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/categories?post=13020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagecrm\/wp-json\/wp\/v2\/tags?post=13020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}