Getting data from Gridview and update by updatecommand

Last post 05-03-2007, 5:43 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  01-27-2007, 12:10 PM 26193

    Getting data from Gridview and update by updatecommand

    Hi.
     
    I have a code that show a gridview and the "CuteEditor" no problem there but how do i do so i can click a record and then the "SiteMainText" is being showed in the editor and how can i then click a button so it update the record.
     
    My code is:

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test_Default" %>

    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >

    <head runat="server">

    <title>Untitled Page</title>

    </head>

    <body>

    <form id="form1" runat="server">

    <div>

    <asp:SqlDataSource ID="SqlDataSourceSub" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringSub %>"

    ProviderName="<%$ ConnectionStrings:ConnectionStringSub.ProviderName %>" SelectCommand="SELECT * FROM [MainSiteText] ORDER BY [SiteMainID]">

    </asp:SqlDataSource>

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="SiteMainID"

    DataSourceID="SqlDataSourceSub">

    <Columns>

    <asp:BoundField DataField="SiteMainID" HeaderText="SiteMainID" InsertVisible="False"

    ReadOnly="True" SortExpression="SiteMainID" />

    <asp:BoundField DataField="SiteMainIdentity" HeaderText="SiteMainIdentity" SortExpression="SiteMainIdentity" />

    <asp:BoundField DataField="SiteMainText" HeaderText="SiteMainText" SortExpression="SiteMainText" />

    <asp:BoundField DataField="SiteMainID" HeaderText="ID" ReadOnly="True" SortExpression="SiteMainID" />

    </Columns>

    </asp:GridView>

    <CE:Editor id="Editor1" EditorWysiwygModeCss="../example.css" runat="server" ></CE:Editor>

    </div>

    </form>

    </body>

    </html>

  •  05-03-2007, 5:43 PM 29160 in reply to 26193

    Re: Getting data from Gridview and update by updatecommand

    aero,
     
    Here is the solution:
     
    Set the EnablePartialRendering property of ScriptManager to false.
     
    Code:
     
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="false">
    </asp:ScriptManager>

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML