I downloaded a RadGrid that i want to try before i try i read the instructions
to implement the grid with the outlook skin.
http://demos.telerik.com/aspnet-ajax/window/examples/demoemail/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/Common/QSFInstructions/Instructions.html
i made the changes in the aspx file and i am trying to run the solution but i recive an exeption
that says.
The data source 'SessionDataSource1' only supports a single view named 'DefaultView'. You may also leave the view name (also called a data member) empty for the default view to be chosen
what do i do.
this is the Code:
<%
@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
<%
@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >
<
head id="Head1" runat="server">
<!-- custom head section -->
<link href="Styles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.RadGrid th input
{
margin-top:0;
margin-bottom:0;
height:12px;
}
.OutlookTopBar
{
background-image: url(Img/outlookBarTop.gif);
background-color: white;
background-repeat: repeat-x;
padding-top: 3px;
border: 1px solid #002D96;
width: 180px;
font-size: 11px;
padding-left: 4px;
}
.OutlookTable
{
background-color:#c4dafa;
margin-top:4px;
}
.MailSubject
{
color: #808080;
}
.SelectedRow_Outlook
.MailSubject
{
color: white;
}
</style>
<!-- end of custom head section -->
</
head>
<
body class="BODY">
<form runat="server" id="mainForm" method="post">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
<!-- content start -->
<div style="background: url(img/bg.jpg) no-repeat; padding: 7px 5px; width:742px;">
<div style="font-size:13px;font-weight: bold;color:#15428b;padding: 4px 30px;"> <b>Outlook®</b> style</div>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"/>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<telerik:RadGrid ID="RadGrid1" runat="server" Width="741px" AllowSorting="True"
AllowMultiRowSelection="True" AllowPaging="True" ShowGroupPanel="True" GridLines="None"
AutoGenerateColumns="False" DataMember="Mails"
DataSourceID="SessionDataSource1">
<PagerStyle Mode="NextPrevAndNumeric">
</PagerStyle>
<
HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
<MasterTableView DataMember="Mails" AllowMultiColumnSorting="True"
Width="724px" TableLayout="Fixed" DataSourceID="SessionDataSource1">
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldAlias="Received" FieldName="Received" FormatString="{0:D}" HeaderValueSeparator=" from date: "></telerik:GridGroupByField>
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField SortOrder="Descending" FieldName="Received" FormatString="" HeaderText="">
</telerik:GridGroupByField>
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
</MasterTableView>
<ClientSettings AllowDragToGroup="True">
<Selecting AllowRowSelect="True"></Selecting>
<Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="275px"></Scrolling>
<ClientMessages DragToGroupOrReorder="Drag to group" />
</ClientSettings>
</telerik:RadGrid>
<asp:SqlDataSource ID="SessionDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
ProviderName
="System.Data.SqlClient" SelectCommand="SELECT ProductID, ProductName, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, Discontinued FROM [Products]"
DeleteCommand
="DELETE FROM [Products] WHERE [ProductID] = @ProductID" InsertCommand="INSERT INTO Products(ProductName, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, Discontinued) VALUES (@ProductName, @CategoryID, @QuantityPerUnit, @UnitPrice, @UnitsInStock, @Discontinued)"
UpdateCommand
="UPDATE [Products] SET [ProductName] = @ProductName, [CategoryID] = @CategoryID, [QuantityPerUnit] = @QuantityPerUnit, [UnitPrice] = @UnitPrice, [UnitsInStock] = @UnitsInStock, [Discontinued] = @Discontinued WHERE [ProductID] = @ProductID AND [ProductName] = @ProductName AND [CategoryID] = @CategoryID AND [QuantityPerUnit] = @QuantityPerUnit AND [UnitPrice] = @UnitPrice AND [UnitsInStock] = @UnitsInStock AND [Discontinued] = @Discontinued"
OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues">
<DeleteParameters>
<asp:Parameter Name="original_ProductID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="QuantityPerUnit" Type="String" />
<asp:Parameter Name="UnitPrice" Type="Decimal" />
<asp:Parameter Name="UnitsInStock" Type="Int16" />
<asp:Parameter Name="Discontinued" Type="Boolean" />
<asp:Parameter Name="original_ProductID" Type="Int32" />
<asp:Parameter Name="original_ProductName" Type="String" />
<asp:Parameter Name="original_QuantityPerUnit" Type="String" />
<asp:Parameter Name="original_UnitPrice" Type="Decimal" />
<asp:Parameter Name="original_UnitsInStock" Type="Int16" />
<asp:Parameter Name="original_Discontinued" Type="Boolean" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="QuantityPerUnit" Type="String" />
<asp:Parameter Name="UnitPrice" Type="Decimal" />
<asp:Parameter Name="UnitsInStock" Type="Int16" />
<asp:Parameter Name="Discontinued" Type="Boolean" />
</InsertParameters>
</
asp:SqlDataSource>
</div>
<!-- content end -->
</form>
</
body>
</
html>