Click here to Skip to main content
15,885,278 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Passing an ID to an external .js file Pin
RajeevKumarSharma1-Jun-09 23:19
RajeevKumarSharma1-Jun-09 23:19 
QuestionGridview in ASP.Net with C# [modified] Pin
mahichandu1-Jun-09 4:18
mahichandu1-Jun-09 4:18 
AnswerRe: Gridview in ASP.Net with C# Pin
Ibrahim Bello1-Jun-09 9:24
Ibrahim Bello1-Jun-09 9:24 
QuestionRe: Gridview in ASP.Net with C# Pin
mahichandu1-Jun-09 9:40
mahichandu1-Jun-09 9:40 
AnswerRe: Gridview in ASP.Net with C# Pin
Ibrahim Bello1-Jun-09 22:04
Ibrahim Bello1-Jun-09 22:04 
QuestionRe: Gridview in ASP.Net with C# Pin
mahichandu2-Jun-09 6:36
mahichandu2-Jun-09 6:36 
AnswerRe: Gridview in ASP.Net with C# Pin
Ibrahim Bello2-Jun-09 7:03
Ibrahim Bello2-Jun-09 7:03 
QuestionRe: Gridview in ASP.Net with C# Pin
mahichandu2-Jun-09 7:19
mahichandu2-Jun-09 7:19 
by using above syntax also..i can't see anychange in the table..i can see all the columns..the 0(zero) value cell columns are not hiding..Frown | :(
actullt my task is to delete those columns..am unable to do that..
atleast i want to try with hiding those columns.. Cry | :((
below i copied my code of populating data into gridview and the rowdelete event..

protected void Page_Load(object sender, EventArgs e)
    {
        PopulateGrid();
       
    }

    public void PopulateGrid()
    {
        SqlConnection sqlConn = null;
        SqlDataAdapter da = null;

        try
        {
            string connString = null;
            SqlCommand cmd1;
            connString = System.Web.Configuration.WebConfigurationManager.AppSettings["SqlServerConnectionString"];
            //connString = "Data Source = SQD-CON4\QSRV1; Initial Catalog = NDI; Integrated Security = SSPI;";
            sqlConn = new SqlConnection(connString);
            sqlConn.Open();
            cmd1 = new SqlCommand("[MED].[usp_SelectAllSDNCounts]", sqlConn);
            cmd1.CommandType = CommandType.StoredProcedure;
            da = new SqlDataAdapter(cmd1);
            DataSet ds = new DataSet();
            da.Fill(ds);
            GridView1.DataSource = ds.Tables[0].DefaultView;
            GridView1.DataBind();
        }
        finally
        {
            sqlConn.Close();
            da.Dispose();
            da = null;
        }

    }

public void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
       
        
           foreach (GridViewRow Row in GridView1.Rows)
            {
                for(int i=0; i<11; i++)
                {
                    if (Row.Cells[i].Text == "0")
                    {
                     GridView1.Columns[i].Visible=false;
                    }
                }

            }
    }

AnswerRe: Gridview in ASP.Net with C# Pin
Ibrahim Bello2-Jun-09 7:31
Ibrahim Bello2-Jun-09 7:31 
QuestionRe: Gridview in ASP.Net with C# Pin
mahichandu2-Jun-09 7:48
mahichandu2-Jun-09 7:48 
AnswerRe: Gridview in ASP.Net with C# Pin
Ibrahim Bello2-Jun-09 8:09
Ibrahim Bello2-Jun-09 8:09 
AnswerRe: Gridview in ASP.Net with C# Pin
Ibrahim Bello3-Jun-09 22:08
Ibrahim Bello3-Jun-09 22:08 
QuestionUnable to connect to SQL Server database. Pin
Koss_G1-Jun-09 4:01
Koss_G1-Jun-09 4:01 
AnswerRe: Unable to connect to SQL Server database. Pin
Herman<T>.Instance2-Jun-09 21:54
Herman<T>.Instance2-Jun-09 21:54 
QuestionHidden Field problem Pin
ais071-Jun-09 3:58
ais071-Jun-09 3:58 
AnswerRe: Hidden Field problem Pin
l.laxmikant1-Jun-09 4:33
l.laxmikant1-Jun-09 4:33 
GeneralRe: Hidden Field problem Pin
Not Active1-Jun-09 7:50
mentorNot Active1-Jun-09 7:50 
QuestionImplementing article reading/writing (ASP.NET) Pin
Hristiyan1-Jun-09 3:57
Hristiyan1-Jun-09 3:57 
QuestionOpen Url like http://noida.saamstesting.com Pin
.NET- India 1-Jun-09 2:33
.NET- India 1-Jun-09 2:33 
AnswerRe: Open Url like http://noida.saamstesting.com Pin
Ramesh Swaminathan1-Jun-09 2:51
Ramesh Swaminathan1-Jun-09 2:51 
Questionbutton click event fires without code Pin
Kissy161-Jun-09 2:07
Kissy161-Jun-09 2:07 
AnswerRe: button click event fires without code Pin
Not Active1-Jun-09 2:30
mentorNot Active1-Jun-09 2:30 
Answer[Message Deleted] Pin
Ramesh Swaminathan1-Jun-09 2:46
Ramesh Swaminathan1-Jun-09 2:46 
GeneralRe: button click event fires without code Pin
Not Active1-Jun-09 3:17
mentorNot Active1-Jun-09 3:17 
General[Message Deleted] Pin
Ramesh Swaminathan1-Jun-09 3:50
Ramesh Swaminathan1-Jun-09 3:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.