FreezePanes with OWC11 Spreadsheet

J

Josh Sale

I'm just getting started working with OWC and have what I hope is a pretty
basic question.

I dragged an OWC11 spreadsheet component onto my aspx page in Visual Studio
2003. I then set the XMLURL to point to another .aspx page from the HTML
layout mode of VS2003. This other .aspx page's VB code instantiates a
version of the SS component on the server, populates it with data, formats
the data and then Response.Writes out the XMLData from the server version of
the SS component.

All of this seems to work OK until I try to do a FreezePanes.

I do the FreezePanes on the server version of the SS and if I inspect the
generated XMLData, I can see the freeze pane directives. However, the
client version of the SS doesn't actually create the needed panes.

I've come across KB article Q256625 which seems to be relevant (although it
was written for OWC9). But I'm not quite sure how to apply its advice to my
problem. Part of the problem is that while I'm experienced on server side
programming, I'm not very experienced on client-side VBScript, JScript,
DHTML, etc.

Can somebody provide me a little example of what I need to do to adapt the
suggestion in Q256625 to my situation? Or else provide some other
explanation for what I'm running into with FreezePanes?

TIA,

Josh
 
A

Alvin Bruney

I believe freezepane functionality only works on the client version not the
server version. I'm not totally sure about this though.

regards
 
J

Josh Sale

You're correct Alvin!

I captured the XML data on the server and compared what it produced with and
without frozen panes and the results were essentially identical.

So it seems like I have two choices:

1) I can modify the XML representation of the SS and include the frozen
pane info. I've saved an XML version of a workbook in XL2003 that contains
frozen panes and opened it in the OWC SS and the frozen panes are there. So
I just need to get the right XML stuff into the data I stream back to the
client.

2) Somehow let the client know that I want frozen panes and where I want
them and then let the client establish the frozen panes in the SS. I have
to admit, I'm not sure how to go about doing this! The ASPX page that
"knows" where to put the frozen panes is the one that generates the XML. I
was thinking about putting a hidden field on it's form that contains the
cell address where the freeze should take place but I'm not sure if the
client would ever "see" this field or how to go about "finding" it from the
client side.

Any thoughts?

Thanks,

josh
 
A

Alvin Bruney

Put it in a hidden field with run at server tags - it being the cordinates
of the cell to be frozen ex A2:C4. Build a javascript function (or vb)
clientside to read that hidden field and then use this coordinate to set the
selected cell on the spreadsheet. Then call freezepanes after you set the
selected cells. The freezepane will occur by default on the selected cell.

This is off the top of my head, I haven't tried it but it seems
theoretically sound to me.
regards
 
J

Josh Sale

Right. That's what I was describing as my second choice. But I'm fuzzy on
how it will work.

- I have an ASPX page (call it form1) that contains the OWC SS.

- The OWC SS has an XMLURL set to (say) form2.aspx.

- Form2.aspx creates a server copy of the OWC SS, populates it and then
Response.Writes it's XMLDATA to the OWC SS.

- I can easily create a hidden field with run at server tags on Form2.aspx
(which is the code that knows the cell address where the freeze is to take
place) and then set its value to the freeze address.


But my questions are:

- I think I need some client-side event to trigger the client to get this
hidden field and perform the freeze. This event would have to occur after
form2.aspx has finished doing its things (presumably long after form1.aspx
has completed). What even do I trap?

- Assuming the above triggering problem is solved, if the hidden field is in
form2.aspx I don't understand how a form1.aspx javascript that is triggered
at the right moment will find the hidden field in form2.aspx (since I'm not
sure that form2.aspx ever really gets sent to the client ... In my mental
model just the XML data goes to the client from form2.aspx).

- I don't think that putting the javascript into form2.aspx will work
because I don't know if it will even be sent (see question above) and even
if it does, how it will find the OWC SS that is in form1.aspx.

Maybe none of this is hard and I just have some basic gaps in my mental
picture.

Thanks for trying to help!!

josh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top