How to add client row click funciton on datagrid

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default How to add client row click funciton on datagrid

    is there anyone help me,
    i want to add rowclick javascrip function on asp.net datagrid

    what can i do this.

    bgun


    bg Guest

  2. Similar Questions and Discussions

    1. Datagrid double click
      Hi I have 2 datagrids and I am trying to do the following: When the user click on a row in the first grid, it will call the web service to...
    2. DataGrid EditItemCommand : must click twice to make DataGrid Editable
      Hey- I am having trouble with a simple datagrid example, and need some advice if anyone is knowledgable. It's really driving me batty! I've...
    3. whole Row in datagrid is sensitive on click
      Hi, (C#, ASP.NET) I need to invoke server procedure when user click anywhere on data row in datagrid (datagrid has 6 columns). I need also know...
    4. running client side script after an <asp:ButtonColumn> click event
      "z. f." wrote Get a reference to the delete button in the ItemCreated event of your datagrid, then use: btnDelete.Attributes.Add("onclick",...
    5. mail funciton
      hope i am sending my problem to the right place recently installed PHP with Apache , on Windows 2000 paltform,,all is well, but cnat seem to get the...
  3. #2

    Default Re: How to add client row click funciton on datagrid

    Can you give me code snippet with doing by ItemDataBound

    Thanks

    "Eliyahu Goldin" <removemeegoldin@monarchmed.com> wrote in message
    news:O3HM384sFHA.460@TK2MSFTNGP15.phx.gbl...
    > You need to add "onclick" Attribute to the grid items. You can do it in
    > either ItemDataBound or PreRender event.
    >
    > Eliyahu
    >
    > "bg" <bg@bg.com> wrote in message
    > news:enzpOu4sFHA.2540@TK2MSFTNGP09.phx.gbl...
    >> is there anyone help me,
    >> i want to add rowclick javascrip function on asp.net datagrid
    >>
    >> what can i do this.
    >>
    >> bgun
    >>
    >>
    >
    >

    bg Guest

  4. #3

    Default Re: How to add client row click funciton on datagrid

    You need to add "onclick" Attribute to the grid items. You can do it in
    either ItemDataBound or PreRender event.

    Eliyahu

    "bg" <bg@bg.com> wrote in message
    news:enzpOu4sFHA.2540@TK2MSFTNGP09.phx.gbl...
    > is there anyone help me,
    > i want to add rowclick javascrip function on asp.net datagrid
    >
    > what can i do this.
    >
    > bgun
    >
    >

    Eliyahu Goldin Guest

  5. #4

    Default Re: How to add client row click funciton on datagrid

    private void dgSelection_ItemDataBound(object sender,
    System.Web.UI.WebControls.DataGridItemEventArgs e)

    {

    // provide client-side selection a datagrid row upon clicking any place on
    the row.

    ListItemType itemType = e.Item.ItemType;

    if ((itemType == ListItemType.Pager) ||

    (itemType == ListItemType.Header) ||

    (itemType == ListItemType.Footer))

    {

    return;

    }

    e.Item.Attributes["onclick"] = "onAlertsRowClick(this)";

    }


    Eliyahu

    "bg" <bg@bg.com> wrote in message
    news:OfXp0$4sFHA.3640@tk2msftngp13.phx.gbl...
    > Can you give me code snippet with doing by ItemDataBound
    >
    > Thanks
    >
    > "Eliyahu Goldin" <removemeegoldin@monarchmed.com> wrote in message
    > news:O3HM384sFHA.460@TK2MSFTNGP15.phx.gbl...
    > > You need to add "onclick" Attribute to the grid items. You can do it in
    > > either ItemDataBound or PreRender event.
    > >
    > > Eliyahu
    > >
    > > "bg" <bg@bg.com> wrote in message
    > > news:enzpOu4sFHA.2540@TK2MSFTNGP09.phx.gbl...
    > >> is there anyone help me,
    > >> i want to add rowclick javascrip function on asp.net datagrid
    > >>
    > >> what can i do this.
    > >>
    > >> bgun
    > >>
    > >>
    > >
    > >
    >
    >

    Eliyahu Goldin Guest

  6. #5

    Default Re: How to add client row click funciton on datagrid

    Thanks a lot.

    -----------------------
    "Eliyahu Goldin" <removemeegoldin@monarchmed.com> wrote in message
    news:%23kWNTL5sFHA.1448@TK2MSFTNGP10.phx.gbl...
    > private void dgSelection_ItemDataBound(object sender,
    > System.Web.UI.WebControls.DataGridItemEventArgs e)
    >
    > {
    >
    > // provide client-side selection a datagrid row upon clicking any place on
    > the row.
    >
    > ListItemType itemType = e.Item.ItemType;
    >
    > if ((itemType == ListItemType.Pager) ||
    >
    > (itemType == ListItemType.Header) ||
    >
    > (itemType == ListItemType.Footer))
    >
    > {
    >
    > return;
    >
    > }
    >
    > e.Item.Attributes["onclick"] = "onAlertsRowClick(this)";
    >
    > }
    >
    >
    > Eliyahu
    >
    > "bg" <bg@bg.com> wrote in message
    > news:OfXp0$4sFHA.3640@tk2msftngp13.phx.gbl...
    >> Can you give me code snippet with doing by ItemDataBound
    >>
    >> Thanks
    >>
    >> "Eliyahu Goldin" <removemeegoldin@monarchmed.com> wrote in message
    >> news:O3HM384sFHA.460@TK2MSFTNGP15.phx.gbl...
    >> > You need to add "onclick" Attribute to the grid items. You can do it in
    >> > either ItemDataBound or PreRender event.
    >> >
    >> > Eliyahu
    >> >
    >> > "bg" <bg@bg.com> wrote in message
    >> > news:enzpOu4sFHA.2540@TK2MSFTNGP09.phx.gbl...
    >> >> is there anyone help me,
    >> >> i want to add rowclick javascrip function on asp.net datagrid
    >> >>
    >> >> what can i do this.
    >> >>
    >> >> bgun
    >> >>
    >> >>
    >> >
    >> >
    >>
    >>
    >
    >

    bg Guest

  7. #6

    Default Re: How to add client row click funciton on datagrid

    A code example would be helpful. That's exactly what I've been trying to do
    all afternoon!
    "Eliyahu Goldin" <removemeegoldin@monarchmed.com> wrote in message
    news:O3HM384sFHA.460@TK2MSFTNGP15.phx.gbl...
    > You need to add "onclick" Attribute to the grid items. You can do it in
    > either ItemDataBound or PreRender event.
    >
    > Eliyahu
    >
    > "bg" <bg@bg.com> wrote in message
    > news:enzpOu4sFHA.2540@TK2MSFTNGP09.phx.gbl...
    >> is there anyone help me,
    >> i want to add rowclick javascrip function on asp.net datagrid
    >>
    >> what can i do this.
    >>
    >> bgun
    >>
    >>
    >
    >

    Ken Webster Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139