Conditional formatting in webcombo

2 replies. Last post: August 12, 2011 6:13 AM by Paul Fletcher
Tags :
  • (None)

Hi,

I've been trying to get my web combo to show different colour rows based on one of the columns of my result set.

I've tried to loop through all the items on the OnAfterResponseProcess client event but I can't seem to even change the text within the cells.

Has anyone done this or can anyone help me with this task?


Thanks


Paul

Answers

Hi Paul,

Unfortunately you are unable to set style(color) on client side event (OnAfterResponseProcess). 
If you want to set a style, a codes had to set in Server side. And I suggest you to use on InitializeRow event.

For example : 

protected void WebCombo1_InitializeRow(object sender, ISNet.WebUI.WebCombo.RowEventArgs e)
    {
                   e.Row.Cells[0].Style.BackColor = System.Drawing.Color.Orange;
    }

 
Hope  this helps.
Riendy



 

All Replies

Hi Paul,

Unfortunately you are unable to set style(color) on client side event (OnAfterResponseProcess). 
If you want to set a style, a codes had to set in Server side. And I suggest you to use on InitializeRow event.

For example : 

protected void WebCombo1_InitializeRow(object sender, ISNet.WebUI.WebCombo.RowEventArgs e)
    {
                   e.Row.Cells[0].Style.BackColor = System.Drawing.Color.Orange;
    }

 
Hope  this helps.
Riendy



 

Thank you kind sir, it's working as I hoped.

All times are GMT -5. The time now is 1:03 PM.
Previous Next