Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using GridView+FormView in a DNN moduleUsing GridView+FormView in a DNN module
Previous
 
Next
New Post
6/1/2006 12:25 PM
 

Hi !

I'm trying to use the ASP.NET 2.0 GridView+FormView component inside a DNN module. To be sure, the code works fine in a ASPX page, and I want to port it into a DNN module.

I have a link button within each cell of a gridview that are bound to data items. The <item template> is:

<ItemTemplate>
<asp:LinkButton id="LinkButton1" runat="Server" CommandName="Select"><%#Eval("Task")%></asp:LinkButton>
</ItemTemplate>

where "Task" is the name of the field in the database.

In a stand-alone ASPX page, when the user clicks on the link, the PostBack argument is
"Table1$item19$LinkButton1"; the FormView is able to interpret the select command and show the item's details.

The good news is that the View code works and grid is displayed on my DNN module when inserted on a page.

However, the bad news is that the PostBack argument is now
"dnn$ctr370$View_ModuleName$Table1$item19$LinkButton1" and no action is obtained from the FormView.

Any hint to correct this is welcome !

 
New Post
7/16/2007 11:54 AM
 

Hi pchan,

I am having the same problem, how did you solve this issue, it would be of great help.

Raj

 
New Post
7/16/2007 1:46 PM
 


Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
7/18/2007 3:52 AM
 

I tried  with the sample you gave and I am not able to make it to work, can you help me out.

My code goes below:

ASCX:

<asp:ObjectDataSource ID="odsMasterData" DataObjectTypeName="Mapping.Banker" runat="server" TypeName="Modules.MasterData.ObjBankerGrid" SelectMethod="getBankerSubsetSorted" SelectCountMethod="getBankerCount" EnablePaging="True" SortParameterName="sortExpression"></asp:ObjectDataSource>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">
  <ContentTemplate>
    <asp:GridView ID="gvMasterData" runat="server" AutoGenerateColumns="false" CellSpacing="3" CellPadding="3" DataSourceID="odsMasterData" ForeColor="#333333" EnableSortingAndPagingCallbacks="false" GridLines="None" AllowPaging="True" PageSize="8" AllowSorting="True" OnRowCreated="OnRowCreated" OnRowDataBound="OnRowDataBound">
        <Columns>
            <asp:HyperLinkField
            DataTextField="FirstName"
            DataNavigateUrlFields="BankerRecordRef"
            HeaderText="First Name"
            SortExpression="FirstName"
            DataNavigateUrlFormatString='<%# DotNetNuke.Common.Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "Edit"","mid="+ Cstr(ModuleId), "bid="+ Eval("bankerID")) %>' />
            <asp:BoundField DataField="Telephone" DataFormatString="{0:G}" HeaderText="Tel." HtmlEncode="False" SortExpression="Telephone">
                <ItemStyle HorizontalAlign="Right" />
            </asp:BoundField>
        </Columns>
        <HeaderStyle CssClass="header" />
        <RowStyle CssClass="row" />
        <AlternatingRowStyle CssClass="alternaterow" />
        <PagerStyle CssClass="pager" />
        <PagerSettings FirstPageText="First" LastPageText="Last" NextPageText="Next" PreviousPageText="Prev" Mode="NextPreviousFirstLast" />
    </asp:GridView></ContentTemplate>
<Triggers>
    <asp:AsyncPostBackTrigger ControlID="gvMasterData" />
</Triggers>
</asp:UpdatePanel>
<script type="text/javascript"> function OpenWin(url) { this.location.href=url; } </script>

Code behind:

        protected void Page_Load(System.Object sender, System.EventArgs e)
        {
            if (DotNetNuke.Framework.AJAX.IsInstalled())
            {   DotNetNuke.Framework.AJAX.RegisterScriptManager();
                DotNetNuke.Framework.AJAX.WrapUpdatePanelControl(UpdatePanel1, true);
                DotNetNuke.Framework.AJAX.RegisterPostBackControl(UpdatePanel1);
            } }

 
New Post
7/18/2007 8:16 AM
 

What did not work about the sample?



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using GridView+FormView in a DNN moduleUsing GridView+FormView in a DNN module


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out