We take pride in your success. We let our positivity drive us, day in and out. Talk to us at Mindfire to know us more.

Software Technology Tips

If you have used the DevExpress GridView, during Windows Application development, you are likely to have come across a column with a ColumnEdit of type "HyperLinkEdit". If you want to set the RepositoryItem for that column during runtime according to the value of another column then you have to handle the GridView's CustomRowCellEdit event.
 
Refer the following code :
 private void gridview1_CustomRowCellEdit(object sender, CustomRowCellEditEventArgs e)
        {
            if (e.Column == gcHypLinkColumn)
            {
   if (gridview1.GetRowCellValue(e.RowHandle,      gcLocked).ToString().CompareTo("Unlocked") == 0)
                {
                    e.RepositoryItem = repHypLink;
                }
                else
                {
                    e.RepositoryItem = null;
                }
            }
        }
 
HyperLinkEdit has been used in the above code as an example only, depending on your need  you can use any other type of Repository availabe. 


Related Tags:

ASP.NET, DBExpress GridView

Author: Rashmita Devi

top

ASP.NET

Let us Connect!

privacy

copyright (c) Mindfire Solutions 2007-2012. Login