Hi Everyone,
I was wondering if someone can provide me with some help or guidance. I have a RadGrid that is being fill manually(code behind) using entity framework. One of the column contain a foreign key ID(DataField="CostCenterType_ID") which will make no sense to a user. How can I get it to display primary table description column? Below is the columns for my grid and code behind to fill it. Thank you in advance....
I was wondering if someone can provide me with some help or guidance. I have a RadGrid that is being fill manually(code behind) using entity framework. One of the column contain a foreign key ID(DataField="CostCenterType_ID") which will make no sense to a user. How can I get it to display primary table description column? Below is the columns for my grid and code behind to fill it. Thank you in advance....
01.<Columns>02. <telerik:GridEditCommandColumn ButtonType="ImageButton" />03. <telerik:GridBoundColumn DataField="ID" HeaderText="ID" ReadOnly="true"04. ForceExtractValue="Always" ConvertEmptyStringToNull="true" DataType="System.Int32" />05. <telerik:GridBoundColumn DataField="CostCenterNumber" HeaderText="Cost Center No" Visible="true" DataType="System.Int32" />06. <telerik:GridBoundColumn DataField="CostCenterName" HeaderText="Cost Center Name" />07. <telerik:GridBoundColumn DataField="CostCenterType_ID" HeaderText="Cost Type"/>08. <telerik:GridBoundColumn DataField="UpdateBy" HeaderText="Last Update by" ReadOnly="True" Visible="True" AllowFiltering="False" />09. <telerik:GridBoundColumn DataField="UpdateDateTime" HeaderText="UpdateDateTime" Visible="true" DataType="System.DateTime" ReadOnly="True" AllowFiltering="False" />10. <telerik:GridBoundColumn DataField="RowVersion" HeaderText="Row Version" DataType="System.Byte" Visible="false" ReadOnly="true"></telerik:GridBoundColumn>11. <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"12. ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />13. </Columns>1.//Supply RadGrid with data from Entity Framework2. protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)3. {4. RadGrid1.DataSource = DbContext.CostCenters;5. }