Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default DataView

    I must recreated dataview . I am in the designer insert
    dataview set datasource ... And I set before DataBind
    datasource on the dataview ... How I recreated dataview.
    I have dataview in class member ...

    thanx


    >-----Original Message-----
    >Have you recreated the DataView and set it as the
    >DataSource before the DataBind() ?
    >
    >HTH,
    >Gaz
    >
    >>-----Original Message-----
    >>Hi all,
    >>sorry for my bad englisch a my bad questation . I have
    >>trouble with dataview .
    >>1) I have datagrid where datasource is dataview . This
    >>work ok , but if I change Dataset and call DataBind,
    the
    >>DataGrid is empty ???
    >>2) I implement sorting with dataview . After I set
    >>sorting and call edit and update in the datagrig , the
    >>datasetitem not resolve to item on the dataset . I want
    >>get identity colomn , which is not view in datagrid...
    >>
    >>thank you
    >>
    >>marek
    >>
    >>.
    >>
    >.
    >
    grolms Guest

  2. Similar Questions and Discussions

    1. my DataView won't sort
      When I set the Sort on a DataView, it is ignored, and I can't figure out why. I'm using vb.net. After I successfully populate the DataView, I...
    2. ASP.NET 2.0, Dataview and Stored Procedure
      Following are the stored procedure and HTML. This is a simple example - I am trying to use the stored procedure to update the data in the...
    3. How can I export a Dataview to Excel
      I've figured out how to export a Dataset and a Datagrid, but how can I export a Dataview? Paul
    4. Exposing dataview
      Hello all, I have composite control with button, 2 textboxes and dataview. Now I want to expose dataview control as propertie to be accessed at...
    5. RowFilter on DataView
      I'm sure this is straight forward but it has me stumped! (I assume this can be done but cant find any online examples.) I want to filter a...
  3. #2

    Default DataView

    Sorry for my bad englisch. I have qustation about
    DatView .How this workind ? I mind , the databind is only
    window to dataset . But if I add to dataview this not
    added to dataset row ??? And if I in the datagrid call
    edit item , then e.item.itemindex not corresponding to
    dataset . where is trouble.

    thanx
    marek
    grolms Guest

  4. #3

    Default Re: DataView

    Think of the dataview as a window into a portion of the data. If you are a
    looking at a picture of data you can look at it in certain ways and filter
    it to bring out portions of the data of interest to you, but you can't touch
    the data. Hope this picture helps you understand what is going on. For a
    comprehensive book on the subject as well as other technologies related to
    the data layer, see David Sceppa's book, programming Ado.Net.


    "grolms" <grolms@volny.cz> wrote in message
    news:01a901c34e32$60069000$a101280a@phx.gbl...
    > Sorry for my bad englisch. I have qustation about
    > DatView .How this workind ? I mind , the databind is only
    > window to dataset . But if I add to dataview this not
    > added to dataset row ??? And if I in the datagrid call
    > edit item , then e.item.itemindex not corresponding to
    > dataset . where is trouble.
    >
    > thanx
    > marek

    Alvin Bruney Guest

  5. #4

    Default dataView

    Hello .net expert, I've made a litle reserch function which allow the user
    to find a client by name
    or phone number (both are string format) .

    Even if I know the value exist, the datagrid return me nothing.
    Any Idea what would be the problem ??
    Thanks in advance !!

    Esperanza

    //---------------------------------------------------------------------
    private void btnLookFor_Click(object sender, System.EventArgs e)
    {

    string strVar;
    string strSelection;
    strVar = this.txtLookFor.Text;
    strSelection = this.RadListLookFor.SelectedItem.Text;

    try
    {
    if (strVar.Trim()!=null)
    {
    //See witch radio button was click
    switch(strSelection)

    {
    //Look by name
    case "Name":
    this.dataViewGPPL.RowFilter = "XABALPH like '%" + strVar + "%'";
    break;


    //Look by phone number
    case "No tel.":
    this.dataViewGPPL.RowFilter = "XTEL like '" + strVar + "'";
    break;
    }

    this.DataGrid1.DataSource = dataViewGPPL;
    this.DataGrid1.DataBind();

    }


    }

    catch (Exception ex)
    {
    throw ex;
    }



    Esperanza Guest

  6. #5

    Default dataView

    Hi Esperanza,

    How do you fill whole data to the dataview?

    >-----Original Message-----
    >Hello .net expert, I've made a litle reserch function
    which allow the user
    >to find a client by name
    >or phone number (both are string format) .
    >
    >Even if I know the value exist, the datagrid return me
    nothing.
    >Any Idea what would be the problem ??
    >Thanks in advance !!
    >
    >Esperanza
    >
    >//--------------------------------------------------------
    -------------
    >private void btnLookFor_Click(object sender,
    System.EventArgs e)
    > {
    >
    > string strVar;
    > string strSelection;
    > strVar = this.txtLookFor.Text;
    > strSelection = this.RadListLookFor.SelectedItem.Text;
    >
    > try
    > {
    > if (strVar.Trim()!=null)
    > {
    > //See witch radio button was click
    > switch(strSelection)
    >
    > {
    > //Look by name
    > case "Name":
    > this.dataViewGPPL.RowFilter = "XABALPH like '%" +
    strVar + "%'";
    > break;
    >
    >
    > //Look by phone number
    > case "No tel.":
    > this.dataViewGPPL.RowFilter = "XTEL like '" +
    strVar + "'";
    > break;
    > }
    >
    > this.DataGrid1.DataSource = dataViewGPPL;
    > this.DataGrid1.DataBind();
    >
    > }
    >
    >
    > }
    >
    > catch (Exception ex)
    > {
    > throw ex;
    > }
    >
    >
    >
    >.
    >
    Elton Wang Guest

  7. #6

    Default Re: dataView

    That was it.
    I didn't fill the dataSet before.

    Thanks a lot !!
    Esperanza
    "Elton Wang" <anonymous@discussions.microsoft.com> a écrit dans le message
    de news:39e301c51f63$faa778f0$a401280a@phx.gbl...
    > Hi Esperanza,
    >
    > How do you fill whole data to the dataview?
    >
    >
    > >-----Original Message-----
    > >Hello .net expert, I've made a litle reserch function
    > which allow the user
    > >to find a client by name
    > >or phone number (both are string format) .
    > >
    > >Even if I know the value exist, the datagrid return me
    > nothing.
    > >Any Idea what would be the problem ??
    > >Thanks in advance !!
    > >
    > >Esperanza
    > >
    > >//--------------------------------------------------------
    > -------------
    > >private void btnLookFor_Click(object sender,
    > System.EventArgs e)
    > > {
    > >
    > > string strVar;
    > > string strSelection;
    > > strVar = this.txtLookFor.Text;
    > > strSelection = this.RadListLookFor.SelectedItem.Text;
    > >
    > > try
    > > {
    > > if (strVar.Trim()!=null)
    > > {
    > > //See witch radio button was click
    > > switch(strSelection)
    > >
    > > {
    > > //Look by name
    > > case "Name":
    > > this.dataViewGPPL.RowFilter = "XABALPH like '%" +
    > strVar + "%'";
    > > break;
    > >
    > >
    > > //Look by phone number
    > > case "No tel.":
    > > this.dataViewGPPL.RowFilter = "XTEL like '" +
    > strVar + "'";
    > > break;
    > > }
    > >
    > > this.DataGrid1.DataSource = dataViewGPPL;
    > > this.DataGrid1.DataBind();
    > >
    > > }
    > >
    > >
    > > }
    > >
    > > catch (Exception ex)
    > > {
    > > throw ex;
    > > }
    > >
    > >
    > >
    > >.
    > >

    Esperanza Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139