Regarding datagrid control (very urgent)
-
hello, i have to change the color of datagrid rows dynamically as per the values present in the row .... for example row has 5 columns and in that way it had 5 rows first first row should data in datagrid should compare with second row data in datagrid if it exceeds the row color should have blue color other wise green in this way i have to check with each row with ecah column in datagrid plz can any body help in this regard i am sending code for the datagrid plz check it out and say how to add color to it cmdControlTower.Connection = CON con.Open() cmdControlTower.CommandType = CommandType.StoredProcedure cmdControlTower.CommandText = "ACE_CONTROLTOWER" Dim cellid As New SqlParameter Dim fromDATE As New SqlParameter Dim toDATE As New SqlParameter cellid.ParameterName = "@CELLID" cellid.SqlDbType = SqlDbType.VarChar cellid.Value = strControlTowerList(0) cellid.Direction = ParameterDirection.Input cmdControlTower.Parameters.Add(cellid) fromDATE.ParameterName = "@fromDATE" fromDATE.SqlDbType = SqlDbType.DateTime fromDATE.Value = strFromDATE fromDATE.Direction = ParameterDirection.Input cmdControlTower.Parameters.Add(fromDATE) toDATE.ParameterName = "@toDATE" toDATE.SqlDbType = SqlDbType.DateTime toDATE.Value = strToDate toDATE.Direction = ParameterDirection.Input cmdControlTower.Parameters.Add(toDATE) 'Dim dr As SqlDataReader 'dr = cmd.ExecuteReader() 'Datagrid2.DataSource = dr 'Datagrid2.DataBind() 'dr.Close() 'closing data reader 'cmd.Dispose() Dim daControlTower As SqlDataAdapter daControlTower = New SqlDataAdapter(cmdControlTower) dsControlTower = New DataSet("CONTROLTOWER") daControlTower.Fill(dsControlTower, "CONTROLTOWER") dgControlTower.DataSource = dsControlTower.Tables("CONTROLTOWER") dgControlTower.DataBind() thanks & regard Nagalakshmi
-
hello, i have to change the color of datagrid rows dynamically as per the values present in the row .... for example row has 5 columns and in that way it had 5 rows first first row should data in datagrid should compare with second row data in datagrid if it exceeds the row color should have blue color other wise green in this way i have to check with each row with ecah column in datagrid plz can any body help in this regard i am sending code for the datagrid plz check it out and say how to add color to it cmdControlTower.Connection = CON con.Open() cmdControlTower.CommandType = CommandType.StoredProcedure cmdControlTower.CommandText = "ACE_CONTROLTOWER" Dim cellid As New SqlParameter Dim fromDATE As New SqlParameter Dim toDATE As New SqlParameter cellid.ParameterName = "@CELLID" cellid.SqlDbType = SqlDbType.VarChar cellid.Value = strControlTowerList(0) cellid.Direction = ParameterDirection.Input cmdControlTower.Parameters.Add(cellid) fromDATE.ParameterName = "@fromDATE" fromDATE.SqlDbType = SqlDbType.DateTime fromDATE.Value = strFromDATE fromDATE.Direction = ParameterDirection.Input cmdControlTower.Parameters.Add(fromDATE) toDATE.ParameterName = "@toDATE" toDATE.SqlDbType = SqlDbType.DateTime toDATE.Value = strToDate toDATE.Direction = ParameterDirection.Input cmdControlTower.Parameters.Add(toDATE) 'Dim dr As SqlDataReader 'dr = cmd.ExecuteReader() 'Datagrid2.DataSource = dr 'Datagrid2.DataBind() 'dr.Close() 'closing data reader 'cmd.Dispose() Dim daControlTower As SqlDataAdapter daControlTower = New SqlDataAdapter(cmdControlTower) dsControlTower = New DataSet("CONTROLTOWER") daControlTower.Fill(dsControlTower, "CONTROLTOWER") dgControlTower.DataSource = dsControlTower.Tables("CONTROLTOWER") dgControlTower.DataBind() thanks & regard Nagalakshmi
-
hello, i have to change the color of datagrid rows dynamically as per the values present in the row .... for example row has 5 columns and in that way it had 5 rows first first row should data in datagrid should compare with second row data in datagrid if it exceeds the row color should have blue color other wise green in this way i have to check with each row with ecah column in datagrid plz can any body help in this regard i am sending code for the datagrid plz check it out and say how to add color to it cmdControlTower.Connection = CON con.Open() cmdControlTower.CommandType = CommandType.StoredProcedure cmdControlTower.CommandText = "ACE_CONTROLTOWER" Dim cellid As New SqlParameter Dim fromDATE As New SqlParameter Dim toDATE As New SqlParameter cellid.ParameterName = "@CELLID" cellid.SqlDbType = SqlDbType.VarChar cellid.Value = strControlTowerList(0) cellid.Direction = ParameterDirection.Input cmdControlTower.Parameters.Add(cellid) fromDATE.ParameterName = "@fromDATE" fromDATE.SqlDbType = SqlDbType.DateTime fromDATE.Value = strFromDATE fromDATE.Direction = ParameterDirection.Input cmdControlTower.Parameters.Add(fromDATE) toDATE.ParameterName = "@toDATE" toDATE.SqlDbType = SqlDbType.DateTime toDATE.Value = strToDate toDATE.Direction = ParameterDirection.Input cmdControlTower.Parameters.Add(toDATE) 'Dim dr As SqlDataReader 'dr = cmd.ExecuteReader() 'Datagrid2.DataSource = dr 'Datagrid2.DataBind() 'dr.Close() 'closing data reader 'cmd.Dispose() Dim daControlTower As SqlDataAdapter daControlTower = New SqlDataAdapter(cmdControlTower) dsControlTower = New DataSet("CONTROLTOWER") daControlTower.Fill(dsControlTower, "CONTROLTOWER") dgControlTower.DataSource = dsControlTower.Tables("CONTROLTOWER") dgControlTower.DataBind() thanks & regard Nagalakshmi