Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need to fire an Event when Column value == "Discount" in GridView. I used Repository Lookup Edit in 1st Column. So if I choose any Item it perform some calculation. if i choose "Discount" particulat Item from Repository Lookup Edit, I need to fire another calculation. I tried this code but it skip if condition.

C#
private void gridView1_CustomUnboundColumnData(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDataEventArgs e)
        {
            GridView view = sender as GridView;
            if (gridView1.Columns["Type"] == gridView1.GetFocusedRowCellValue("Discount"))
            {
                // code
            }
        }

Help me, How to write if condition ??
Posted
Comments
Maciej Los 22-Nov-13 11:43am    
You need to check the cell content, not the entire column.
srihari1904 22-Nov-13 23:41pm    
Hi Maciej, Am new to c# so tell, How to check the cell content ? give me some code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900