Hi Everyone,
I have created a gridview with 3 cols successfully. 1st is the S.no and 2,3 contains Dates. It has 12 rows. Now i want to highlight a cell in the 2nd column which satisfies a cond. This is my Code
if e::Row::Cells[1]::Text = "mycondvar"
then
set e::Row::font::Bold to false
else
set e::Row::font::Bold to true.
It is always setting to True. Even when I set a breakpoint i am not able to view the value in Cells[1]. I am totally stuck, is my syntax correct ?
Kindly help me with this . Thanks
#MicroFocus#COBOLVISUALCOBOLMIGRATION#2.2VS2013COBCH174788#extend9.2.5VisualCOBOL#COBOL#VisualCOBOL#MicrofocusorionhubHi, are you using WPF or WFA or Asp.net?
I can tell you that using WFA you can check the value using this statement:
GridListar::Rows::Item(lo-ind)::Cells::Item(0)::Value
GridListar = Name of the object
lo-ind = index of the line you want
item(0) = index of the column (0 = first column)
Using WPF you can check the samples I had uploaded here:
community.microfocus.com/.../13057.aspx
community.microfocus.com/.../13059.aspx
Hope this helps...
Hi Everyone,
I have created a gridview with 3 cols successfully. 1st is the S.no and 2,3 contains Dates. It has 12 rows. Now i want to highlight a cell in the 2nd column which satisfies a cond. This is my Code
if e::Row::Cells[1]::Text = "mycondvar"
then
set e::Row::font::Bold to false
else
set e::Row::font::Bold to true.
It is always setting to True. Even when I set a breakpoint i am not able to view the value in Cells[1]. I am totally stuck, is my syntax correct ?
Kindly help me with this . Thanks
#MicroFocus#COBOLVISUALCOBOLMIGRATION#2.2VS2013COBCH174788#extend9.2.5VisualCOBOL#COBOL#VisualCOBOL#MicrofocusorionhubThanks Coral. But I need it for asp.net
Hi Everyone,
I have created a gridview with 3 cols successfully. 1st is the S.no and 2,3 contains Dates. It has 12 rows. Now i want to highlight a cell in the 2nd column which satisfies a cond. This is my Code
if e::Row::Cells[1]::Text = "mycondvar"
then
set e::Row::font::Bold to false
else
set e::Row::font::Bold to true.
It is always setting to True. Even when I set a breakpoint i am not able to view the value in Cells[1]. I am totally stuck, is my syntax correct ?
Kindly help me with this . Thanks
#MicroFocus#COBOLVISUALCOBOLMIGRATION#2.2VS2013COBCH174788#extend9.2.5VisualCOBOL#COBOL#VisualCOBOL#MicrofocusorionhubHi Coral,
I want to highlight any cell in the 2nd column which satisfies my cond. I did not convey it properly in my question, sorry.
Hi Everyone,
I have created a gridview with 3 cols successfully. 1st is the S.no and 2,3 contains Dates. It has 12 rows. Now i want to highlight a cell in the 2nd column which satisfies a cond. This is my Code
if e::Row::Cells[1]::Text = "mycondvar"
then
set e::Row::font::Bold to false
else
set e::Row::font::Bold to true.
It is always setting to True. Even when I set a breakpoint i am not able to view the value in Cells[1]. I am totally stuck, is my syntax correct ?
Kindly help me with this . Thanks
#MicroFocus#COBOLVISUALCOBOLMIGRATION#2.2VS2013COBCH174788#extend9.2.5VisualCOBOL#COBOL#VisualCOBOL#MicrofocusorionhubHello Pradeep!
Try do implement a new method using RowDataBound event this way:
method-id GridViewListar_RowDataBound protected.
procedure division using by value sender as object e as type System.Web.UI.WebControls.GridViewRowEventArgs.
if e::Row::Cells[3]::Text equal "Masculino"
then
set e::Row::Cells[3]::Font::Bold to false
else
set e::Row::Cells[3]::Font::Bold to true
end-if
end method.
Cells[3] means you are comparing the value of the fourth column.
This method will run automatically when a new row is inserted into the gridview.
Hope this helps.