Dropdownlist as follows
To what way student is useful Dropdownlist1(Good,Fair,Poor)
When i select the Dropdpownlist1 in that select the Poor POPUP Screen will open. the POPUP Screen as follows
Negative_Feed_Back
Textbox1(In that textbox type the reason for Poor)
OK (Button)
When user click the OK (Button) the select dropdownlist and Remarks will be displayed in the gridview
In gridview as follows
Dropdown Remarks
0 Student performance is not good
Suppose if user wrongly type the reason for poor want to change means in that case he can change reason for poor and click the ok button.
In that case two Poor reasons are there in gridview as follows
Dropdown Remarks
0 Student performance is not good
0 The Students not good at all
in that case i want to delete the first First Row of the gridview.
Output as follows
Dropdown Remarks
0 The Students not good at all
how to delete the gridview using datatable in asp.net using C#.
My code as follows
private void SetDropdowndetails(string Dropdownname, Int32 Dropdownid)
{
string SelectedDropdown = string.Empty;
SelectedDropdown = Dropdownname.ToString();
hfnegativefeedback.Value = Dropdownid.ToString();
Negativepnlpopup();
}
private void Negativepnlpopup()
{
TxtNegativeFeedback.Text = "";
DataTable dt = new DataTable();
dt = (DataTable)ViewState["Remarks"];
if (ViewState["Remarks"] != null)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
if (hfnegativefeedback.Value == dt.Rows[i][0].ToString())
{
TxtNegativeFeedback.Text = dt.Rows[i][1].ToString();
}
}
}
ModalPopupExtender1.TargetControlID = SelectedDropdown.ToString();
TxtNegativeFeedback.Focus();
ModalPopupExtender1.Show();
Pnlnegativefeedback.Visible = true;
}
In my above ocde in Negativepnlpopup function how to write the code for delete the duplicate rows in datatable in asp.net using C#.
Regards,
Narasiman P.