You must Sign In to post a response.
  • Category: ASP.NET

    Deleting empty row in gridview

    dim a as string=gv.datakeys(e.rowindex).value).tostring

    I ve displayed my datafields in gridview and has delete button too
    by getting rowindex as above code,i ve got my row and successfully deleted..

    but there are empty rows(no data inside)
    if i try to delete such row error shown..

    hw to delete empty rows
  • #620080
    is there any unique field you have in your database and which is not blank?

    if you have then you can delete by using that field.

    If it helps you then Rate this.

    Best Regards,
    Manoranjan Sahoo

  • #620082
    i cant understand ur question..can u elaborate??

    means are u askin of primary key...??
    if so i has set primary key

    in my database while creating table i has set my column "name" "id" to null..other column name "SNO"-primary key

  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.