On load of first time gridview first row not showing remove button if i go to second row then its showing remove button in first row if click remove its not removing current row
If gridview has only one row , then you could hide /disable the remove button,since that has no sense to remove the only one row . You could refer to below code sample :
Member
399 Points
1101 Posts
gridview current row delete
Oct 31, 2016 08:19 PM|asp.ambur|LINK
Hello
This is my code to remove current row
but when i click delete it removing upper row not current rows
Please check and give me write code
Thank You
Contributor
2340 Points
807 Posts
Re: gridview current row delete
Oct 31, 2016 08:35 PM|codemovement.pk|LINK
I can place few lines that can delete your current row.
Also In below mentioned way
Also you can delete from DB and rebind gridview.
Hope it Helps
Hope it helps.
Get more information: http://codemovement.pk
Thanks,
Member
399 Points
1101 Posts
Re: gridview current row delete
Oct 31, 2016 08:44 PM|asp.ambur|LINK
im using this tutoral remove current row not from database
http://www.aspsnippets.com/Articles/Adding-Dynamic-Rows-in-ASP.Net-GridView-Control-with-TextBoxes.aspx
Contributor
2340 Points
807 Posts
Re: gridview current row delete
Oct 31, 2016 08:45 PM|codemovement.pk|LINK
Let me go through it.
Get more information: http://codemovement.pk
Thanks,
Member
399 Points
1101 Posts
Re: gridview current row delete
Oct 31, 2016 08:48 PM|asp.ambur|LINK
i want to remove current row in gridview instead of above row
my current code is like this
Star
13450 Points
2764 Posts
Re: gridview current row delete
Oct 31, 2016 08:51 PM|Nasser Malik|LINK
Try this
see demo here
Skype: maleknasser1
LinkedIn: https://www.linkedin.com/in/maliknasser
Member
399 Points
1101 Posts
Re: gridview current row delete
Oct 31, 2016 09:03 PM|asp.ambur|LINK
still its not removing the current row its removing above row
Contributor
2340 Points
807 Posts
Re: gridview current row delete
Oct 31, 2016 09:06 PM|codemovement.pk|LINK
Here is the full Code
ASPX PAGE
Hope it helps
Get more information: http://codemovement.pk
Thanks,
Member
399 Points
1101 Posts
Re: gridview current row delete
Oct 31, 2016 09:12 PM|asp.ambur|LINK
there is no row at position 1
error
Member
399 Points
1101 Posts
Re: gridview current row delete
Nov 01, 2016 04:53 AM|asp.ambur|LINK
On load of first time gridview first row not showing remove button if i go to second row then its showing remove button in first row if click remove its not removing current row
Please check the code
All-Star
18815 Points
3831 Posts
Re: gridview current row delete
Nov 01, 2016 09:19 AM|Nan Yu|LINK
Hi asp.ambur,
If gridview has only one row , then you could hide /disable the remove button,since that has no sense to remove the only one row . You could refer to below code sample :
Code behind :
Result :
Best Regards,
Nan Yu
Member
399 Points
1101 Posts
Re: gridview current row delete
Nov 01, 2016 10:00 AM|asp.ambur|LINK
on add new row
error
row arrangement cannot be null parameter name row