or
<ajax:RadGrid ID="rgdRptAct" runat="server" DataSourceID="sqlCust" AutoGenerateColumns="false" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowPaging="true" PageSize="3"> <SortingSettings SortToolTip="<%$ Resources:Resource, Sort %>" /> <ClientSettings EnableRowHoverStyle="True" EnablePostBackOnRowClick="true"> <Selecting AllowRowSelect="True" /> </ClientSettings> <MasterTableView EditMode="InPlace" DataKeyNames="Cno,CustPrefix,Action" CommandItemDisplay="Top" AllowSorting="True" NoMasterRecordsText="<%$ Resources:Resource, Search_Display %>"> <PagerStyle Mode="NextPrevAndNumeric" PagerTextFormat="{2}{3}{4}Page {0} of {1}" PageSizeLabelText="" AlwaysVisible="true" NextPageToolTip="<%$ Resources:Resource, NextPage %>" PrevPageToolTip="<%$ Resources:Resource, PreviousPage %>" LastPageToolTip="<%$ Resources:Resource, LastPage %>" FirstPageToolTip="<%$ Resources:Resource, FirstPage %>"/> <Columns> <ajax:GridTemplateColumn UniqueName="Action" HeaderText="* Action" SortExpression="LMUser" HeaderStyle-Width="140px" ItemStyle-VerticalAlign="Top"> <ItemTemplate> <%#DataBinder.Eval(Container.DataItem, "Action")%> </ItemTemplate> <EditItemTemplate> <ajax:RadComboBox ID="DdlAction" runat="server" AutoPostBack="False" AllowCustomText="False" DataSourceID="sqlDllAction" AppendDataBoundItems="true" DataTextField="DataValue" DataValueField="DataValue" SelectedValue='<%# DataBinder.Eval(Container.DataItem, "DataValue") %>'> </ajax:RadComboBox> </EditItemTemplate> </ajax:GridTemplateColumn></Columns>
SelectedValue='<%# DataBinder.Eval(Container.DataItem, "DataValue") %>'><telerik:RadEditor ID="RadContentEditor" Runat="server" Width="100%" Height="350px"> <Tools> <telerik:EditorToolGroup Tag="MainToolbar"> <telerik:EditorTool Name="Print" ShortCut="CTRL+P" /> <telerik:EditorTool Name="AjaxSpellCheck" /> <telerik:EditorTool Name="FindAndReplace" ShortCut="CTRL+F" /> <telerik:EditorTool Name="SelectAll" ShortCut="CTRL+A" /> <telerik:EditorTool Name="Cut" /> <telerik:EditorTool Name="Copy" ShortCut="CTRL+C" /> <telerik:EditorTool Name="Paste" ShortCut="CTRL+V" /> <telerik:EditorToolStrip Name="PasteStrip"> </telerik:EditorToolStrip> <telerik:EditorSeparator /> <telerik:EditorSplitButton Name="Undo"> </telerik:EditorSplitButton> <telerik:EditorSplitButton Name="Redo"> </telerik:EditorSplitButton> </telerik:EditorToolGroup>
******More tool groups here**********
</Tools> <Content> </Content> <ImageManager UploadPaths="/BlastImages/" ViewPaths="/BlastImages/" /> <DocumentManager UploadPaths="/BlastDocuments/" ViewPaths="/BlastDocuments/" /> </telerik:RadEditor> <br /> <table id="buttonTable" width="75%" align="center"> <tr> <td style="width:50%; text-align:center;"> <telerik:RadButton ID="saveContentButton" runat="server" ButtonType="LinkButton" OnClick="saveContentButton_OnClick" Text="Update Content"> <Icon PrimaryIconCssClass="rbSave" /> </telerik:RadButton> </td> <td style="width:50%; text-align:center;"> <telerik:RadButton ID="cancelButton" runat="server" ButtonType="LinkButton" OnClick="cancelButton_OnClick" Text="Cancel"> <Icon PrimaryIconCssClass="rbCancel" /> </telerik:RadButton> </td> </tr> </table> <asp:SqlDataSource ID="sectionDS" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnString %>" SelectCommand="SELECT [Content].id, [Content].page_id, [Content].section_name, [Content].html_content FROM [Content] INNER JOIN Pages ON [Content].page_id = Pages.id WHERE [Pages].page_url=@page_url" > <SelectParameters> <asp:SessionParameter Name="page_url" SessionField="page_url" /> </SelectParameters> </asp:SqlDataSource>
protected void saveContentButton_OnClick(object sender, EventArgs e) { PageHelper ph = new PageHelper(); try { string section_id = (string)Session[Constants.SESSION_SECTION_ID]; string section_content = RadContentEditor.Content; ph.updateSectionContent(section_id, section_content); Response.Redirect("~/Web/Admin/Content/ManagePageSections.aspx"); } catch (Exception ex) { Response.Redirect("~/Errors/UnhandledException.htm"); } }var allMyFoo = (from w in fooService.GiveMeFoo() select new { ID = w.ID, Foo = w.Foo.Name });var myFooCount = fooService.CountMyFoo();return new Dictionary<string, object> { {"foo", allMyFoo}, {"fooCount", myFooCount}};
in aspx...
<telerik:GridBoundColumn UniqueName="FooName" SortExpression="Foo.Name" DataField="Foo" HeaderText="Foo" DataType="System.String">
</telerik:GridBoundColumn> var allMyFoo = (from w in fooService.GiveMeFoo() select new { ID = w.ID, Foo = new { Name = w.Foo.Name } }); var myFooCount = fooService.CountMyFoo();return new Dictionary<string, object> { {"foo", allMyFoo}, {"fooCount", myFooCount}};in aspx...<telerik:GridBoundColumn UniqueName="FooName" SortExpression="Foo.Name" DataField="Foo.Name" HeaderText="Foo" DataType="System.String"></telerik:GridBoundColumn>