regarding to making gridview search facility

Posted by Ankit_parmar555 under ASP.NET on 12/13/2011 | Points: 10 | Views : 4133 | Status : [Member] | Replies : 6
i want to add search facility in grid view.
for that i need smple application.
plz help




Responses

Posted by: Arefin on: 12/13/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

You can see the below links to get Idea
http://www.codeproject.com/KB/webforms/SearchSortableGridView.aspx
http://www.codeproject.com/KB/custom-controls/GridViewSearch.aspx

I think It will fulfill your demand.

Thanks,
Arefin

Ankit_parmar555, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ankit_parmar555 on: 12/15/2011 [Member] Starter | Points: 25

Up
0
Down
yah i check link mention above
but this are not complete source
so if any i other plz inform

thanks

Ankit_parmar555, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Self-innovator on: 12/26/2011 [Member] Bronze | Points: 25

Up
0
Down
hi.. try this
Stored proc
====
create proc sp_SearchByCountry
@CountryName varchar(50)
as
begin
select * from Persons where PersonCountry=@CountryName
end
.cs
===
buttonSearch_click()
{
string country=txtCountry.text;
sqlconnection cnn=new sqlconnection("get connectionstring here");
sqlcommand cmd=new sqlcommand("sp_SearchByCountry",cnn);
cmd.commandtype=commandtype.storedprocedure;
cmd.parameters.addwithvalue("@country",PersonCountry);
sqldatadapter ada=new sqldataadapter(cmd);
dataset ds=new dataset();
gridperson.datasource=ds;
gridperson.databind();
}


Join Hands Change lives
Thanks & Regards
Straight Edge Society

Ankit_parmar555, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 12/26/2011 [Member] Silver | Points: 25

Up
0
Down
Can you know tell me the gridview colmn you have , and on which column or columns you want to add search facility?

Thanks,
Sanjay

Ankit_parmar555, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ankit_parmar555 on: 1/16/2012 [Member] Starter | Points: 25

Up
0
Down
i want to add search on user name colum as well as mobile number

Ankit_parmar555, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 1/16/2012 [Member] Silver | Points: 25

Up
0
Down
1.you can have dropdowns for user and mobileno outside gridview?
2.you can also have AutoComplete box and two radiobuttons and then use webservice to search and fill grid
Radiobutton1 is selected and if you start typing it should show user names
Radiobutto2 is selected and if you start typing it should show phone nos
3.Moreover you can have sorting both the columns on gridview.
4.Also keep an advance search option where you can accept user or mobile or both and search .

Thanks,
Sanjay


Thanks,
Sanjay

Ankit_parmar555, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response