| <telerik:RadGrid ID="RadGridParent" runat="server" EnableAJAX="True" GridLines="None" | |
| ShowGroupPanel="True" Skin="Office2007" AutoGenerateColumns="False" Description="Messages" | |
| ShowStatusBar="True" Subtitle="Messages" Title="Messages" Width="98%" | |
| OnItemCommand="RadGridParent_ItemCommand" ShowHeader="False" | |
| PagerStyle-AlwaysVisible="False" AllowPaging="True" PageSize="2" | |
| OnDetailTableDataBind="RadGridParent_DetailTableDataBind" | |
| onitemdatabound="RadGridParent_ItemDataBound" | |
| onneeddatasource="RadGridParent_NeedDataSource" | |
| onprerender="RadGridParent_PreRender" AllowSorting="True" | |
| AllowMultiRowSelection="True"> | |
| <MasterTableView DataKeyNames="CategoryID" CommandItemDisplay="Top"> | |
| <DetailTables> | |
| <telerik:GridTableView runat="server" DataKeyNames="CategoryID" | |
| AutoGenerateColumns="False" GridLines="Both" | |
| CommandItemDisplay="Bottom" AllowAutomaticInserts="false" AllowAutomaticUpdates="false" | |
| HierarchyLoadMode="ServerOnDemand" ShowHeader="True" | |
| PagerStyle-AlwaysVisible="True" AllowCustomPaging="True" | |
| BorderStyle="Ridge" Width="100%" | |
| NoDetailRecordsText="There are no messages." > | |
| <ParentTableRelation> | |
| <telerik:GridRelationFields DetailKeyField="CategoryID" MasterKeyField="CategoryID" /> | |
| </ParentTableRelation> | |
| <RowIndicatorColumn Visible="false"> | |
| <HeaderStyle Width="20px" /> | |
| </RowIndicatorColumn> | |
| <ExpandCollapseColumn Resizable="False"> | |
| <HeaderStyle Width="20px" /> | |
| </ExpandCollapseColumn> | |
| <PagerStyle Mode="NumericPages"></PagerStyle> | |
| <CommandItemTemplate> | |
| <div> | |
| <table border=0 cellspacing=0 cellpadding=0 width="100%"> | |
| <tr> | |
| <td width="40%"> | |
| <div style="float:left;"> | |
| <asp:LinkButton ID="btnDeleteMessage" ConfirmText="Sure?" runat="server" Text="Delete Selected" CommandName="MessageDelete" OnClientClick="return ConfirmDelete(this);" SkinId="swGridDeleteSelectedLinkButton"> </asp:LinkButton> | |
| </div> | |
| </td> | |
| <td width="20%"> | |
| <div style="float:left;"> | |
| <asp:LinkButton ID="btnMessageMarkAsRead" runat="server" Text="Mark Selected as Read" CommandName="MessageMarkRead" SkinId="swGridMarkMessageReadLinkButton"> </asp:LinkButton> | |
| </div> | |
| </td> | |
| <td width="40%"> | |
| <div style="float:right;"> | |
| <asp:LinkButton ID="btnMessageMarkAsUnread" runat="server" Text="Mark Selected as Unread" CommandName="MessageMarkUnread" SkinId="swGridMarkMessageUnreadLinkButton"></asp:LinkButton> | |
| </div> | |
| </td> | |
| </tr> | |
| </table> | |
| </div> | |
| </CommandItemTemplate> | |
| <Columns> | |
| <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderText="Select All"> | |
| <HeaderStyle Width="10px" /> | |
| </telerik:GridClientSelectColumn> | |
| <telerik:GridBoundColumn DataField="IsRead" DataType="System.String" HeaderText="" Groupable="false" | |
| SortExpression="IsRead" UniqueName="MessageReadIcon" Visible="True"> | |
| <HeaderStyle Width="10px" /> | |
| <ItemStyle Width="10px" /> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="CategoryID" DataType="System.Int32" Groupable="false" | |
| ReadOnly="True" SortExpression="NotificationMsgID" UniqueName="NotificationMsgID" Visible="False"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="NotificationMsgUserID" DataType="System.Int32" Groupable="false" | |
| ReadOnly="True" SortExpression="NotificationMsgUserID" UniqueName="NotificationMsgUserID" Visible="False"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="RVNotificationMsgUser" DataType="System.Int32" Groupable="false" | |
| ReadOnly="True" UniqueName="RVNotificationMsgUser" Visible="False"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="Topic" HeaderText="Topic" DataType="System.String" Groupable="false" | |
| SortExpression="Topic" UniqueName="Topic"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="SendDate" DataType="System.DateTime" Groupable="false" | |
| HeaderText="Date" SortExpression="SendDate" UniqueName="SendDate"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="Sender" DataType="System.String" HeaderText="From" Groupable="false" | |
| SortExpression="Sender" UniqueName="Sender"> | |
| <ItemStyle Width="140px" /> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="MessageText" DataType="System.String" HeaderText="Message" Groupable="false" SortExpression="MessageText" | |
| UniqueName="MessageText"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="SenderUserLastName" UniqueName="SenderUserLastName" Groupable="false" Visible="False"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="SenderUserFirstName" UniqueName="SenderUserFirstName" Groupable="false" Visible="False"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="SenderUserMiddleName" UniqueName="SenderUserMiddleName" Groupable="false" Visible="False"> | |
| </telerik:GridBoundColumn> | |
| </Columns> | |
| <editformsettings> | |
| <popupsettings scrollbars="None" /> | |
| </editformsettings> | |
| </telerik:GridTableView> | |
| </DetailTables> | |
| <editformsettings> | |
| <popupsettings scrollbars="None" /> | |
| </editformsettings> | |
| <CommandItemTemplate> | |
| <div style="float:right;text-align:right"> | |
| <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid" | |
| SkinID="swGridRefreshLinkButton" Text="Refresh" ToolTip="Refresh"> </asp:LinkButton> | |
| </div> | |
| </CommandItemTemplate> | |
| <RowIndicatorColumn Visible="False"> | |
| <HeaderStyle Width="20px"></HeaderStyle> | |
| </RowIndicatorColumn> | |
| <ExpandCollapseColumn Visible="true" Resizable="False"> | |
| <HeaderStyle Width="20px"></HeaderStyle> | |
| </ExpandCollapseColumn> | |
| <Columns> | |
| <telerik:GridBoundColumn DataField="MessageDescription" HeaderText="Messages" | |
| SortExpression="MessageDescription" UniqueName="MessageDescription" | |
| ItemStyle-Font-Bold="true" Groupable="false"> | |
| <ItemStyle Font-Bold="True" /> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="CategoryID" UniqueName="CategoryID" HeaderText="" Visible="False"> | |
| </telerik:GridBoundColumn> | |
| </Columns> | |
| </MasterTableView> | |
| <GroupPanel ID="SystemWorksStandardGridGroupPanel" Text="Notifications"> | |
| <PanelStyle Width="100%" Height="20px" /> | |
| </GroupPanel> | |
| <ClientSettings AllowColumnsReorder="False" AllowDragToGroup="True" ReorderColumnsOnClient="False"> | |
| <Selecting AllowRowSelect="True" /> | |
| <Scrolling AllowScroll="false" UseStaticHeaders="false" /> | |
| </ClientSettings> | |
| <PagerStyle Mode="NumericPages"></PagerStyle> | |
| </telerik:RadGrid> | |
| protected void RadGridMessages_NeedDataSource(object source, GridNeedDataSourceEventArgs e) | |
| { | |
| if (!e.IsFromDetailTable) | |
| { | |
| LoadParentData(); | |
| } | |
| } | |
| private void LoadParentData() | |
| { | |
| Category[] cats = new Category[2]; | |
| Category cat1= new Category(); | |
| cat1.MessageTypeID = 1; | |
| cat1.MessageDescription = "Catorogy 1"; | |
| cats [0] = cat1 ; | |
| cat1.MessageTypeID = 2; | |
| cat1.MessageDescription = "Category 2"; | |
| cats[1] = cat1; | |
| RadGridParent.MasterTableView.DataSource = cats; | |
| } | |
| protected void RadGridParent_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e) | |
| { | |
| childDataSource[] childDS; | |
| GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem; | |
| int catId = Int32.Parse(dataItem.GetDataKeyValue("CategoryID").ToString()); | |
| childDS = GetChildDataSourceByCategory(catId); | |
| e.DetailTableView.DataSource = childDS; | |
| } | |
<?
xml version="1.0" encoding="utf-8" ?>
<
NewDataSet>
<
BillItemLine>
<
ItemLineAmount>844.35</ItemLineAmount>
<
ItemLineItemRefListID>350000-1247582799</ItemLineItemRefListID>
<
EstimateKey>Plan 804-1:804-1-502</EstimateKey>
<
Plan>804-1</Plan>
<
HouseAddress>3341 West Avenue, Beaumont</HouseAddress>
<
EstimateLineAmount>6000</EstimateLineAmount>
<
Name>804-1-502</Name>
<
SalesOrPurchaseDesc>Foundation Labor</SalesOrPurchaseDesc>
</
BillItemLine>
<
BillItemLine>
<
ItemLineAmount>84.87</ItemLineAmount>
<
ItemLineItemRefListID>370000-1247585073</ItemLineItemRefListID>
<
EstimateKey>Plan 804-1:804-1-633</EstimateKey>
<
Plan>804-1</Plan>
<
HouseAddress>3341 West Avenue, Beaumont</HouseAddress>
<
EstimateLineAmount>300</EstimateLineAmount>
<
Name>804-1-633</Name>
<
SalesOrPurchaseDesc>Portalet</SalesOrPurchaseDesc>
</
BillItemLine>
</
NewDataSet>
can anyone please me? thx....


| The data contract type 'Telerik.Web.UI.RadTreeNodeData' cannot be deserialized because the required data members '_attributes, _enabled, _text, _value, _contentCssClass, _contextMenuID, _cssClass, _disabledCssClass, _disabledImageUrl, _expandMode, _expandedImageUrl, _hoveredCssClass, _hoveredImageUrl, _imageUrl, _navigateUrl, _postBack, _selectedCssClass' were not found. |
| {"node":{"Text":"XYZ","Value":null,"ExpandMode":3,"NavigateUrl":"/Child/XYZ75/","PostBack":true,"DisabledCssClass":null,"SelectedCssClass":null, "HoveredCssClass":null,"HoveredImageUrl":null,"DisabledImageUrl":null, "ExpandedImageUrl":null,"ContextMenuID":"BUCtxMenu", "Attributes":[{"Key":"key","Value":"BU-370"}, {"Key":"A","Value":"False"},{"Key":"SIA","Value":"0"}]},"context":[]} |