DataGrid

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rochdi

    #1

    DataGrid

    Hi guys,

    I'm binding a DataSet to a DataGrid1 that shows (eg. Employee Id & name). I
    would like when I click in a certain row in the DataGrid1 it takes the
    Emplyee Id for that row, search for it in the DataSet and display the reasult
    (eg. Employee Id & Address) in TextBoxes.(coul d u a very simple code)


    thanks guys
    --
    Regads,
    Rochdi
  • Cor Ligthert [MVP]

    #2
    Re: DataGrid

    Rochdi,

    Why click why not just let it display automaticly forever.

    See this sample on our website for that.



    I hope this helps,

    Cor

    "Rochdi" <Rochdi@discuss ions.microsoft. com> schreef in bericht
    news:023ACEA1-02C5-445E-AC4D-40A4C5B4B466@mi crosoft.com...[color=blue]
    > Hi guys,
    >
    > I'm binding a DataSet to a DataGrid1 that shows (eg. Employee Id & name).
    > I
    > would like when I click in a certain row in the DataGrid1 it takes the
    > Emplyee Id for that row, search for it in the DataSet and display the
    > reasult
    > (eg. Employee Id & Address) in TextBoxes.(coul d u a very simple code)
    >
    >
    > thanks guys
    > --
    > Regads,
    > Rochdi[/color]


    Comment

    • Rochdi

      #3
      Re: DataGrid

      Sorry, this is not much helping because it example is binding to a DataTable
      not dataset which have different methods and properties (such as
      ..Columns.Add) which is not available to dataset!!!?
      --
      Regads,
      Rochdi


      "Cor Ligthert [MVP]" wrote:
      [color=blue]
      > Rochdi,
      >
      > Why click why not just let it display automaticly forever.
      >
      > See this sample on our website for that.
      >
      > http://www.windowsformsdatagridhelp....f-587f730fa118
      >
      > I hope this helps,
      >
      > Cor
      >
      > "Rochdi" <Rochdi@discuss ions.microsoft. com> schreef in bericht
      > news:023ACEA1-02C5-445E-AC4D-40A4C5B4B466@mi crosoft.com...[color=green]
      > > Hi guys,
      > >
      > > I'm binding a DataSet to a DataGrid1 that shows (eg. Employee Id & name).
      > > I
      > > would like when I click in a certain row in the DataGrid1 it takes the
      > > Emplyee Id for that row, search for it in the DataSet and display the
      > > reasult
      > > (eg. Employee Id & Address) in TextBoxes.(coul d u a very simple code)
      > >
      > >
      > > thanks guys
      > > --
      > > Regads,
      > > Rochdi[/color]
      >
      >
      >[/color]

      Comment

      • Cor Ligthert [MVP]

        #4
        Re: DataGrid

        Rochdi,
        [color=blue]
        > Sorry, this is not much helping because it example is binding to a
        > DataTable
        > not dataset which have different methods and properties (such as
        > .Columns.Add) which is not available to dataset!!!?
        > --[/color]

        Where did you get that information. A dataset is nothing more than a
        serializable binder around datatables and relations and constrains about
        that.

        ds.tables(0) is just the first table in your dataset.

        Cor


        Comment

        Working...