|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to use gridviewI am used to using the datagrid and being able to bind it to a datareader programmatically. Is there a way to do that with the gridview? Here is what I have tried but it is not visible: sSQL = "Select c.ClientName, a.lName + ', ' + a.fName + ' ' + a.middleInitial AS ApplicantName," & _ "a.OrderedBy, a.DateOrdered " & _ "from tblApplicant AS a JOIN tblClient AS c ON a.ClientID = c.ClientID " & _ "Where DatePosted Is null" dr = cDb.getDataReader(sSQL) Me.gridNewRequests.DataSource = dr Me.gridNewRequests.DataBind() Me.gridNewRequests.Visible = True cDb.closeConnection() As you can see I am not using an SQLDataSource. Do you have to use it or can I do it the way I am? Please help me with this. Thanks, enak yes, you can programmatically bind a GridView using the DataSource
property <a href="http://authors.aspalliance.com/aspxtreme/webforms/controls/addinggridviewcontrolstowebformspage.aspx">Adding GridView Controls to a Web Forms Page</a>
changing cursor of ImageButton
TextBox TextChanged Event Adding WebControl using a Button.... Custom Controls with non-String Attributes Responding to changes to controls in a Repeater Dynamically Creating A CSS Class Response.Redirect not being called after sending an email Web control which is a combobox with an editable portion Bitmap as a Image web control asp.net 1.1 X 2.0 compatibility issue |
|||||||||||||||||||||||