[flexcoders] Re: .Net webservice and datagrid

2007-01-24 Thread btkracker
Ok, next question.  I've searched through the news groups and Adobe 
labs with no luck...

I'm able to display the datagrid with a namespace with no problem.  
When I try to update, though, I noticed that my changes never stuck.  
As soon as I clicked off the cell, my changes were removed.

I figured it was, again, a problem with the namespace.  I added a 
function to handle the 'itemEditEnd' event and manually update my 
source XML.

private function dgChange(event: DataGridEvent):void
{
var q:QName = new QName(myNS, event.dataField);
event.currentTarget.selectedItem[q] = 
event.target.itemEditorInstance.text;
}

While this worked, it surely can't be the mose elegant solution.  
Furthermore, I noticed the 'itemEditorItemEditEndHandler' fired and 
duplicted my entry only w/o the namespace.  This isn't an issue on 
the front end but causes problems with the webservice when I attempt 
to pass the data back.

I've thought about overloading the 'itemEditorItemEditEndHandler'... 
but that can't be the best solution.  Is it?  Is there another way to 
handle datagrid updates with namespaces that allows Flex to do it 
natively?

Thanks again for any help!

Bruce




 Beautiful!!  This worked wonderfully and will save hours of 
recoding 
 time.  I was ok up to 'use namespace' but had never heard of the 
 qName.
 
 Thanks!
 
 Bruce
 
 --- In flexcoders@yahoogroups.com, ben.clinkinbeard 
 ben.clinkinbeard@ wrote:
 
  Yep, you have to specifically address the namespace. The easiest 
way
  is the use namespace directive. More detailed explanation here:
  http://www.returnundefined.com/2006/07/datagrid-labelfunction-and-
 namespaces/
  
  HTH,
  Ben
  
  
  --- In flexcoders@yahoogroups.com, btkracker bthornbury@ 
wrote:
  
   I'm trying to receive XML data from a .Net webservice and 
 populate a 
   datagrid.  I'm able to receive the XML data ok but I can't see 
   anything in the datagrid.
   
   I attempted to manually duplicate the data returned and found 
 that it 
   has something to do with the moniker returned.  Here is the XML 
   returned from the webservice:
   
   searchCriteriaResult xmlns=http://mysite.com/;
 XrefData
   bukey1/bukey
   prKey14/prKey
   moKey-1/moKey
   spKey73/spKey
   tdKey47/tdKey
 /XrefData
 XrefData
   bukey1/bukey
   prKey14/prKey
   moKey15/moKey
   spKey73/spKey
   tdKey47/tdKey
 /XrefData
   /searchCriteriaResult
   
   If I manually create an XML object and bind it to my datagrid, 
I 
 get 
   the same result...nothing.  However, if I remove the 'xmlns' 
   attribute _or_ add a moniker (such 
   as 'xmlns:Test=http://mysite.com;') it works fine.
   
   Anyone have any ideas?  I'm completely stumped!!
  
 





[flexcoders] Re: .Net webservice and datagrid

2007-01-17 Thread btkracker
Beautiful!!  This worked wonderfully and will save hours of recoding 
time.  I was ok up to 'use namespace' but had never heard of the 
qName.

Thanks!

Bruce

--- In flexcoders@yahoogroups.com, ben.clinkinbeard 
[EMAIL PROTECTED] wrote:

 Yep, you have to specifically address the namespace. The easiest way
 is the use namespace directive. More detailed explanation here:
 http://www.returnundefined.com/2006/07/datagrid-labelfunction-and-
namespaces/
 
 HTH,
 Ben
 
 
 --- In flexcoders@yahoogroups.com, btkracker bthornbury@ wrote:
 
  I'm trying to receive XML data from a .Net webservice and 
populate a 
  datagrid.  I'm able to receive the XML data ok but I can't see 
  anything in the datagrid.
  
  I attempted to manually duplicate the data returned and found 
that it 
  has something to do with the moniker returned.  Here is the XML 
  returned from the webservice:
  
  searchCriteriaResult xmlns=http://mysite.com/;
XrefData
  bukey1/bukey
  prKey14/prKey
  moKey-1/moKey
  spKey73/spKey
  tdKey47/tdKey
