Click here to Skip to main content
15,890,557 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRow Filter Pin
anushh18-Sep-09 8:48
anushh18-Sep-09 8:48 
AnswerRe: Row Filter Pin
Manas Bhardwaj18-Sep-09 9:41
professionalManas Bhardwaj18-Sep-09 9:41 
GeneralRe: Row Filter Pin
Abhishek Sur18-Sep-09 11:37
professionalAbhishek Sur18-Sep-09 11:37 
GeneralRe: Row Filter Pin
Manas Bhardwaj18-Sep-09 11:43
professionalManas Bhardwaj18-Sep-09 11:43 
GeneralRe: Row Filter Pin
Abhishek Sur18-Sep-09 11:48
professionalAbhishek Sur18-Sep-09 11:48 
GeneralRe: Row Filter Pin
Manas Bhardwaj18-Sep-09 11:54
professionalManas Bhardwaj18-Sep-09 11:54 
GeneralRe: Row Filter Pin
Abhishek Sur18-Sep-09 11:58
professionalAbhishek Sur18-Sep-09 11:58 
Questionfilter datagrid rows nested within datalist Pin
janetb9918-Sep-09 7:46
janetb9918-Sep-09 7:46 
I had a setup where I had a datalist of course listings, and when the items were created I went out to a remote sql server and retrieved the faculty for each course. But, that seems to take too long to load, so I thought it would be faster to go get all the data at once on page load and then filter with data views. But, I can't seem to get there. I tested on a datagrid outside the datalist and it populates with 3 rows fine. (Number one - is my assumption correct? Number two - what am I doing wrong? Is the Public Data.dataView not available when I'm trying to call it?)

It stops on the line
'dv.RowFilter = "eid=" & myEID.ToString

with the error: Object reference not set to an instance of an object.

If I comment out the line, I get no datagrids.

Imports dsList
Partial Class orpce_hcClasses
    Inherits System.Web.UI.Page
    Public ds As New Data.DataSet
    Public myFacView As Data.DataView
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim myList As dsSql = New dsSql()   ''''instantiate the function to get dataset
            Dim myView As Data.DataView
            Dim myStr As String = ""
            ds = myList.dsListAll(go get the initial course datalist dataset)
            If ds.Tables("list").Rows.Count > 0 Then
                myView = ds.Tables("list").DefaultView
                dlList.DataSource = myView
                myView.Sort = "startSort"
                dlList.DataBind()
                If ds.Tables("list").Rows.Count > 0 Then
                    Dim i As Integer
                    For i = 0 To ds.Tables("list").Rows.Count - 1
                        myStr &= ds.Tables("list").Rows(i)("eid").ToString & ","
                    Next
                    myStr = Left(myStr, Len(myStr) - 1)
                End If
                ds = myList.dsListFac(myStr)
                myFacView = New Data.DataView
                myFacView = ds.Tables("faculty").DefaultView
            End If
        End If
    End Sub

    Protected Sub dlList_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles dlList.ItemDataBound
        Dim myEID As String = Convert.ToInt32(CType(e.Item.FindControl("txtEID"), TextBox).Text)
        Dim dv As Data.DataView
        Dim dg As DataGrid = CType(e.Item.FindControl("dgFac"), DataGrid)
        dv = myFacView
        'dv.RowFilter = "eid=" & myEID.ToString
        dg.DataSource = dv
        dg.DataBind()
    End Sub

Questionmaintaining session Pin
laziale18-Sep-09 6:41
laziale18-Sep-09 6:41 
AnswerRe: maintaining session Pin
Christian Graus18-Sep-09 11:38
protectorChristian Graus18-Sep-09 11:38 
QuestionDefault Positioning Pin
Alireza Loghmani18-Sep-09 4:11
Alireza Loghmani18-Sep-09 4:11 
AnswerRe: Default Positioning Pin
sashidhar18-Sep-09 5:42
sashidhar18-Sep-09 5:42 
Questionproblems with webservices Pin
shankbond18-Sep-09 3:40
shankbond18-Sep-09 3:40 
AnswerRe: problems with webservices Pin
Abhishek Sur18-Sep-09 5:26
professionalAbhishek Sur18-Sep-09 5:26 
GeneralRe: problems with webservices Pin
shankbond18-Sep-09 5:43
shankbond18-Sep-09 5:43 
GeneralRe: problems with webservices Pin
Abhishek Sur19-Sep-09 7:08
professionalAbhishek Sur19-Sep-09 7:08 
GeneralRe: problems with webservices Pin
shankbond21-Sep-09 1:22
shankbond21-Sep-09 1:22 
QuestionLooping to find LoginView controls Pin
NoirWD18-Sep-09 3:34
NoirWD18-Sep-09 3:34 
QuestionDatatable Concatination Pin
sekannak18-Sep-09 2:56
sekannak18-Sep-09 2:56 
AnswerRe: Datatable Concatination Pin
Abhishek Sur18-Sep-09 5:50
professionalAbhishek Sur18-Sep-09 5:50 
QuestionExport to Excel Pin
arkiboys18-Sep-09 2:52
arkiboys18-Sep-09 2:52 
AnswerRe: Export to Excel Pin
Arun Jacob18-Sep-09 2:57
Arun Jacob18-Sep-09 2:57 
GeneralRe: Export to Excel Pin
arkiboys18-Sep-09 3:53
arkiboys18-Sep-09 3:53 
AnswerRe: Export to Excel Pin
Abhishek Sur18-Sep-09 5:23
professionalAbhishek Sur18-Sep-09 5:23 
QuestionError while transferring data to Excel Pin
nagendrathecoder18-Sep-09 2:04
nagendrathecoder18-Sep-09 2:04 

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.