Sir,
I have two tables and the grid is bound with the 1st table.But there is a column which shows data from the 2nd table.That is achieved by a userdefined funtion which returns the data based on the arguments(eg:foreignkey) passed to it.This fn is calld in each itemdatabound.The prblm is i want to filter that 2nd table data.As the filtering is applied on grid's bounded data,it becomes a prbm for me.
I Enter the filtering expression in txtFilter which is not a child ctrl of grid.
In the userdefined fn I store the args of the fn is a session object as
Protected
Function ParseMessage(ByVal nWFCode As Integer, ByVal bIsRejected As Boolean, _
ByVal bIsHistory As Boolean, Optional ByVal sType As String = "P", _
Optional ByVal sDocId As String = "", _
Optional ByVal dbConn As SqlConnection = Nothing) As String
sStatusDesc = WorkFlowMessages.GetMessage(nWFCode, bIsRejected, bIsHistory, sType, sDocId, dbConn)
If
(txtFilter.Text <> "" And txtFilter.Text = sStatusDesc) Then
ViewState(
"StatDocid") += sDocId + ","
End If
In NeedDataSource eventds = GetDataSet()
Dim
docid As String = ViewState("StatDocid")
Dim filterExpression As String
Dim list As DropDownList = DirectCast(((txtFilter.NamingContainer).FindControl("drpFilterOnField")), DropDownList)
If (docid <> "") Then
Dim docidcnt As Integer = docid.Length
docid = docid.Remove(docidcnt - 1, 1)
filterExpression =
"(DocumentId in(" + docid + "))"
Dim dv As New DataView()
dv.Table = ds.Tables(0)
dv.RowFilter = filterExpression
WorkDetailsGrid.DataSource = dv
In WorkDetailsGrid_PreRender eventWorkDetailsGrid.MasterTableView.Rebind()
But it is not working.Is ther any way to solve my prbm.I bacme mad due to it
Plz help me....................