how to create calculated column using boundfield in gridview?
i want to create a new column using the existing records?
can help me?
View Complete Post
can we use asp:TemplateField and asp:BoundField both in a single grid??
If yes then how to handle deleteCommand on serial number. mean to say how to write query for that field as it is not any column of databse..
can you guide me how to create calculated column with gridview boundfield?
Thanks in advance.........
I I have a GridView attached to a SqlDataSource and all is working well. I also have and edit and delete icon attached to each record in the GridView, and again, all is working well.
My problem is when I add a BoundField named 'statusCode', the delete stored procedure fails with:
"Procedure or function 'up_delReference' expects parameter '@statusCode', which was not supplied."
When I remove the BoundField named 'statusCode' from the GridView list, the delete works fine. I need to show the status in the GridView as the user can chose to see Avtive, Inavtive or Both records and they need to see the status when in Both.
Here is the Code:
<asp:GridView ID="GridViewList" runat="server" DataSourceID="SqlDataSourceList" DataKeyNames="refID" >
<asp:ImageButton ID="ImageButtonEditDetail" runat="server" SkinID="IconEdit" CommandName="Edit" ToolTip="Edit Record" />
<asp:ImageButton ID="ImageButtonDelete" runat="server" SkinID="IconDelete" CommandName="Delete" ToolTip="Delete Record" OnClientClick