2
Answers

searching!

hi,
I have a datagrid That Updates, it contains many names so I
created a textBox and Button that if some one wants to edit Writes the
name in yhe textbox and on the pressing button the Row is selected
automatically and the editing process can be done. Is this possible and

if so can some one help me out and tell me how to go about it?
Thanks


 

 

Answers (2)

0
Photo of Daniel Mweu
NA 10 0 18y
Hi claude;try the following line of code.it works for me protected string sort { get { return ViewState["Sort"]==null?"":(string)ViewState["Sort"]; } set { ViewState["Sort"]=value; } } protected string filter { get { return ViewState["filter"]==null?"":(string)ViewState["filter"]; } set { ViewState["filter"]=value; } } filter= string.Format("FacilityCode like '%{0}%' or Name like '%{0}%'",txtSearch.Text); bind(); i assume "bind()" on ua project is a procedure to bind typed datasets.this is how i implement the bind on my system protected void bind() { dsFacilities=new FacilitiesDA().SelectFacilities(); dsFacilityTypes=new FacilityTypesDA().SelectFacilityTypes(); dv.Table=dsFacilities.Facility; dv.RowFilter=filter; dv.Sort=sort; if(filter =="") dgFacilities.AllowPaging=true; else dgFacilities.AllowPaging=false; Page.DataBind(); } ope it works for u
0
Photo of Daniel Mweu
NA 10 0 18y
Hi claude;try the following line of code.it works for me protected string sort { get { return ViewState["Sort"]==null?"":(string)ViewState["Sort"]; } set { ViewState["Sort"]=value; } } protected string filter { get { return ViewState["filter"]==null?"":(string)ViewState["filter"]; } set { ViewState["filter"]=value; } } filter= string.Format("FacilityCode like '%{0}%' or Name like '%{0}%'",txtSearch.Text); bind(); i assume "bind()" on ua project is a procedure to bind typed datasets.this is how i implement the bind on my system protected void bind() { dsFacilities=new FacilitiesDA().SelectFacilities(); dsFacilityTypes=new FacilityTypesDA().SelectFacilityTypes(); dv.Table=dsFacilities.Facility; dv.RowFilter=filter; dv.Sort=sort; if(filter =="") dgFacilities.AllowPaging=true; else dgFacilities.AllowPaging=false; Page.DataBind(); } ope it works for u