Two thins There is a field called explanation. I need to detect if the
field is empty the buttoncolumn must be active for that row if its
already filled the user cant join more data.
I have another column called STATUS, there are 3 statrus, maximum,
minimu, average, if that column is MAXIMUM I must put another color to
that field
The code of the datagird is the following
<asp:DataGrid OnItemDataBound ="dgindicador_D ataGridOnItemDa taBound"
id="dgindicador " runat="server"
BorderColor="#9 99999" BorderStyle="No ne" BorderWidth="1p x"
BackColor="Whit e" CellPadding="3"
GridLines="Vert ical" AutoGenerateCol umns="False"
Font-Size="X-Small" Font-Names="Trebuche t MS">
<SelectedItemSt yle Font-Bold="True" ForeColor="Whit e"
BackColor="#008 A8C"></SelectedItemSty le>
<AlternatingIte mStyle BackColor="Gain sboro"></AlternatingItem Style>
<ItemStyle ForeColor="Blac k" BackColor="#EEE EEE"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="Whit e"
BackColor="#000 084"></HeaderStyle>
<FooterStyle ForeColor="Blac k" BackColor="#CCC CCC"></FooterStyle>
<Columns>
<asp:BoundColum n DataField="Peri odo" ReadOnly="True"
HeaderText="Per iodo" DataFormatStrin g="{0:MM-yyyy}"></asp:BoundColumn >
<asp:BoundColum n DataField="Meta _ppto" ReadOnly="True"
HeaderText="Met a"></asp:BoundColumn >
<asp:BoundColum n DataField="valo r_real" ReadOnly="True"
HeaderText="Ind icador"></asp:BoundColumn >
<asp:BoundColum n DataField="Esta do" ReadOnly="True"
HeaderText="Est ado"></asp:BoundColumn >
<asp:BoundColum n DataField="Expl icacion" ReadOnly="True"
HeaderText="Exp licacion"></asp:BoundColumn >
<asp:ButtonColu mn Text="Ingresar Explicacion" HeaderText="Ing resar
Explicacion" CommandName="In gresar"></asp:ButtonColum n>
</Columns>
<PagerStyle HorizontalAlign ="Center" ForeColor="Blac k"
BackColor="#999 999" Mode="NumericPa ges"></PagerStyle>
</asp:DataGrid>
This code Fills the Datagrid
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Introducir aquí el código de usuario para inicializar la página
Dim selectCMD As SqlCommand = New SqlCommand("sel ect * from
cxc_nal order by periodo desc", SqlConnection1)
selectCMD.Comma ndTimeout = 30
Dim custDA As SqlDataAdapter = New SqlDataAdapter
custDA.SelectCo mmand = selectCMD
Dim custDS As DataSet = New DataSet
custDA.Fill(cus tDS, "cxc_nal")
dgindicador.Dat aSource = custDS.Tables(" cxc_nal").Defau ltView
dgindicador.Dat aBind()
End Sub
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!