
<telerik:RadGrid ID="gvwParent" runat="server" AutoGenerateColumns="false" Width="100%"
ShowStatusBar="true" PageSize="3" AllowPaging="true" GridLines="None" CellPadding="0"
OnPreRender="gvwParent_PreRender" CellSpacing="0" CssClass="MainClass" AllowSorting="true"
OnItemDataBound="gvwParent_OnItemDataBound" ShowHeader="false" ShowFooter="false" DataMember="Parent"
AllowFilteringByColumn="true" OnNeedDataSource="gvwParent_NeedDataSource" OnDetailTableDataBind="gvwParent_DetailTableDataBind">
<AlternatingItemStyle CssClass="Row2" />
<ItemStyle CssClass="Row1" />
<PagerStyle CssClass="PagerClass" Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true"
ShowPagerText="false" />
<MasterTableView DataKeyNames="Parent_Entity_Id" AllowMultiColumnSorting="true">
<DetailTables>
<telerik:GridTableView AutoGenerateColumns="false" AllowPaging="true" AllowFilteringByColumn="true"
DataMember="ChildEntities" GridLines="None" CellPadding="0" CellSpacing="0"
ShowFooter="false" CssClass="MainClass" DataKeyNames="Child_Entity_Id"
DataSourceID='<%# Eval("ChildEntities) %>' AllowSorting="true">
<PagerStyle CssClass="PagerClass" Mode="NumericPages" />
<HeaderStyle CssClass="HeaderClass" />
<AlternatingItemStyle CssClass="Row2" />
<FooterStyle CssClass="FooterClass" />
<ItemStyle CssClass="Row1" />
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="Parent_Entity_Id" MasterKeyField="Parent_Entity_Id" />
</ParentTableRelation>
<Columns>
<telerik:GridTemplateColumn HeaderText="Title" ItemStyle-CssClass="gvwNameWidth"
SortExpression="Child_Entity_Title">
<ItemTemplate>
<asp:Label ID="lblName" Text='<%#Eval("Child_Entity_Title") %>'
ToolTip='<%# Eval("Child_Entity_Desc") %>' runat="server" />
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<NoRecordsTemplate>
No Records...!
</NoRecordsTemplate>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridTemplateColumn>
<ItemTemplate>
<table class="tblmain">
<tr>
<td width="4px">
<asp:Image ID="imgStatus" runat="server" Style="padding-left: 3px;" ImageUrl="~/Images/spacer.gif"
Width="6px" Height="6px" />
</td>
<td class="Parent_HeaderCss">
<asp:Label ID="lblParentName" runat="server" Text='<%# Eval("Parent_Entity_Title") %>'> </asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
--------Code
protected void gvwParent_OnItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
try
{
if (e.Item.OwnerTableView.DataMember.Equals("Child_Entities"))
{
}
else
{
if (e.Item.OwnerTableView.DataMember.Equals("Parent"))
{
if (e.Item.ItemType == Telerik.Web.UI.GridItemType.Item || e.Item.ItemType == Telerik.Web.UI.GridItemType.AlternatingItem)
{
}
}
}
}
catch (Exception ex)
{
ExceptionManager.HandleException("", ex);
}
}
protected void gvwParent_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
if (!e.IsFromDetailTable)
{
gvwParent.DataSource = Parent_Entities;
}
}
protected void gvwParentt_PreRender(object sender, EventArgs e)
{
try
{
if (!Page.IsPostBack)
{
gvwParent.MasterTableView.Items[0].Expanded = true;
}
}
catch (Exception ex)
{
ExceptionManager.HandleException("", ex);
}
}
protected void gvwParent_DetailTableDataBind(object sender, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
{
try
{
if (e.DetailTableView.Name.Equals("Chiled_Entities"))
{
Parent_Entity parentEntity = Parent_Entities.Find(delegate(Parent_Entity PE) { return PE.Parent_Entity_Id == Convert.ToInt32(e.DetailTableView.ParentItem.GetDataKeyValue("Parent_Entity_Id")); });
if (parentEntity != null)
e.DetailTableView.DataSource = parentEntity .Child_Entities;
}
}
catch (Exception ex)
{
ExceptionManager.HandleException("", ex);
}
}
Thanks,
Swetha
| <Legend> |
| <Appearance Position-AlignedPosition="Bottom" Overflow="Row"> |
| </Appearance> |
| </Legend> |
Hi!
Scheduler Version 2008.2.1001.35
The problem is best described in the attached file. The file shows part of the week view, week by week. I have Scheduler that is bound to generic list. I cant find why my appointments are not displying always in the same manner.
Hi Telerik,
We are using ajax rad tree view in our project with the custom skin styles. We found that the background-position values in the styles classes: rtPlus, rtMinuns are replacing with different values. Due to that the expand and collapse images in the tree view nodes are disappearing on mouse over.
Note: But the same skin is working fine if we use it on another project.
Please suggest me to apply only skin styles.
Thanks in advance,
Balaji Velasiri