-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: bhavesh26
Message 7 in Discussion

Hi Dasarath,   I am still not clear with your code please look following code 
it might help you.   private Dataview dvwCategories; //Class variable private 
void Page_Load(object sender, System.EventArgs e) {
        SqlConnection conNorthwind;
        SqlDataAdapter dadNorthwind;
        DataSet dstNorthwind;
                dstNorthwind = new DataSet();
        // Getting connection string from the configurationfile,in otherway you 
can directly put it here         conNorthwind = new 
SqlConnection(ConfigurationSettings.AppSettings("connString"));
        dadNorthwind = new SqlDataAdapter("Select * From Categories", 
conNorthwind);
 
        dadNorthwind.Fill(dstNorthwind, "Categories");         dvwCategories = 
dstNorthwind.Tables["Categories"].DefaultView();
               DataGrid1.DataSource = dstNorthwind;
        DataGrid1.DataMember = "Categories";
        DataGrid1.DataBind();
    }
 private void Button1_Click(object sender, System.EventArgs e)
{

dvwCategories.RowFilter="CategoryName='Condiments'";
if(dvwCategories .Count>0)
{
DataGrid1.DataSource=dvwCategories ;
DataGrid1.DataBind();
}
else
DataGrid1.Visible=false;
}
 Thanks,    cheers,  Bhavesh Patel, Jr. Software Engg, Elegant Microweb Pvt. 
Ltd, Ahmedabad

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_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]

Reply via email to