Here's my try about JQGrid :
<JQ:JQGridColumn
DataField="ID"
PrimaryKey="true"
DataType="int"
HeaderText="NO"
Width="60" />
<JQ:JQGridColumn
DataField="CustomerID.Name"
DataType="String"
HeaderText="Customer Name"
Width="100" />
<JQ:JQGridColumn
DataField="CustomerID.Surname"
Searchable="false"
DataType="String"
HeaderText="Customer Surname
Width="100" />
And ObjectDataSource Class is :
public class Order
{
private int iD;
private Customer customerID;
public Customer CustomerID
{
get { return customerID; }
set { customerID = value; }
}
public int ID
{
get { return iD; }
set { iD = value; }
}
}
And Customer class is like Order class. So when i try to this it's giving that error :
The column with DataField=CustomerID.Name does not exist in the datasource. (But it does)
How can i solve it ? Thanks.
I've got the answer :
public string CustomerName
{
get { return CustomerID == null ? "" : CustomerID.Name; }
}
If someone needs, use it.