Results 1 to 3 of 3

Thread: Datagrid Question, windows Forms

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Posts
    153

    Question Datagrid Question, windows Forms

    Guys,

    Sorry if I am asking this question again. Not much used to .Net windows forms.

    I have been struggling with this for sometime. Hope there are few angels in this forums to help me.

    I have a datagrid being populated by a dataset. At run time
    the grid does not show the data unless the + expander is clicked.
    After clicking this + a hyper link 'Table' is displayed which i have to again click for the datagrid to be populated with the data.

    Is there any method to override this so that as the form loads the datagrid is complete with the data.

    please provide any code / examples.

    Thanks in advance.
    there r no alternatives 4 hardwork.

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    The reason why that is happening is because you are passing the dataset object to the DataGrid to be binded. Pass the table directly like this
    Code:
    dataGrid1.DataBind = MyDataSet.MyTables[0];

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Posts
    153
    DevGrp,

    As I said there is an angel. So you are!!!!!

    Thank you very much. That clears off much burden from my head.
    there r no alternatives 4 hardwork.

Posting Permissions

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



Click Here to Expand Forum to Full Width