Last post Aug 13, 2009 12:17 PM by backwardshoop
Aug 13, 2009 05:32 AM|zell71|LINK
i have a problem with farpoint which is giving me a serious headache. farpoint is a 3rd party excel style control for asp.net. i've spoken to the support regarding this problem but have come to a deadend. so trying my luck here!
basically, i have a number of filters which are automatically generated via farpoint...which when selected do a ajax update on the control which displays the data without doing a postback (to my knowledge). (example here
..is there a way to attach a postback to these filters? reason being is i'm using conditional formatting on the farpoint spread control..but i assume my data is just to large to handle it..so when i do a filter selection or use paging..the control doesnt
update (possibly times out?).
so my plan was to clear conditional formatting and then reapply it once the filter has been applied to the data. However, since those filters are automatically generated via the spread control..i cant capture or attach a jscript function to it.
if anyone can help, id be grateful.
Aug 13, 2009 12:17 PM|backwardshoop|LINK
When you click on an item in the filterbox, an AJAX callback is performed. You can see this by putting a breakpoint in the PageLoad event and see that it gets hit when you click a filter item. You can check the __EVENTTARGET and __EVENTARGUMENT keys of the
Page Request object to determine the cause of the postback. For this type of postback by the Spread, the __EVENTTARGET should be the id of the Spread control appended with the cell in the column header of the filter box and ch. The __EVENTARGUMENT would be
item chosen from the list.
Page.Request("__EVENTTARGET") = "FpSpread1$0,1,ch"
Page.Request("__EVENTARGUMENT") = "Test2"
Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
Dim t As WebControl = FpSpread1.FindControl("0,1,ch")
Dim s As String = t.Attributes("onchange")
t.Attributes.Add("onchange", "alert('test');" & s)