Click here to Skip to main content
15,891,248 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: need help wit files settings pls!! Pin
neodeaths6-Oct-06 8:18
neodeaths6-Oct-06 8:18 
GeneralRe: need help wit files settings pls!! Pin
Mike Ellison6-Oct-06 8:40
Mike Ellison6-Oct-06 8:40 
GeneralRe: need help wit files settings pls!! Pin
neodeaths7-Oct-06 3:24
neodeaths7-Oct-06 3:24 
GeneralRe: need help wit files settings pls!! Pin
neodeaths13-Oct-06 17:40
neodeaths13-Oct-06 17:40 
QuestionDataview/Dataset Pin
shivarishxxxx5-Oct-06 10:10
shivarishxxxx5-Oct-06 10:10 
QuestionGet HTML for an element in Page_Load method Pin
eggie55-Oct-06 10:05
eggie55-Oct-06 10:05 
AnswerRe: Get HTML for an element in Page_Load method Pin
eggie55-Oct-06 10:32
eggie55-Oct-06 10:32 
QuestionDataGrid paging problem Pin
saravanan055-Oct-06 8:56
saravanan055-Oct-06 8:56 
hi to all

I have datagrid with 9 records.i have 3 buttons named as ,view all ,Active,Deactive.

Here my database columns are country,company,logo,status.

If i click view all the records can be viewed pagewise without any error. It is working fine.

The other 2 buttons namely:

Button Active-status is 1
Button DeActive-staus is 0

I have set pagesize= 5 , that is i have 5 records(1,2,3,4,5) in the first page,4 records(6,7,8,9) in second page.

In the first page i have 3 active records (1,3,5), and two deactive records(2,4)
if i click active in the first page only 3 active(1,3,5) should be displayed and if i click deactive only two deactive records (2,4) should be displayed. Instead all the active records(including active records in second page) are also displaying in that page and same problem in deactive also.

similarly,

In the second page i have two actve records (7,9), and two deactive records(6,8)
if i click active in the second page only 2 active(7,9) should be displayed and if i click deactive only two deactive records (6,8) should be displayed. Instead all the active records(including active records in first page) are also displaying in that page and same problem in deactive also.

My question is i have to display only the active records in the first page.I have set overall pagesize as 5 in my datagrid. How can i set to display only the 3 active records and two deactive records in the first page and same for second page .

I have given the code for Active & Deactive below

ACTIVE BUTTON: (status 1)
Try
strConnString = objCsLgateway.GetConnectionString()
conn = objCsDataBase.GetDbConnection(strConnString)
Dim adap As New SqlDataAdapter("select DISTINCT logo_code,company_name,country_name,category,picture_path from tblLogos where status=1 ", conn)
Dim ds As New DataSet
adap.Fill(ds, "tblLogos")
DataGrid1.CurrentPageIndex = 0
DataGrid1.DataSource = ds
DataGrid1.DataBind()
Catch errEx As Exception
Response.Write(errEx.Message)

End Try

DEACTIVE BUTTON (status 0)
Try
strConnString = objCsLgateway.GetConnectionString()
conn = objCsDataBase.GetDbConnection(strConnString)
Dim adap As New SqlDataAdapter("select DISTINCT logo_code,company_name,country_name,category,picture_path from tblLogos where status=0 ", conn)
Dim ds As New DataSet
adap.Fill(ds, "tblLogos")
DataGrid1.CurrentPageIndex = 0
DataGrid1.DataSource = ds
DataGrid1.DataBind()
Catch errEx As Exception
Response.Write(errEx.Message)

End Try

plz provide me with proper solution and the corrected code.


AnswerRe: DataGrid paging problem Pin
postmaster@programmingknowledge.com5-Oct-06 23:35
postmaster@programmingknowledge.com5-Oct-06 23:35 
QuestionRegister event attribute onload for the Page from UserControl Pin
Roman Muntyanu5-Oct-06 7:39
Roman Muntyanu5-Oct-06 7:39 
AnswerRe: Register event attribute onload for the Page from UserControl Pin
minhpc_bk5-Oct-06 15:55
minhpc_bk5-Oct-06 15:55 
QuestionFilepath works in IE but not Firefox. Pin
Goalie355-Oct-06 4:25
Goalie355-Oct-06 4:25 
AnswerRe: Filepath works in IE but not Firefox. Pin
Chris Buckett5-Oct-06 9:12
Chris Buckett5-Oct-06 9:12 
GeneralRe: Filepath works in IE but not Firefox. Pin
Goalie359-Oct-06 5:32
Goalie359-Oct-06 5:32 
GeneralRe: Filepath works in IE but not Firefox. Pin
Chris Buckett9-Oct-06 22:02
Chris Buckett9-Oct-06 22:02 
QuestionUser control creation order? Pin
Chris Buckett5-Oct-06 3:43
Chris Buckett5-Oct-06 3:43 
AnswerRe: User control creation order? Pin
l0kke5-Oct-06 4:51
l0kke5-Oct-06 4:51 
GeneralRe: User control creation order? Pin
Chris Buckett5-Oct-06 4:57
Chris Buckett5-Oct-06 4:57 
QuestionUpload Big File Pin
MHASSANF5-Oct-06 2:22
MHASSANF5-Oct-06 2:22 
AnswerRe: Upload Big File Pin
Keith Barrow5-Oct-06 2:28
professionalKeith Barrow5-Oct-06 2:28 
QuestionRe: Upload Big File Pin
MHASSANF5-Oct-06 2:37
MHASSANF5-Oct-06 2:37 
AnswerRe: Upload Big File Pin
Gavin Jeffrey5-Oct-06 4:53
Gavin Jeffrey5-Oct-06 4:53 
GeneralRe: Upload Big File Pin
MHASSANF5-Oct-06 10:17
MHASSANF5-Oct-06 10:17 
QuestionHit the enterkey in textbox the resultant value will be displayed in other textbox Pin
irkahc5-Oct-06 2:17
irkahc5-Oct-06 2:17 
AnswerRe: Hit the enterkey in textbox the resultant value will be displayed in other textbox Pin
Mike Ellison5-Oct-06 14:36
Mike Ellison5-Oct-06 14:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.