I have a gridview with merged columns. When I try to delete a row, my previous row is deleted. I have done this on my other webpages (with normal gridview) and its works fine there.
Can anyone please help me with this? I tried to debug and see which rowindex is it taking...and found that if I select rowindex =4 ...rowindex = 3 is selected and passed to delete query.
Please help.
Here is my code for delete:...
User Profile
Collapse
-
GridView with merged Column Edit/Delete
-
Thanks a lott for such a detailed explanation..I really appreciate your efforts on this.
My this problem is fixed and I corrected all the code one by one and the errors were ofcourse what you said...:-) -
Error while editing gridview
I have a gridview with edit and delete. When i click Edit, I donot get all the textboxes. I just get 1. on top of that, when I try to update anything in that textbox, I get object Reference not set to an instance of object.
Can anyone please help me with this?
my aspx for gridview is:
...Code:<asp:GridView ID="grdItems" runat="server" AllowSorting="True"
-
djpaul,
Thanks for helping me. I tried as you said...but it didnt work...
I tried using template field and then bind the value but for some reason I dont see the value when I run the page.
here is my sql query I used to bind the gridview:
Select bi.*, b.cAmtDue AS cAmtDue FROM bod_items bi, bod_inv b WHERE bi.cInvNum = '" + Request.QuerySt ring["cInvNum"].ToString() + "' and bi.cInvNum...Leave a comment:
-
Thanks Paul for helping me solve my problem.
I tried doing as you said, but I got an error message "System.Web.UI. WebControls.Gri dView does not contain a definition for Item"
I have put this line of code in my databound event. Am I doing anything wrong?
Here is my databound event code:
...Code:GridView gvr = sender as GridView; if (gvr != null)Leave a comment:
-
Pass textbox value to a column in gridview
In my gridview, I have 6 columns. In the 6th column I want to display a value from textbox from same form. The value should be displayed on the row next to last row of rest of the columns. So my last column (i.e.) 6th column will just have 1 row irrespective of number of rows in rest of the columns.
How do I achieve this? Please help me. I have been trying a lott but couldnt figure out.
No activity results to display
Show More
Leave a comment: