This is a migrated thread and some comments may be shown as answers.

Sort column window.status message

2 Answers 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
André Freitas
Top achievements
Rank 1
André Freitas asked on 04 May 2010, 06:56 PM

Im trying to change the "javascript:___dopostback" message in the header linkbutton (sort column).

Im handling the ItemDataBound event, and using this code:

   if (e.Item is GridHeaderItem)
   {
    ((LinkButton)e.Item.Cells[2].Controls[0]).Attributes.Add("onmouseover", "window.status='';");
   }

But Its not working, someone tried it before?

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 05 May 2010, 08:56 AM
Hi,

I tried your code and its working for me, after adding 'return true;'.

CS:
      
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
   if (e.Item is GridHeaderItem) 
   { 
      GridHeaderItem item = (GridHeaderItem)e.Item; 
      ((LinkButton)item["column1"].Controls[0]).Attributes.Add("onMouseOver", "window.status='';return true;"); 
   } 

Regards,
Princy.
0
André Freitas
Top achievements
Rank 1
answered on 05 May 2010, 12:57 PM
Worked. Thank you.
Tags
Grid
Asked by
André Freitas
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
André Freitas
Top achievements
Rank 1
Share this question
or