/XrefData
XrefData
  bukey1/bukey
  prKey14/prKey
  moKey15/moKey
  spKey73/spKey
  tdKey47/tdKey
/XrefData
  /searchCriteriaResult
  
  If I manually create an XML object and bind it to my datagrid, I 
get 
  the same result...nothing.  However, if I remove the 'xmlns' 
  attribute _or_ add a moniker (such 
  as 'xmlns:Test=http://mysite.com;') it works fine.
  
  Anyone have any ideas?  I'm completely stumped!!
 





[flexcoders] Re: .Net webservice and datagrid

2007-01-16 Thread ben.clinkinbeard
Yep, you have to specifically address the namespace. The easiest way
is the use namespace directive. More detailed explanation here:
http://www.returnundefined.com/2006/07/datagrid-labelfunction-and-namespaces/

HTH,
Ben


--- In flexcoders@yahoogroups.com, btkracker [EMAIL PROTECTED] wrote:

 I'm trying to receive XML data from a .Net webservice and populate a 
 datagrid.  I'm able to receive the XML data ok but I can't see 
 anything in the datagrid.
 
 I attempted to manually duplicate the data returned and found that it 
 has something to do with the moniker returned.  Here is the XML 
 returned from the webservice:
 
 searchCriteriaResult xmlns=http://mysite.com/;
   XrefData
 bukey1/bukey
 prKey14/prKey
 moKey-1/moKey
 spKey73/spKey
 tdKey47/tdKey
   /XrefData
   XrefData
 bukey1/bukey
 prKey14/prKey
 moKey15/moKey
 spKey73/spKey
 tdKey47/tdKey
   /XrefData
 /searchCriteriaResult
 
 If I manually create an XML object and bind it to my datagrid, I get 
 the same result...nothing.  However, if I remove the 'xmlns' 
 attribute _or_ add a moniker (such 
 as 'xmlns:Test=http://mysite.com;') it works fine.
 
 Anyone have any ideas?  I'm completely stumped!!





[flexcoders] Re: .Net webservice and datagrid

2007-01-16 Thread nathanbrown19
Hi,

Is:

 http://mysite.com/

In the namespace field added by the RTF editor for this mailing list,
or is it really in your code?

I'm no namespace master, but is it correct/neccessary? Also any  or 
 symbols in XML attributes (including namespaces) should be encoded,
e.g. gt; or lt;.

If you use XML tags inside your attributes it will break your xml.

So it may not even be the fact that your using a namespace, just the
way your declaring it...

Try:

searchCriteriaResult xmlns=http://mysite.com/;

instead.

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Notice the xml elements do not have namespace prefixes. This means that
 they are using the default namespace which is declared in the root tag,
 without a prefix. So adding this directive:
 default xml namespace = http://mysite.com/ http://mysite.com/ ;
 should allow you to reference the nodes.
 
  
 
 I hope.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of btkracker
 Sent: Tuesday, January 16, 2007 1:58 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] .Net webservice and datagrid
 
  
 
 I'm trying to receive XML data from a .Net webservice and populate a 
 datagrid. I'm able to receive the XML data ok but I can't see 
 anything in the datagrid.
 
 I attempted to manually duplicate the data returned and found that it 
 has something to do with the moniker returned. Here is the XML 
 returned from the webservice:
 
 searchCriteriaResult xmlns=http://mysite.com/ http://mysite.com/ 
 XrefData
 bukey1/bukey
 prKey14/prKey
 moKey-1/moKey
 spKey73/spKey
 tdKey47/tdKey
 /XrefData
 XrefData
 bukey1/bukey
 prKey14/prKey
 moKey15/moKey
 spKey73/spKey
 tdKey47/tdKey
 /XrefData
 /searchCriteriaResult
 
 If I manually create an XML object and bind it to my datagrid, I get 
 the same result...nothing. However, if I remove the 'xmlns' 
 attribute _or_ add a moniker (such 
 as 'xmlns:Test=http://mysite.com http://mysite.com ') it works fine.
 
 Anyone have any ideas? I'm completely stumped!!