Link datagrid edit button

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John M

    Link datagrid edit button

    Hello,

    In Visual studio .NET 2003,

    On datagrid object :
    How can I link the button element : edit, to do a some client events (such
    as message box,
    and do another event just after that to the server (do some manipulation on
    the database).

    If I cannot - how can I do that anyway in some tricky way ?

    Thanks :)


  • Cor Ligthert

    #2
    Re: Link datagrid edit button

    John,

    I think that you have for this question more change in the newsgroup

    Aspnet
    news://msnews.microsoft.com/microsof...amework.aspnet

    Web interface:


    It does not mean that you are not welcome here or that you won't get an
    answer.
    However probably needs it some client side JavaScript from the button from
    the grid.

    (I think that I know how to do it controlling it from the serverside however
    than we are probably too late)

    I hope this helps a little bit?

    Cor


    Comment

    • John M

      #3
      Re: Link datagrid edit button

      .... so, how can I enforce that server side will run some client side code ?
      Need a sample how doing so, please.

      Thanks :)

      "Cor Ligthert" <notmyfirstname @planet.nl> wrote in message
      news:eAIJHjGVFH A.3636@TK2MSFTN GP14.phx.gbl...[color=blue]
      > John,
      >
      > I think that you have for this question more change in the newsgroup
      >
      > Aspnet
      > news://msnews.microsoft.com/microsof...amework.aspnet
      >
      > Web interface:
      > http://communities2.microsoft.com/co...amework.aspnet
      >
      > It does not mean that you are not welcome here or that you won't get an
      > answer.
      > However probably needs it some client side JavaScript from the button from
      > the grid.
      >
      > (I think that I know how to do it controlling it from the serverside
      > however than we are probably too late)
      >
      > I hope this helps a little bit?
      >
      > Cor
      >[/color]


      Comment

      • Cor Ligthert

        #4
        Re: Link datagrid edit button

        John,

        Something as this
        \\\\
        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
        System.EventArg s) Handles MyBase.Load
        If Not IsPostBack Then
        Me.Button1.Text = "Send Mail"
        Me.Button1.Attr ibutes("onClick ") =
        "window.locatio n='mailto:non@n on.com?subject= Cor demo&body=I hope this
        helps?';"
        End If
        End Sub
        ////

        I hope this helps a little bit?

        Cor


        Comment

        • John M

          #5
          Re: Link datagrid edit button

          For this individual problem,
          how can I access the the specific line in dataGrid ?
          (datagrid1 is datagrid),
          How can I access the "edit" cell on the datagrid (the one that I click on it
          for edit/update/cancel).

          me.datagrid1. ... what ?

          Thanks :)


          "Cor Ligthert" <notmyfirstname @planet.nl> wrote in message
          news:uXmW7OSVFH A.3432@TK2MSFTN GP10.phx.gbl...[color=blue]
          > John,
          >
          > Something as this
          > \\\\
          > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
          > System.EventArg s) Handles MyBase.Load
          > If Not IsPostBack Then
          > Me.Button1.Text = "Send Mail"
          > Me.Button1.Attr ibutes("onClick ") =
          > "window.locatio n='mailto:non@n on.com?subject= Cor demo&body=I hope this
          > helps?';"
          > End If
          > End Sub
          > ////
          >
          > I hope this helps a little bit?
          >
          > Cor
          >[/color]


          Comment

          • Cor Ligthert

            #6
            Re: Link datagrid edit button

            John,

            What see I wrong is that not this standard event?
            \\\\
            Private Sub DataGrid1_EditC ommand(ByVal source As Object, ByVal e As _
            System.Web.UI.W ebControls.Data GridCommandEven tArgs) Handles _
            DataGrid1.EditC ommand
            'do your things
            End Sub
            /////

            Cor


            Comment

            Working...