By Keith Chisarik - 11/14/2006
I need to add a column to a SF listview that contains a link/button (like the .NET gridview) for the purpose of selecting an order from the list and clicking the link/button to navigate to another page to view/modify that order.
Also, since BO's are 'global' (for lack of a better term") in websites, does that mean if my record pointer is set on a specific record on page 1 it will still be on that record on page 2? or will I have to store the primekey as a session variable and pass it, then call an appropriate fill() ?
Thanks.
|
By StrataFrame Team - 11/14/2006
For a link in the list view, you can use either the FormattedString and put something like <a href="mylink{0}.aspx">{1}</a> or you can use the PopulatedThroughEvent and just do it there. As for the record persisting between pages, yes, the entire business object is persisted between pages, so it will stay on the same record.
|
By Keith Chisarik - 11/14/2006
nice.........
|
By Keith Chisarik - 11/14/2006
I am unable to reference the BO being used. I copied the code from the help files (winforms exampleas no webforms example exists) and this is what I get......
Intellisense properly fills in the BO types, p[roperties, and fields and the form will display BO data just fine so I am 99.99% sure I have things right.
|
By Keith Chisarik - 11/14/2006
also, your link above would work if my pages were named individually, but of course I have one page to handle that, how do I access a value from the selected listview row to store it to a session variable for another page to load. I guess I just dont know what event to capture, I know how to read column/row values.
|
By Keith Chisarik - 11/14/2006
also if you have any documentation in the works for webforms can I get it?
You can tell Steve I'll sign the waiver not to jump up and down if it isn't 100% since I assume it hasn't been through QC or we would all have it.
|
By StrataFrame Team - 11/14/2006
I don't know that I have ever seen that error. The only thing I can think that might be causing that casting exception is a version mismatch on your DLLs. By default, .NET puts a * in the revision field for the DLL version number, which gets incremented each time you build. So, if the version being debugged is different than the version in the AppDomain within VS, then the types will not match up. That is really strange, though, since it seems that the types are exactly the same.
|
By Keith Chisarik - 11/14/2006
I have tried everything I know..... Please help.
I have rebuilt, cleaned, rebooted, re everything........
|
By Keith Chisarik - 11/14/2006
I went old school and just pass a parameter in the URL to the review page..... so this is less pressing but if you figure out what went wrong with using the PopulatedThroughEvent population type with a BO, I would appreciate it.
|
By StrataFrame Team - 11/15/2006
I've been looking at everything I can think of, and I have no idea where this might be coming from. However, I will keep my eyes peeled and see if I can't figure out what was happening.
|
By Keith Chisarik - 11/16/2006
does this work for you?
I tried to get around it but I still need to be bale to capture the value of the column.
This wont go away for me and I have tried many many things.
I have the code copied directly from the help files. It also crapped out on me in a test winform.
|
By Trent L. Taylor - 11/16/2006
Keith,I have just scanned through this post and I don't think this has anything at all to do with a ListView (or the web for that matter). Either the business object in e.BusinessObject is not the movesBO or there is more than one visible assembly of the BO library (i.e. registered in the GAC or something). First, if you place a break point on the line that fail (from your screen shot), before you step through that line, place the e.BusinessObject in the watch...what is the type? Does it appear to be correct? That is the first thing I would look at.
|
By Keith Chisarik - 11/16/2006
I think your onto something.... here is my watch.
movesBO is the Business Object class
movesBO1 is the instance of movesBO declared in ApplicationBasePage for the site to use
I hope this helps........
I thought I had it and tried to DIM loBO as movesBO1, but it didn't like that either.
Thanks for looking.......
|
By Keith Chisarik - 11/16/2006
Related question.....
Is there a way to do grouping within the ListView in the webforms version of the control?
|
By Trent L. Taylor - 11/16/2006
Well, it is hard for me to tell via the image. The watch window appears to be OK. I know that the type looks different, but technically they should both be BusinessLayer classes. If you try to CType the e.BusinessObject in the watch window, does it give you any more information? Also, when it throws up in on the CType line, open up the details and look at all of the inner exceptions to see if there is something else in the formula.Is there a way to do grouping within the ListView in the webforms version of the control? Not at the moment...other than...a second list view
|
By Keith Chisarik - 11/21/2006
I see this is the exception detail on the CTYPE of the BO exception, mean anything to you?
In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user.
|
By Keith Chisarik - 11/21/2006
I was able to get this working by not casting the e.Businessobject to my BO at all and using:
e.Values(3).DisplayValue = e.BusinessObject.CurrentRow.Item(0) to populate the row.
|