This question is locked. New answers and comments are not allowed.
Hello Telerik Staff,
What I want to do is....create a GridViewRow, with each cell binding to different objects's different property.
Say, my GridView have 3 Columns.
So the GridViewRow should have 3 cells:
Cell[0]'s content maybe Class1Obj's.Text
Cell[1]'s content maybe Class2Obj's.Date
Cell[2]'s content maybe Class2Obj's.isChecked
So is there any way I can do that? Using GridView like a table, and fill in each cell's content myself?
I don't want to create a List<DataObject> to let GridView to populate the list.
Because each row will be mix with different class's objects and columns will be dynamically created.
Edit:
I tried to do something like,
And add it to GridView with GridView.Items.Add(
But.... I guess this is not the way to doing it? Because I only get an empty row but nothing else....
Thanks,
King
What I want to do is....create a GridViewRow, with each cell binding to different objects's different property.
Say, my GridView have 3 Columns.
So the GridViewRow should have 3 cells:
Cell[0]'s content maybe Class1Obj's.Text
Cell[1]'s content maybe Class2Obj's.Date
Cell[2]'s content maybe Class2Obj's.isChecked
So is there any way I can do that? Using GridView like a table, and fill in each cell's content myself?
I don't want to create a List<DataObject> to let GridView to populate the list.
Because each row will be mix with different class's objects and columns will be dynamically created.
Edit:
I tried to do something like,
GridViewRow aGridViewRow = new GridViewRow(); GridViewCellBase aGridViewCell = new GridViewCellBase(); aGridViewCell.Name = "Hello"; aGridViewCell.Content = "123"; GridViewCellBase aGridViewCell2 = new GridViewCellBase(); aGridViewCell2.Name = "Hello2"; aGridViewCell2.Content = "123"; aGridViewRow.Cells.Add(aGridViewCell); aGridViewRow.Cells.Add(aGridViewCell2);aGridViewRow);But.... I guess this is not the way to doing it? Because I only get an empty row but nothing else....
Thanks,
King