----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: YogiRocker Message 2 in Discussion Hi Sangeeta, Here is one sample of how to set the datasource for a datagrid. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolsbasedatalistclassdatasourcetopic.asp You can also bind the data from database, by pulling the data from the database in a dataset and then assigning that dataset to the datagrid. E.g. SqlConnection conn = new SqlConnection(connectionString); SqlDataAdapter adp = new SqlDataAdapter("select * from table ", conn); DataSet ds = new DataSet(); adp.Fill(ds); dataGrid1.DataSource = ds; dataGrid.DataBind(); the same data can be set for DropDownList or ListBox, with some modification. for(int i=0;i<ds.Tables[0].Rows.Count;i++) { dropDownList1.Add(ds.Tables[0].Column[0][i].ToString()); } Column[0][i] is the index for 1st column and i th Row. You can check out more details on MSDN under DataSet, DropDownList, DataGrid. Relpy back if you have more doubts, or looking for solution of some specirfic prob. Yogesh ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
