<Columns> <telerik:GridBoundColumn DataField="Patient.DisplayId" DataType="System.String" HeaderText="Patient ID" SortExpression="Patient.DisplayId" /> <telerik:GridBoundColumn DataField="Patient.FullName" DataType="System.String" HeaderText="Name" SortExpression="Patient.FullName" /> <telerik:GridDateTimeColumn DataField="Patient.Dob" DataType="System.DateTime" HeaderText="Date of Birth" SortExpression="Patient.Dob" ItemStyle-Width="85px" DataFormatString="{0:MM/dd/yyyy}" ><ItemStyle Width="85px"></ItemStyle> </telerik:GridDateTimeColumn> <telerik:GridNumericColumn DataField="Age" DataType="System.Int32" HeaderText="Age" SortExpression="Age" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" ><ItemStyle HorizontalAlign="Right" Width="50px"></ItemStyle> </telerik:GridNumericColumn> <telerik:GridNumericColumn DataField="Count" DataType="System.Int32" HeaderText="Claims" SortExpression="Count" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px" ><ItemStyle HorizontalAlign="Right" Width="50px"></ItemStyle> </telerik:GridNumericColumn> <telerik:GridNumericColumn DataField="AmountPaid" DataType="System.Decimal" HeaderText="Amount Paid" SortExpression="AmountPaid" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:c}" ItemStyle-Width="85px" ><ItemStyle HorizontalAlign="Right" Width="85px"></ItemStyle> </telerik:GridNumericColumn> </Columns> protected void radGridRate_DetailTableDataBind(object sender, GridDetailTableDataBindEventArgs e)
{
GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
System.Diagnostics.Debug.WriteLine("e.DetailTableView: " + e.DetailTableView.Name);
switch (e.DetailTableView.Name)
{
case "ServiceParent":
{
radGridRate.MasterTableView.DetailTables[0].ShowHeader = true;
string ServiceName = dataItem.GetDataKeyValue("ServiceName").ToString();
DataTable dtServiceParent = (DataTable)Session["dtServicesParent"];
var ServiceParentList = from tinRecord in dtServiceParent.AsEnumerable()
orderby tinRecord.Field<string>("ServiceName")
where tinRecord.Field<string>("ServiceName") == ServiceName
select new
{
ServiceName = tinRecord.Field<string>("ServiceName"),
ParentName = tinRecord.Field<string>("ParentName")
};
e.DetailTableView.DataSource = (DataSet) ServiceParentList.AsEnumerable();
etc...
Thanks!
Dave Gilden MCSD / Ft. Worth Tx.