Datagrid problem in ASP.NET 2.0

Ask a Question related to ASP Components, Design and Development.

  1. #1

    Default Datagrid problem in ASP.NET 2.0

    Hello,
    I've converted an existing ASP.NET 1.1 project to Visual Studio 2005.
    There is a problem with the Datagrid control. The Update & Cancel commands
    are not working anymore (Edit is working).

    Ive noticed that the postback generated javascript has changed since
    ASP.NET 1.1. For Example in ASP.NET 1.1, the Updade shortcut
    is "javascript:__doPostBack('dgReceivedHistory$_ctl3$ lbValidate','')"
    In 2.0 it is now "javascript:__doPostBack('lbValidate','')".
    The main differences is that there is no more reference to the datagrid in
    the client ID of the control...

    Any help apreciated.
    TIA.
    Olivier MATROT Guest

  2. Similar Questions and Discussions

    1. Datagrid problem
      I have a dataview and binding to a datagrid. On ItemBound I'm adding a checkbox dynamically for each rows. It works ok but my problem is on...
    2. problema ultima pagina datagrid asp.net/problem last page datagrid
      ciao, ho un problema. ho un datagrid in una pagina asp.net con le impostazioni di PAGING abilitate. Uso l'impostazione NUMERIC PAGE. Il problema è...
    3. problem in datagrid
      Hi, I am facing a problem while binding dataset with more than 2Lakh records to a datagrid.The server throws an exception as follows, ...
    4. see this datagrid problem
      my table has total 3 columns like emp_id(primay key),emp_name emp_address i m populating my datagrid at run time successfully . now i add...
    5. problem about datagrid
      Hello all, I have a problem in using the DataGrid. In my web form, i've put a <asp:button/> button, if it is clicked, a function will be...
  3. #2

    Default RE: Datagrid problem in ASP.NET 2.0

    Hello,

    I convert a simple VS.NEt 2003 ASP.NET project with datagrid control (see
    code below) in VS 2005, anyway I didn't found the problem:

    <asp:DataGrid id=DataGrid1 style="Z-INDEX: 101; LEFT: 96px; POSITION:
    absolute; TOP: 48px" runat="server" Width="392px" Height="200px"
    DataSource="<%# dataSet11 %>" autoGenerateColumns="False"
    OnEditCommand="MyDataGrid_Edit"
    OnCancelCommand="MyDataGrid_Cancel"
    OnUpdateCommand="MyDataGrid_Update"
    OnDeleteCommand="MyDataGrid_Delete" DataKeyField="ID">
    <Columns>
    <asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update"
    CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
    <asp:ButtonColumn Text="Delete"
    CommandName="Delete"></asp:ButtonColumn>
    <asp:BoundColumn DataField="ID" ReadOnly="True"
    HeaderText="ID"></asp:BoundColumn>
    <asp:BoundColumn DataField="dd" HeaderText="dd"></asp:BoundColumn>
    </Columns>
    </asp:DataGrid

    protected void MyDataGrid_Cancel(Object sender, DataGridCommandEventArgs e)
    {
    DataGrid1.EditItemIndex = -1;
    DataGrid1.DataBind();


    }
    protected void MyDataGrid_Edit(Object sender, DataGridCommandEventArgs e)
    {
    DataGrid1.EditItemIndex = e.Item.ItemIndex;
    DataGrid1.DataBind();
    }

    The Edit and Cancel works without any flaws. Is there any differences
    between my datagrid and yours?

    BTW, this group is for traditional ASP technology, for such ASP.NET issue,
    you may post in microsoft.public.dotnet.framework.aspnet. And you may be
    luck to find more ASP.NET experts there.

    reagrds,

    Luke

    [MSFT] 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