Hello, for that you can assign datasource from code behind with id 5 to 10..... Gridview will shows all that data which you bound from codebehind...
still yo want to give it in aspx then you can writ inner script for if(id >5 && id <10) then show the following contains otherwise hide that contains.......menas need inline script in aspx (HTML)
MARK AS ANSWER IF THIS WORKS...
Mark Answered if it helps - Good luck!
Cheers!
- Kaushik Patel
bilawalshah
Member
284 Points
203 Posts
gridview selective result
Nov 07, 2011 07:59 AM|LINK
hello guysss..
i want that my gridview shows some selective valuee...
likee the value from id:5 to id:10
regards.
kaushik_tatv...
Contributor
2808 Points
500 Posts
Re: gridview selective result
Nov 07, 2011 10:21 AM|LINK
Hello, for that you can assign datasource from code behind with id 5 to 10..... Gridview will shows all that data which you bound from codebehind...
still yo want to give it in aspx then you can writ inner script for if(id >5 && id <10) then show the following contains otherwise hide that contains.......menas need inline script in aspx (HTML)
MARK AS ANSWER IF THIS WORKS...
Cheers!
- Kaushik Patel
Gaspard
Contributor
2066 Points
416 Posts
Re: gridview selective result
Nov 07, 2011 10:27 AM|LINK
You can use filtering on data source controls
http://msdn.microsoft.com/en-us/library/ms227680.aspx
Regards
salman beher...
All-Star
31583 Points
6008 Posts
Re: gridview selective result
Nov 07, 2011 10:51 AM|LINK
Hi,
you simple do it using query like BETWEEN opertaor...
write query using BETWEEN and bind then in gridview
check here...
http://www.w3schools.com/Sql/sql_between.asp
Thanks...
Sincerely,
Salman
bilawalshah
Member
284 Points
203 Posts
Re: gridview selective result
Nov 07, 2011 11:44 AM|LINK
@salman it worked..its the most easiest...