DataGrid Select Button Event not fired

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

  1. #1

    Default DataGrid Select Button Event not fired

    hi all,

    i am creating datagrid , i have added button column in my datagrid ,but
    the event for button column is not fired.

    i have added buttoncolumn to datagrid as shown below:

    ButtonColumn bs = new ButtonColumn();
    bs.Text = "select";
    bs.ButtonType = ButtonColumnType.PushButton;
    DataGrid1.Columns.Add(bs);

    i have also writted eventhandler function to handle the click of
    button as shown:

    private void ds_ItemCommand(object source, DataGridCommandEventArgs e)
    {
    Page.Response.Write("Test");
    }


    but the event is nor fired...
    please help me in this regard
    thanks in advance.

    regards

    sathya narayanan v

    sathya Guest

  2. Similar Questions and Discussions

    1. Select button in datagrid
      I have created a datagrid with a select button so that a user can select a particular row. I did this by setting the CommandName="select". And...
    2. datagrid as Composite control... PageIndexChanged event don't get Fired!! Pls Help
      Hi I am facing a problem... I implemented DataGrid with other Controls as Composite Control. The DataGrid works fine it gets display in my...
    3. Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl.
      Hello I have the following situation: (everything is dynamic (controls.add)) 1. Button.Init { WasButtonClickFired = true } 2....
    4. datagrid select button
      not sure whats happening here - i basically cutnpasted the code from a page that this code works on but the select button is just not firing any...
    5. DataGrid BoundColum Runtime (Event isn't fired)
      I put my code in the Page Init routine as shown below and still can not get the PageIndexChanged event to fire when autogenerate columns is turned...
  3. #2

    Default Re:DataGrid Select Button Event not fired

    I think the button column will hook up to it's own event handler.

    bs_Click(object sender, System.EventArgs e)
    {

    //Code Here

    }
    Mark Fruhling 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