Remove row from temporary gridview
I have a gridview which stores temporary data. but I want to remove row by auto generated delete button. SO how to do it, plz suggest me some solutions.
Know the answer? Post it. Somebody with the same question will find it here.
Iftikar HussainRank #423 · 5.9K reputationPosted Sep 16, 2013, 8:46 PM EDT
Please provide the code for binding your gridview.
Regards,
Iftikar
shibasankar behera102 reputationPosted Sep 16, 2013, 8:51 PM EDT
i am storing the data from another gridview to this gridview. And my gridview aspx page is--
Iftikar HussainRank #423 · 5.9K reputationPosted Sep 16, 2013, 9:11 PM EDT
in your code
DataTable dt= GridViewItemlist.DataSource as DataTable;
GridViewItemlist.DataSource = dt;
Regards,
Iftikar
shibasankar behera102 reputationPosted Sep 16, 2013, 9:30 PM EDT
Object reference not set to an instance of an object.
Code
Iftikar HussainRank #423 · 5.9K reputationPosted Sep 16, 2013, 9:34 PM EDT
Regards,
Iftikar
shibasankar behera102 reputationPosted Sep 16, 2013, 9:42 PM EDT
I am getting the data from GridViewItemSrch(gridview) by checkbox and setting to new gridview(GridViewItemlist).
Iftikar HussainRank #423 · 5.9K reputationPosted Sep 16, 2013, 9:44 PM EDT
shibasankar behera102 reputationPosted Sep 16, 2013, 9:47 PM EDT
here is my child grid view below
EmptyDataText="No Records Selected" Style="width: 263px;" RowStyle-CssClass="Row"
AlternatingRowStyle-CssClass="AltRow">
Iftikar HussainRank #423 · 5.9K reputationPosted Sep 16, 2013, 9:52 PM EDT
shibasankar behera102 reputationPosted Sep 16, 2013, 9:55 PM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Sep 16, 2013, 9:59 PM EDT
object temp=sender;
DataTable dt= GridViewItemlist.DataSource as DataTable;
GridViewItemlist.DataSource = dt;
shibasankar behera102 reputationPosted Sep 16, 2013, 11:17 PM EDT
give me some other solutions.
Iftikar HussainRank #423 · 5.9K reputationPosted Sep 16, 2013, 11:32 PM EDT
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" EnableViewState="true" Inherits="WebApplication1.WebForm1" %>
shibasankar behera102 reputationPosted Sep 17, 2013, 12:06 AM EDT
if (dr["Item_ID"] == id),, this line m getting error, showing
possible unintended reference comparision;to get a value comparision, cast the left hand side to type string
korskor .89 reputationPosted Sep 18, 2014, 2:00 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts