Search Results

Search found 4 results on 1 pages for 'neild'.

Page 1/1 | 1 

  • Jquery with multi level json data array

    - by coder
    var data = [{"Address":{"Address":"4 Selby Road\nHowden","AddressId":"1414449","AddressLine1":"4 Selby Road","AddressLine2":"Howden","ContactId":"14248844","County":"North Humberside","Country":"UK","Postcode":"DN14 7JW","Town":"GOOLE","FullAddress":"4 Selby Road\nHowden\r\nGOOLE\r\nNorth Humberside\r\nDN14 7JW\r\nUnited Kingdom"},"ContactId":14248844,"Title":"Mrs","FirstName":"","Surname":"Neild","FullName":" Neild","PostCode":"DN14 7JW"},{"Address":{"Address":"466 Manchester Road\nBlackrod","AddressId":"1669615","AddressLine1":"466 Manchester Road","AddressLine2":"Blackrod","ContactId":"16721687","County":"","Country":"UK","Postcode":"BL6 5SU","Town":"BOLTON","FullAddress":"466 Manchester Road\nBlackrod\r\nBOLTON\r\nBL6 5SU\r\nUnited Kingdom"},"ContactId":16721687,"Title":"Miss","FirstName":"Andrea","Surname":"Neild","FullName":"Andrea Neild","PostCode":"BL6 5SU"},{"Address":{"Address":"5 Prospect Vale\nHeald Green","AddressId":"2127294","AddressLine1":"5 Prospect Vale","AddressLine2":"Heald Green","ContactId":"21178752","County":"Cheshire","Country":"UK","Postcode":"SK8 3RJ","Town":"CHEADLE","FullAddress":"5 Prospect Vale\nHeald Green\r\nCHEADLE\r\nCheshire\r\nSK8 3RJ\r\nUnited Kingdom"},"ContactId":21178752,"Title":"Mrs","FirstName":"","Surname":"Neild","FullName":" Neild","PostCode":"SK8 3RJ"}]; I'm tring to retrieve above json fommated data in jquery as below: var source = { localdata: data, sort: customsortfunc, datafields: [ { name: 'Surname', type: 'string' }, { name: 'FirstName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'Address.Address', type: 'string' } ], datatype: "array" }; var dataAdapter = new $.jqx.dataAdapter(source); $("#jqxgrid").jqxGrid( { width: 670, source: dataAdapter, theme: theme, sortable: true, pageable: true, autoheight: true, ready: function () { //$("#jqxgrid").jqxGrid('sortby', 'firstname', 'asc'); $("#jqxgrid").jqxGrid('sortby', 'FirstName', 'asc'); }, columns: [ { text: 'Title', datafield: 'Title', width: 100 }, { text: 'First Name', datafield: 'FirstName', width: 100 }, { text: 'Last Name', datafield: 'Surname', width: 100 }, { text: 'Address', datafield: 'Address.Address', width: 100 }, ] }); The only issue is there is no display for "Address.Adress". Can anyone advise me ?

    Read the article

  • Selectively disabling WebControl elements

    - by NeilD
    I have an ASP.Net MasterPage with a PlaceHolder element. The contents of the PlaceHolder can be viewed in two modes: read-write, and read-only. To implement read only, I wanted to disable all inputs inside the PlaceHolder. I decided to do this by recursively looping through the controls collection of the PlaceHolder, finding all the ones which inherit from WebControl, and setting control.Enabled = false;. Here's what I originally wrote: private void DisableControls(Control c) { if (c.GetType().IsSubclassOf(typeof(WebControl))) { WebControl wc = c as WebControl; wc.Enabled = false; } //Also disable all child controls. foreach (Control child in c.Controls) { DisableControls(child); } } This worked fine, and all controls are disabled... But then the requirement changed ;) NOW, we want to disable all controls except ones which have a certain CssClass. So, my first attempt at the new version: private void DisableControls(Control c) { if (c.GetType().IsSubclassOf(typeof(WebControl))) { WebControl wc = c as WebControl; if (!wc.CssClass.ToLower().Contains("someclass")) wc.Enabled = false; } //Also disable all child controls. foreach (Control child in c.Controls) { DisableControls(child); } } Now I've hit a problem. If I have (for example) an <ASP:Panel> which contains an <ASP:DropDownList>, and I want to keep the DropDownList enabled, then this isn't working. I call DisableControls on the Panel, and it gets disabled. It then loops through the children, and calls DisableControls on the DropDownList, and leaves it enabled (as intended). However, because the Panel is disabled, when the page renders, everything inside the <div> tag is disabled! Can you think of a way round this? I've thought about changing c.GetType().IsSubclassOf(typeof(WebControl)) to c.GetType().IsSubclassOf(typeof(SomeParentClassThatAllInputElementsInheritFrom)), but I can't find anything appropriate!

    Read the article

  • Update Web Reference in Visual Studio

    - by NeilD
    Hi, I have inherited a web site project that makes use of a number of WCF Web Services hosted on a BizTalk server. We have two environments that I need to deploy this project to, with different URLs for the different BizTalk servers. i.e. In the Staging environment, I need to point the services at xx.xx.xx.101 In the Live environment, I need to point them at xx.xx.xx.102, or whatever. Currently, we've got all of the URLs stored in keys in the web.config file, so that we can change them dynamically... Unfortunately this isn't working! If I change the URL in the web.config to something other than what the project was compiled with, I get an error when calling the service: Server did not recognize the value of HTTP Header SOAPAction: xx.xx.xx.101\ServiceName\MethodName I'm told that the only way they've known to deploy this is to update the web.config URLs, change all of the web references in Visual Studio to match, click on "update web reference" for each reference in Visual Studio, and then compile. It's driving me mad! I've written a pre-build NAnt script to go through and replace all instances of the URL found anywhere in the project directory, and even that isn't making any difference. There must be something else being pulled down from the service when I click the "update reference", but I'm new to working with web services, and so I'm not sure what. Does anyone have any ideas? Is there a way to do this programatically? Thanks.

    Read the article

  • Where does ASP.Net get its rendered IDs from?

    - by NeilD
    Hi, I've inherited a project with some nasty JavaScript that depends on hard coded object ids. i.e. There are lots of places where it does things like this var magazine = document.getElementById('repModuleDisplay__ctl3_chkCats_0'); When the page renders in my UAT environment, the HTML looks like this, and everything works OK. <input id="repModuleDisplay__ctl3_chkCats_0" type="checkbox" name="repModuleDisplay:_ctl3:chkCats:0" ... etc However, when I put it on my Production environment, the HTML is suddenly rending like this: <input id="repModuleDisplay_ctl03_chkCats_0" type="checkbox" name="repModuleDisplay$ctl03$chkCats$0" ... etc The difference in ids means that the JavaScript can't find the Element, and fails. In an ideal world, I'd scrap the buggy JavaScript and do it again properly, but for a quick fix, I'd like to know what is causing the difference in rendering between the two environments. Does anyone have any ideas? Thanks, Neil

    Read the article

1