CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10

Threaded View

  1. #4
    Join Date
    Jul 2005
    Location
    Louisville, KY
    Posts
    201

    Re: Restrict text input

    Well, assuming you have the control, usually you can just set the Datasource element in code, to that of the Dataset.

    See the following:

    Code:
    DataSet ds = PMEWDirectorates_GetAll();
    if (ds.Tables.Count > 0)
    {
         GridView.DataSource = ds;
         GridView.DataBind();
    }
    else
    {
         Message.Text = "Unable to connect to the database.";
    }
    Regards,
    Quinn

    If this post resolves your question, please make sure to flag post as resolved. Thanks.
    Last edited by QuinnJohns; October 16th, 2011 at 10:55 AM.

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

Featured