{"id":305259,"date":"2021-09-12T18:26:43","date_gmt":"2021-09-12T18:26:43","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=305259"},"modified":"2024-07-24T11:53:50","modified_gmt":"2024-07-24T11:53:50","slug":"create-category-grid-with-category-children-count-column-in-ui-component-form","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/","title":{"rendered":"Create Category grid with category children count column in UI component form"},"content":{"rendered":"\n<p>In this blog, we are going to learn how we can create a category grid in the UI component form with the &#8220;children_count&#8221; column value in the admin section.<\/p>\n\n\n\n<p>You can check our <a href=\"https:\/\/webkul.com\/blog\/fix-category-grid-issue-due-to-children_count-column-in-custom-ui-component-form\/\" target=\"_blank\" rel=\"noreferrer noopener\">Previous Blog<\/a> in which we have mentioned that what error we can face when we fetch <strong>children_count<\/strong> column in category collection.<br>In prev blog, we have created a category grid without the children_count column.<\/p>\n\n\n\n<p>In this blog, we will also display the <strong>children_count <\/strong>of category in the category grid.<\/p>\n\n\n\n<p>To do this, you have to need to follow the below steps:<br><br>1. Get the all categories using following code:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">$collection = $this-&gt;categoryFactory-&gt;create()\n            -&gt;getCollection()\n            -&gt;addAttributeToSelect(&#039;*&#039;);<\/pre>\n\n\n\n<p>Here, the query will be as following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">SELECT `e`.* FROM `catalog_category_entity` AS `e`<\/pre>\n\n\n\n<p>If you will execute this query in the database, the result will be as following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"413\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1-1200x413.png\" alt=\"SQLResult1-1\" class=\"wp-image-305260\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1-1200x413.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1-300x103.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1-250x86.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1-768x265.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1.png 1396w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>2. Now reset columns of collection, and set columns which you want. Here, I have reset all columns and set entity_id and children_count as <strong>childrenCount<\/strong> columns.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">$collection-&gt;getSelect()\n            -&gt;reset(\\Zend_Db_Select::COLUMNS)\n            -&gt;columns(&#091;&#039;entity_id&#039;, &#039;e.children_count as childrenCount&#039;]);<\/pre>\n\n\n\n<p>Now, the query will be as following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">SELECT `e`.`entity_id`, `e`.`children_count` AS `childrenCount` FROM `catalog_category_entity` AS `e`<\/pre>\n\n\n\n<p>If you will execute this query in the database, the result will be as following:<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"490\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult4-1200x490.png\" alt=\"SQLResult4\" class=\"wp-image-305261\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult4-1200x490.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult4-300x123.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult4-250x102.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult4-768x314.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult4.png 1280w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>3. As I have to display category names in the grid, so I have added the following statement in the collection query.<br><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">$collection-&gt;addAttributeToSelect(&#039;*&#039;)\n            -&gt;addFieldToFilter(&#039;name&#039;, &#091;&quot;neq&quot;=&gt;null])\n            -&gt;addFieldToFilter(&#039;is_active&#039;, 1);<\/pre>\n\n\n\n<p>Now, the query will be as following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">SELECT `e`.`entity_id`, `e`.`children_count` AS `childrenCount`, IF(at_name.value_id &gt; 0, at_name.value, at_name_default.value) AS `name`, IF(at_is_active.value_id &gt; 0, at_is_active.value, at_is_active_default.value) AS `is_active` FROM `catalog_category_entity` AS `e` LEFT JOIN `catalog_category_entity_varchar` AS `at_name_default` ON (`at_name_default`.`entity_id` = `e`.`entity_id`) AND (`at_name_default`.`attribute_id` = &#039;45&#039;) AND `at_name_default`.`store_id` = 0 LEFT JOIN `catalog_category_entity_varchar` AS `at_name` ON (`at_name`.`entity_id` = `e`.`entity_id`) AND (`at_name`.`attribute_id` = &#039;45&#039;) AND (`at_name`.`store_id` = 1) LEFT JOIN `catalog_category_entity_int` AS `at_is_active_default` ON (`at_is_active_default`.`entity_id` = `e`.`entity_id`) AND (`at_is_active_default`.`attribute_id` = &#039;46&#039;) AND `at_is_active_default`.`store_id` = 0 LEFT JOIN `catalog_category_entity_int` AS `at_is_active` ON (`at_is_active`.`entity_id` = `e`.`entity_id`) AND (`at_is_active`.`attribute_id` = &#039;46&#039;) AND (`at_is_active`.`store_id` = 1) WHERE (IF(at_name.value_id &gt; 0, at_name.value, at_name_default.value) != &#039;&#039;) AND (IF(at_is_active.value_id &gt; 0, at_is_active.value, at_is_active_default.value) = &#039;1&#039;)<\/pre>\n\n\n\n<p>If you will execute this query in the database, the result will be as following:<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"642\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult5-1200x642.png\" alt=\"SQLResult5\" class=\"wp-image-305262\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult5-1200x642.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult5-300x161.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult5-250x134.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult5-768x411.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult5.png 1392w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>4. Now, check the complete code in CategoryGrid.php file inside app\/code\/Vendor\/CustomModule\/Block\/Adminhtml\/Rule\/Edit\/Tab\/ directory.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Webkul Software.\n *\n * @category  Webkul\n * @package   Vendor_CustomModule\n * @author    Webkul\n * @copyright Webkul Software Private Limited (https:\/\/webkul.com)\n * @license   https:\/\/store.webkul.com\/license.html\n *\/\n\nnamespace Vendor\\CustomModule\\Block\\Adminhtml\\Rule\\Edit\\Tab;\n\nuse Magento\\Customer\\Controller\\RegistryConstants;\n\n\/**\n * class for the category grid tab in the rule form.\n *\/\nclass CategoryGrid extends \\Magento\\Backend\\Block\\Widget\\Grid\\Extended\n{\n    \/**\n     * @var \\Magento\\Catalog\\Model\\CategoryFactory\n     *\/\n    protected $categoryFactory;\n\n    \/**\n     * @var \\Vendor\\CustomModule\\Model\\ResourceModel\\RuleCategory\\CollectionFactory\n     *\/\n    protected $ruleCategoryCollection;\n\n    \/**\n     * Construct\n     *\n     * @param \\Magento\\Backend\\Block\\Template\\Context $context\n     * @param \\Magento\\Backend\\Helper\\Data $backendHelper\n     * @param \\Magento\\Catalog\\Model\\CategoryFactory $categoryFactory\n     * @param \\Vendor\\CustomModule\\Model\\ResourceModel\\RuleCategory\\CollectionFactory $ruleCategoryCollection\n     * @param array $data\n     *\/\n    public function __construct(\n        \\Magento\\Backend\\Block\\Template\\Context $context,\n        \\Magento\\Backend\\Helper\\Data $backendHelper,\n        \\Magento\\Catalog\\Model\\CategoryFactory $categoryFactory,\n        \\Vendor\\CustomModule\\Model\\ResourceModel\\RuleCategory\\CollectionFactory $ruleCategoryCollection,\n        array $data = &#091;]\n    ) {\n        $this-&gt;categoryFactory = $categoryFactory;\n        $this-&gt;ruleCategoryCollection = $ruleCategoryCollection;\n        parent::__construct($context, $backendHelper, $data);\n    }\n\n    \/**\n     * @inheritdoc\n     *\/\n    protected function _construct()\n    {\n        parent::_construct();\n        $this-&gt;setId(&#039;loyalty_rule_categorygrid&#039;);\n        $this-&gt;setDefaultSort(&#039;entity_id&#039;, &#039;asc&#039;);\n        $this-&gt;setUseAjax(true);\n    }\n\n    \/**\n     * @param Column $column\n     * @return $this\n     *\/\n    protected function _addColumnFilterToCollection($column)\n    {\n        \/\/ Set custom filter for in category flag\n        if ($column-&gt;getId() == &#039;in_categories&#039;) {\n            $categoryIds = $this-&gt;_getSelectedCategories();\n            if (empty($categoryIds)) {\n                $categoryIds = 0;\n            }\n            if ($column-&gt;getFilter()-&gt;getValue()) {\n                $this-&gt;getCollection()-&gt;addFieldToFilter(&#039;entity_id&#039;, &#091;&#039;in&#039; =&gt; $categoryIds]);\n            } elseif (!empty($categoryIds)) {\n                $this-&gt;getCollection()-&gt;addFieldToFilter(&#039;entity_id&#039;, &#091;&#039;nin&#039; =&gt; $categoryIds]);\n            }\n        } else {\n            parent::_addColumnFilterToCollection($column);\n        }\n        return $this;\n    }\n\n    \/**\n     * Apply various selection filters to prepare the category grid collection.\n     *\n     * @return $this\n     *\/\n    protected function _prepareCollection()\n    {\n        $collection = $this-&gt;categoryFactory-&gt;create()\n            -&gt;getCollection()\n            -&gt;addAttributeToSelect(&#039;*&#039;);\n           \n        $collection-&gt;getSelect()\n            -&gt;reset(\\Zend_Db_Select::COLUMNS)\n            -&gt;columns(&#091;&#039;entity_id&#039;, &#039;e.children_count as childrenCount&#039;]);\n            \n        $collection-&gt;addAttributeToSelect(&#039;*&#039;)\n            -&gt;addFieldToFilter(&#039;name&#039;, &#091;&quot;neq&quot;=&gt;null])\n            -&gt;addFieldToFilter(&#039;is_active&#039;, 1);\n            \n        $this-&gt;setCollection($collection);\n        return parent::_prepareCollection();\n    }\n\n    \/**\n     * @inheritdoc\n     *\/\n    protected function _prepareColumns()\n    {\n        $this-&gt;addColumn(\n            &quot;entity_id&quot;,\n            &#091;\n                &quot;type&quot;     =&gt; &quot;number&quot;,\n                &quot;align&quot;    =&gt; &quot;center&quot;,\n                &quot;width&quot;    =&gt; &quot;30px&quot;,\n                &quot;index&quot;    =&gt; &quot;entity_id&quot;,\n                &quot;header&quot;   =&gt; __(&quot;ID&quot;)\n            ]\n        );\n\n        $this-&gt;addColumn(\n            &quot;name&quot;,\n            &#091;\n                &quot;index&quot;    =&gt; &quot;name&quot;,\n                &quot;align&quot;    =&gt; &quot;left&quot;,\n                &quot;header&quot;   =&gt; __(&quot;Category Name&quot;)\n            ]\n        );\n\n        $this-&gt;addColumn(\n            &quot;childrenCount&quot;,\n            &#091;\n                &quot;index&quot;    =&gt; &quot;childrenCount&quot;,\n                &quot;align&quot;    =&gt; &quot;left&quot;,\n                &quot;header&quot;   =&gt; __(&quot;Children Count&quot;)\n            ]\n        );\n\n        $this-&gt;addColumn(\n            &quot;in_categories&quot;,\n            &#091;\n                &quot;type&quot;     =&gt; &quot;checkbox&quot;,\n                &quot;name&quot;     =&gt; &quot;in_categories&quot;,\n                &quot;align&quot;    =&gt; &quot;center&quot;,\n                &quot;width&quot;    =&gt; &quot;100px&quot;,\n                &quot;index&quot;    =&gt; &quot;entity_id&quot;,\n                &quot;values&quot;   =&gt; $this-&gt;_getSelectedCategories(),\n                &quot;header&quot;   =&gt; __(&quot;Select&quot;),\n                &quot;sortable&quot; =&gt; false\n            ]\n        );\n\n        $this-&gt;addColumn(\n            &quot;inv&quot;,\n            &#091;\n                &quot;type&quot;     =&gt; &quot;input&quot;,\n                &quot;class&quot;    =&gt; &quot;number_check loyalty_points&quot;,\n                &quot;width&quot;    =&gt; &quot;150px&quot;,\n                &quot;align&quot;    =&gt; &quot;center&quot;,\n                &quot;index&quot;    =&gt; &quot;inv&quot;,\n                &quot;filter&quot;   =&gt; false,\n                &quot;header&quot;   =&gt; __(&quot;Loyalty Points&quot;),\n                &quot;sortable&quot; =&gt; false,\n                &quot;renderer&quot; =&gt; \\Vendor\\CustomModule\\Block\\Adminhtml\\Points::class\n            ]\n        );\n        \n        return parent::_prepareColumns();\n    }\n\n    \/**\n     * @inheritdoc\n     *\/\n    public function getGridUrl()\n    {\n        return $this-&gt;getUrl(&quot;*\/*\/categoryGridData&quot;, &#091;&quot;_current&quot;=&gt;true]);\n    }\n\n    \/**\n     * @return array\n     *\/\n    protected function _getSelectedCategories()\n    {\n        $categoryIds = &#091;];\n        $ruleId      = $this-&gt;getRequest()-&gt;getParam(&quot;id&quot;);\n        $pointsCollection = $this-&gt;ruleCategoryCollection-&gt;create()\n            -&gt;addFieldToFilter(&quot;loyalty_rule_id&quot;, $ruleId);\n        \n        foreach ($pointsCollection as $each) {\n            $categoryIds&#091;] = $each-&gt;getCategoryId();\n        }\n        return $categoryIds;\n    }\n}<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"598\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/categoryGridWithChildrenCount-1200x598.png\" alt=\"categoryGridWithChildrenCount\" class=\"wp-image-305263\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/categoryGridWithChildrenCount-1200x598.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/categoryGridWithChildrenCount-300x150.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/categoryGridWithChildrenCount-250x125.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/categoryGridWithChildrenCount-768x383.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/categoryGridWithChildrenCount-1536x765.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/categoryGridWithChildrenCount.png 1804w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>5. <a href=\"https:\/\/github.com\/khushboowebkul\/loyaltyrule\" target=\"_blank\" rel=\"noreferrer noopener\">Download the complete code<\/a>.<\/p>\n\n\n\n<p>Hope this will be helpful. Thanks \ud83d\ude42<br><br>Previous Blog: <a href=\"https:\/\/webkul.com\/blog\/fix-category-grid-issue-due-to-children_count-column-in-custom-ui-component-form\/\" target=\"_blank\" rel=\"noreferrer noopener\">Fix category grid issue due to children_count column in custom UI component Form<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, we are going to learn how we can create a category grid in the UI component form with the &#8220;children_count&#8221; column value in the admin section. You can check our Previous Blog in which we have mentioned that what error we can face when we fetch children_count column in category collection.In prev <a href=\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":249,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9121],"tags":[12042,12038,12041,12043,12044],"class_list":["post-305259","post","type-post","status-publish","format-standard","hentry","category-magento-2","tag-category-children","tag-category-grid","tag-children_count","tag-ui-component-form","tag-ui-component-grid"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create Category grid with category children count column in UI component form - Webkul Blog<\/title>\n<meta name=\"description\" content=\"Create Category grid with category children count column in UI component form, how to create category grid in UI component\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Category grid with category children count column in UI component form - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Create Category grid with category children count column in UI component form, how to create category grid in UI component\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-12T18:26:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-24T11:53:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1-1200x413.png\" \/>\n<meta name=\"author\" content=\"Khushboo Sahu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Khushboo Sahu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/\"},\"author\":{\"name\":\"Khushboo Sahu\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/f94b8f53397bf85810761d76c98fadca\"},\"headline\":\"Create Category grid with category children count column in UI component form\",\"datePublished\":\"2021-09-12T18:26:43+00:00\",\"dateModified\":\"2024-07-24T11:53:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/\"},\"wordCount\":278,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1-1200x413.png\",\"keywords\":[\"category children\",\"category grid\",\"children_count\",\"UI component form\",\"Ui component grid\"],\"articleSection\":[\"Magento 2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/\",\"url\":\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/\",\"name\":\"Create Category grid with category children count column in UI component form - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1-1200x413.png\",\"datePublished\":\"2021-09-12T18:26:43+00:00\",\"dateModified\":\"2024-07-24T11:53:50+00:00\",\"description\":\"Create Category grid with category children count column in UI component form, how to create category grid in UI component\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1.png\",\"width\":1396,\"height\":481,\"caption\":\"SQLResult1-1\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Category grid with category children count column in UI component form\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/f94b8f53397bf85810761d76c98fadca\",\"name\":\"Khushboo Sahu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cabac965df656d114e6bf340df07518c990eda03bb09265dbd5c17f1097adaae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cabac965df656d114e6bf340df07518c990eda03bb09265dbd5c17f1097adaae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"caption\":\"Khushboo Sahu\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/khushboo-sahu062\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create Category grid with category children count column in UI component form - Webkul Blog","description":"Create Category grid with category children count column in UI component form, how to create category grid in UI component","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:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/","og_locale":"en_US","og_type":"article","og_title":"Create Category grid with category children count column in UI component form - Webkul Blog","og_description":"Create Category grid with category children count column in UI component form, how to create category grid in UI component","og_url":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2021-09-12T18:26:43+00:00","article_modified_time":"2024-07-24T11:53:50+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1-1200x413.png","type":"","width":"","height":""}],"author":"Khushboo Sahu","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Khushboo Sahu","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/"},"author":{"name":"Khushboo Sahu","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/f94b8f53397bf85810761d76c98fadca"},"headline":"Create Category grid with category children count column in UI component form","datePublished":"2021-09-12T18:26:43+00:00","dateModified":"2024-07-24T11:53:50+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/"},"wordCount":278,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1-1200x413.png","keywords":["category children","category grid","children_count","UI component form","Ui component grid"],"articleSection":["Magento 2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/","url":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/","name":"Create Category grid with category children count column in UI component form - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1-1200x413.png","datePublished":"2021-09-12T18:26:43+00:00","dateModified":"2024-07-24T11:53:50+00:00","description":"Create Category grid with category children count column in UI component form, how to create category grid in UI component","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/SQLResult1-1.png","width":1396,"height":481,"caption":"SQLResult1-1"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/create-category-grid-with-category-children-count-column-in-ui-component-form\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create Category grid with category children count column in UI component form"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/f94b8f53397bf85810761d76c98fadca","name":"Khushboo Sahu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cabac965df656d114e6bf340df07518c990eda03bb09265dbd5c17f1097adaae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cabac965df656d114e6bf340df07518c990eda03bb09265dbd5c17f1097adaae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","caption":"Khushboo Sahu"},"url":"https:\/\/webkul.com\/blog\/author\/khushboo-sahu062\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/305259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/249"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=305259"}],"version-history":[{"count":4,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/305259\/revisions"}],"predecessor-version":[{"id":305976,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/305259\/revisions\/305976"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=305259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=305259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=305259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}