2. selected values remove from grid view or list box value
3. particular datas only view in rdlc report (like manual field report)
4. print like shopping bill invoice.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhijit PatilPosted Mar 6, 2014, 12:58 AM
1)you can take input from user and bind the gridview like below.
string[] arr1D = { "abhi", "ram", "ganesh", "nirranjan" };
Grid1D.DataSource = arr1D;
Grid1D.DataBind();
2)you can remove the selected row from gridview i assume here you are selected here to checkbox, you can checked checkted to deleted row.
ArrayList del = new ArrayList();
foreach (GridViewRow row in GridView1.Rows)
{
if (row.RowType == DataControlRowType.DataRow)
{
CheckBox chkDelete = (CheckBox)row.Cells[0].FindControl("CheckBox1");
if (chkDelete != null)
{
if (chkDelete.Checked)
{
string id = row.Cells[1].Text;
del.Add(id);
}
}
}
}
GridView1.DataBind();
PALANI MCAPosted Mar 6, 2014, 12:26 AM
Shweta LodhaPosted Mar 5, 2014, 4:13 PM
ArrayList list = new ArrayList();
list.Add("One");
list.Add("Two");
Retrieving data from arraylist:
foreach (int i in list)
{
Console.WriteLine(i);
}