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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesGridview and TabContainer in my moduleGridview and TabContainer in my module
Previous
 
Next
New Post
12/7/2010 4:16 AM
 

Hi, I have qustition about programing DN modules. I have DN module with Gridview, TabContainer and
 NumericUpDown, but there are some diferent between programing aspx and ascx page in my opinion.

At first -  I add linkbuttons to the template field in Gridview(edit and delete buttons).I need,when user click on
delete button,show confirm dialog Are you sure........In aspx page it is very easy, I add extender and it is done.
This doesn't work on my ascx (module) page,

I tried

Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Response.Write("<script>confirm('My message');</script>")
    End Sub

Or

    Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GridView1.RowDeleting

  Dim l As LinkButton

        Try
            l = TryCast(GridView1.FindControl("LinkButton2"), LinkButton)
            l.Attributes.Add("onclick", " return " + "confirm('Are you sure you want to delete this record " + "CategoryID" + "')")

        Catch ex As Exception

        End Try

    End Sub

At second - I tried add to the my ascx page Ajax.net components, concretely

TabContainer and NumericUpDown. NumericUpDown I bind with my TextBox on this page.
Both components (TabContainer and NumericUpDown)  I pasted to the div container, and set
backgroud color for this div. I can see div, but I don't see TabContainer  neither
NumericUpDown (I fill TabContainer with TabPanels,  some text of course).

Is there any restriction in Ajax components for ascs page?
I tried to find any resolution on internet, but without success.
Regards

 
New Post
12/8/2010 9:34 AM
 
Hi

I did not know about ajax component related question.
But following code will work for gridview row delete confirmation using javascript..

<asp:GridView ID="grdComments" runat="server">
<Columns>
 <asp:TemplateField ShowHeader="False">
  <ItemTemplate>
   <asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="False"
     OnClientClick="return confirm('Do you want to delete this row?');" />
  </ItemTemplate>
 </asp:TemplateField>
</Columns>

Thanks
Sibabrata Dash
Mindfire Solutions
 
New Post
12/8/2010 12:26 PM
 
Hi, thanks you for your code, it is works! I changed too Ajax.Net library to another version (like as Chad Richardson)  and now other ajax code in my project (TabContainer etc.) works too.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesGridview and TabContainer in my moduleGridview and TabContainer in my 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