I have list of objects where object has structure of
class MyObject
{
string Name
List<strings> Values
}
Here is the list
List<MyObject> scopeInfos = new List<MyObject>()
{
new MyObject("Country")
{
Values = new List<string>()
{
"USA",
"Germany"
}
},
new MyObject("City")
{
Values = new List<string>()
{
"New York",
"Berlin"
}
},
new MyObject("Product"),
new MyObject("Shipper")
};
Here Name is unique identifier, but I could not define it in grid view.
Problem is when gridview gets such object when I select "Product" row and than try to select "Shipper" both rows remain selected. If I will add Id property to MyObject selection problem gets solved. It would be nice to be able to define which column should be identity, rather than adding "ID" of type Guid property to MyObject (which solves problem) or wrapping to another object.
class MyObject
{
string Name
List<strings> Values
}
Here is the list
List<MyObject> scopeInfos = new List<MyObject>()
{
new MyObject("Country")
{
Values = new List<string>()
{
"USA",
"Germany"
}
},
new MyObject("City")
{
Values = new List<string>()
{
"New York",
"Berlin"
}
},
new MyObject("Product"),
new MyObject("Shipper")
};
Here Name is unique identifier, but I could not define it in grid view.
Problem is when gridview gets such object when I select "Product" row and than try to select "Shipper" both rows remain selected. If I will add Id property to MyObject selection problem gets solved. It would be nice to be able to define which column should be identity, rather than adding "ID" of type Guid property to MyObject (which solves problem) or wrapping to another object.