Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. DataGridView with AJAX Modal popup extender

DataGridView with AJAX Modal popup extender

Scheduled Pinned Locked Moved ASP.NET
csharpvisual-studiosysadmintoolsquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cocoonwls
    wrote on last edited by
    #1

    hi all, I am using VS 2005,C# with framework 2.0 and AJAX toolkit. I got a datagridview and already create a CommandField, button type. I would like to display particular row details by modalpopup extender. Currently i am using code behind (gridview_SelectedIndexChanged to get neccesarry data) and method modalpopupextender.Show() to acheive it,but its is pretty slow when browse via internet (its ok if browse locally). My coding is show like below: aspx:

    OnSelectedIndexChanged="DataGridProduct_SelectedIndexChanged" AutoGenerateColumns="False">

              Description</HeaderTemplate>
              <%# Limit(Eval("ProdDesc"),25)%>
        </asp:TemplateField>
    

    </Columns>

    modalpopup

    <cc1:ModalPopupExtender ID="mpeProduct" runat="server" TargetControlID="Button1" PopupControlID="panelProduct" CancelControlID="btnClose" BackgroundCssClass="modalBackground" PopupDragHandleControlID="panelDrag" Drag="true">
    </cc1:ModalPopupExtender>

    aspx.cs

    protected void DataGridProduct_SelectedIndexChanged(object sender, EventArgs e)
    {
    if (DataGridProduct.SelectedDataKey[4].ToString() == "Horizontal")
    {
    lblProductCode.Text = DataGridProduct.SelectedDataKey[0].ToString();
    lblProductName.Text = DataGridProduct.SelectedDataKey[1].ToString();
    txtProductSpec.Text = DataGridProduct.SelectedDataKey[2].ToString();
    txtProductDescription.Text = DataGridProduct.SelectedDataKey[3].ToString();
    ImgDisplay.ImageUrl = DataGridProduct.SelectedDataKey[5].ToString().Trim();
    mpeProduct.Show();
    }
    }

    so,can i use client script to acheive it, get datagridrow's data and display in modalpopup extender? any advice and tips are welcome, thanks in advance regards cocoonwls

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups