Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
activeRowChanged not firing
posted

Hi.

I am using the igHierarchicalGrid. I have bound it to a tree level datasource. Category->Property->Value. I have a problem with selection feature after expanding rows. If I expand a row in the top most grid (Category 1) selection works as exptected. If I expand a row in the first child (Property 1) grid I can select rows in its child grid (Value 1.1,1.2,1.3), and rows in the top most grid (Category) but not the first child grid (Property 1). If I then expand another row in the first child grid (Property 2) I can select rows in its child grid (Value 2.1,2.2,2.3) but not in any other child grid. activeRowChanged does not fire when i click Property 1 row. I can always select a row in the top most grid.

Basicly I can only make selection in the last expanded value grid and Catagory grid. What am I doing wrong?

Thanks in advance.

Datasource:

{
   "List":[
      {
         "CategoryID":1712,
         "CategoryName":"Category 1",
         "ObjectType":1,
         "PropertyList":{
            "List":[
               {
                  "PropertyID":7329,
                  "PropertyName":"Property 1",
                  "CategoryID":1712,
                  "ValueList":{
                     "List":[
                        {
                           "ValueID":230770,
                           "Value":"Value 1.1",
                           "PropertyID":7329
                        },
                        {
                           "ValueID":230771,
                           "Value":"Value 1.2",
                           "PropertyID":7329
                        },
                        {
                           "ValueID":230772,
                           "Value":"Value 1.3",
                           "PropertyID":7329
                        }
                     ]
                  }
               },
               {
                  "PropertyID":7330,
                  "PropertyName":"Property 2",
                  "CategoryID":1712,
                  "ValueList":{
                     "List":[
                        {
                           "ValueID":230773,
                           "Value":"Value 2.1",
                           "PropertyID":7330
                        },
                        {
                           "ValueID":230774,
                           "Value":"Value 2.2",
                           "PropertyID":7330
                        },
                        {
                           "ValueID":230775,
                           "Value":"Value 2.3",
                           "PropertyID":7330
                        }
                     ]
                  }
               }
            ]
         }
      }
   ]
}

var categoryList = data;
$.ig.loader(function () {
$("#dgCategory").igHierarchicalGrid({
primaryKey: "CategoryID",
width: 270,
dataSourceType: "json",
height: $("#fsPricelist").height() - 65,
autoGenerateColumns: false,
responseDataKey: "List",
showHeader: false,
initialDataBindDepth: -1,
initialExpandDepth: -1,
dataSource: categoryList.List,
columns: [
{ key: "CategoryID", dataType: "number", hidden: true },
{ key: "CategoryName", headerText: "Category", dataType: "string" }
],
autoGenerateLayouts: false,
columnLayouts: [
{
key: "PropertyList",
primaryKey: "PropertyID",
foreignKey: "CategoryID",
responseDataKey: "List",
autoGenerateColumns: false,
autoGenerateLayouts: false,
showHeader: false,
columns: [
{ key: "CategoryID", dataType: "number", hidden: true },
{ key: "PropertyID", dataType: "number", hidden: true },
{ key: "PropertyName", headerText: "Property" }
],
columnLayouts: [{
key: "ValueList",
primaryKey: "ValueID",
foreignKey: "PropertyID",
responseDataKey: "List",
autoGenerateColumns: false,
autoGenerateLayouts: false,
showHeader: false,
rowTemplate: "<tr><td></td><td></td><td data-datakey='${PropertyID}'>${Value}</td></tr>",
columns: [
	{ key: "PropertyID", dataType: "number", hidden: true },
	{ key: "ValueID", dataType: "number", hidden: true },
	{ key: "Value", headerText: "Value" }
]
}]
}],
features: [
{
name: "Selection",
activeRowChanged: function (evt, ui) {
	CATEGORY.getSelectedCategory(ui.owner.grid, ui.row);
}
}
]
});
Parents Reply Children
No Data