S
samir25
hi
here is a part of my datagrid itembound event where i calculate 2
columns and assign values to the columns
Dim fileBytes As Integer = (fi.Length / 1024)
Dim lastmodifeddt As Date = File.GetLastWriteTime(FilePath & filename)
lastmodifeddt = lastmodifeddt.Date
lbl.Text = fileBytes
lbl2.Text = lastmodifeddt.ToString("dd MMM yyyy")
and here is my sort function:
strSQL = "select FILEID, FILENAME, APPSERVICETYPE,LOCATION,FILEREPORT,
DESCRIPTION, location2 FROM DOWNLOADFILES WHERE
(@lower(ORGANISATION)=@lower('" & Session("Orgn") & "') or
@lower(ORGANISATION)='mewha') and FILEREPORT='REPORT'"
GoToDBOpenConn()
myDa.SelectCommand = New System.Data.OleDb.OleDbCommand(strSQL,
objConnection)
myDa.Fill(myDS)
myDS.Tables(0).Columns.Add("lbl2")
myDS.Tables(0).Columns.Add("lbl")
Dim objView As New DataView(myDS.Tables(0))
objView.Sort = E.SortExpression() & " DESC"
dgFiles.DataSource = objView
dgFiles.DataBind()
everythign is fine ... only that when i click to the sort of the
calculated columns they dont work
when i sort by lbl...which is size here...here is what i get
Category Description Size(KB) Last Modified
SERVER ensuring 73 Aug 23, 2005
SERVER bullying 92 Aug 23, 2005
DESKTOP sql engg 397 Jul 28, 2005
SERVER portal users 18 Nov 22, 2005
DESKTOP relnote 117 Dec 11, 2002
and when i sort by the last modified column here is what i get (this is
lbl2)
Category Description Size(KB) Last Modified
SERVER ensuring 73 Aug 23, 2005
SERVER bullying 92 Aug 23, 2005
DESKTOP sql engg 397 Jul 28, 2005
SERVER portal users 18 Nov 22, 2005
DESKTOP relnote 117 Dec 11, 2002
both the things are not working. its madening!but category
works...maybe bec its a db column why is this happ?
thanks for helping on this
here is a part of my datagrid itembound event where i calculate 2
columns and assign values to the columns
Dim fileBytes As Integer = (fi.Length / 1024)
Dim lastmodifeddt As Date = File.GetLastWriteTime(FilePath & filename)
lastmodifeddt = lastmodifeddt.Date
lbl.Text = fileBytes
lbl2.Text = lastmodifeddt.ToString("dd MMM yyyy")
and here is my sort function:
strSQL = "select FILEID, FILENAME, APPSERVICETYPE,LOCATION,FILEREPORT,
DESCRIPTION, location2 FROM DOWNLOADFILES WHERE
(@lower(ORGANISATION)=@lower('" & Session("Orgn") & "') or
@lower(ORGANISATION)='mewha') and FILEREPORT='REPORT'"
GoToDBOpenConn()
myDa.SelectCommand = New System.Data.OleDb.OleDbCommand(strSQL,
objConnection)
myDa.Fill(myDS)
myDS.Tables(0).Columns.Add("lbl2")
myDS.Tables(0).Columns.Add("lbl")
Dim objView As New DataView(myDS.Tables(0))
objView.Sort = E.SortExpression() & " DESC"
dgFiles.DataSource = objView
dgFiles.DataBind()
everythign is fine ... only that when i click to the sort of the
calculated columns they dont work
when i sort by lbl...which is size here...here is what i get
Category Description Size(KB) Last Modified
SERVER ensuring 73 Aug 23, 2005
SERVER bullying 92 Aug 23, 2005
DESKTOP sql engg 397 Jul 28, 2005
SERVER portal users 18 Nov 22, 2005
DESKTOP relnote 117 Dec 11, 2002
and when i sort by the last modified column here is what i get (this is
lbl2)
Category Description Size(KB) Last Modified
SERVER ensuring 73 Aug 23, 2005
SERVER bullying 92 Aug 23, 2005
DESKTOP sql engg 397 Jul 28, 2005
SERVER portal users 18 Nov 22, 2005
DESKTOP relnote 117 Dec 11, 2002
both the things are not working. its madening!but category
works...maybe bec its a db column why is this happ?
thanks for helping on this