Search Results

Search found 4347 results on 174 pages for 'devils child'.

Page 21/174 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Linq to SQL ordered child collection

    - by Matt Connolly
    Is there a way to define a default order column from a child collection? In my case, I have a Form entity that has a collection of FormItem entities called FormItems. FormItem has a property called DisplayOrder (int). I want to make sure that any Form entities I return from a method have that collection properly ordered. Is there a way to do this before returning the result? For example, I tried this but the list is not actually sorted: var form = context.Forms.FirstOrDefault(x => x.IsDeleted == false && x.FormName == formName); if (form != null) { form.FormItems.OrderBy(x => x.DisplayOrder); // I can't even figure out a way to cast this next line so that it will compile // form.FormItems = form.FormItems.OrderBy(x => x.DisplayOrder); } return form; Is there a way to do this without using DataLoadOptions?

    Read the article

  • How do I bring Set Focus of MDI Child Window using UIAutomation

    - by Scott Ferguson
    We have an old legacy application we need to automate. It uses MDI Windows. We're using UIAutomation and I can succesfully get the appropriate AutomationElement for each MDI Child window. What I cannot do is bring that element into focus. Here is some example code that I tried, that fails: var desktop = AutomationElement.RootElement; var dolphin = desktop.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.NameProperty, "Dolphin for Windows", PropertyConditionFlags.IgnoreCase)); dolphin.SetFocus(); var workspace = dolphin.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.NameProperty, "Workspace", PropertyConditionFlags.None)); var childWindow = workspace.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.NameProperty, "Sharp ")); childWindow.SetFocus(); The last line in this code fails with System.InvalidOperationException Experimenting, I tried finding a control on the childWindow, and calling SetFocus on it. It DID correctly set the focus on the right control, but it did not bring the MDI window to the foreground. Any ideas?

    Read the article

  • Autoscroll on parent panel, when there is overflow on child panels.Extjs

    - by Ashwin
    I'm having a single Parent Panel, which has 2 child panels. One has content dynamically created, while the other is fixed height and width. The Parent panel is using border layout, with center and east regions defined. I'm trying to get autoscroll to trigger on the parent panel when there is an overflow on on the center region panel. I've set the autoscroll option to true to the parent panel, but everytime there is an overflow on the center panel, it just gets cuts off. When I'm adding an overflow to center region panel, i get a scrollbar for that panel alone. I don't need that, but rather I want it on the entire Parent Panel. Let me know if anyone has any suggestions..

    Read the article

  • W3C dom api in Java, get child elements by name

    - by Benju
    I just realized that the method Element.getElementsByTagName("someTagName") returns a nodelist of all elements in the document that have a given tagname. What if I just want to get all child elements by tag name? For example... <person> <name>Bob</name> <car> <name>Toyota Corolla</name> </car> </person>

    Read the article

  • CSS Expand Parent Div To Child Height

    - by Steve Horn
    I have a page structure similar to this: <body> <div id="parent"> <div id="childRightCol"> <div> <div id="childLeftCol"> <div> </div> </body> I would like for the parent div to expand in height when the inner div height expands. Edit: One caveat is that if/when the width of the child content expands past the width of the browser window, my current CSS puts a horizontal scroll on the parent div. I would like the scrollbar to be at the page level. (Currently my parent div is set to overflow: auto;) Can you please help me with the CSS for this?

    Read the article

  • MYSQL: Error: Cannot add or update a child row: a foreign key constraint fails

    - by DalivDali
    Hi all, Using MySQL on Windows OS, and am getting an error upon attempting to create a foreign key between two tables: CREATE TABLE tf_traffic_stats ( domain_name char(100) NOT NULL, session_count int(11) NULL, search_count int(11) NULL, click_count int(11) NULL, revenue float NULL, rpm float NULL, cpc float NULL, traffic_date date NOT NULL DEFAULT '0000-00-00', PRIMARY KEY(domain_name,traffic_date)) and CREATE TABLE td_domain_name ( domain_id int(10) UNSIGNED AUTO_INCREMENT NOT NULL, domain_name char(100) NOT NULL, update_date date NOT NULL, PRIMARY KEY(domain_id)) The following statement gives me the error present in the subject line (cannot add or update a child row: a foreign key constraint fails): ALTER TABLE td_domain_name ADD CONSTRAINT FK_domain_name FOREIGN KEY(domain_name) REFERENCES tf_traffic_stats(domain_name) ON DELETE RESTRICT ON UPDATE RESTRICT Can someone point me in the right direction of what may be causing the error. I also have a foreign key referencing td_domain_name.domain_id, but I don't think this should be interfering... Appreciate it!

    Read the article

  • ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller error - AS

    - by Dimitree
    I have this code snippet inside a function that checks if an object exists on stage and removes it: public function closeContent(e:MouseEvent):void{ removeChild(txt); removeChild(ldr.content); removeChild(_closeButton); container_mc.visible = false; statusText.text=""; if (contains(submitButton)) { removeChild(submitButton); } if(contains(saveinfoButton)) { removeChild(saveinfoButton);} I tried to change stage with this and root but alawys get this error ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller

    Read the article

  • jQuery Set Child CSS Attribute Problem

    - by Jascha
    I have a child element of a div named "bob" that's class is '.divTitle' <div id="bob"> <div class="divTitle"> <a href="#"> <h1>Title</h1> </a> </div> </div> I am trying to set the background color of "divTitle" to red but for the life of me can't get this to work. Right now I am trying two things... $('#bob').children('.divTitle')[0].css('background-color', '#0f0'); // assuming children is returning an array... and $('#bob').children('.divTitle').css('background-color', '#0f0'); neither with any success... can anyone tell me what I am missing here? Do I have to go deeper than ".children"?

    Read the article

  • Using css child selector

    - by David Thorisson
    I am trying to apply css on the first A element inside .Outer, .Outer > a:first-child {font-weight:bold} doesn't work. Why? <div class="Outer"> <img src='image123.jpg' /> <a href="Default.aspx?ID=4083" id="ctl00_CPH_Main_Rep_List2_ctl03_HyperLink1">John Johnsson</a> <a href="../Users/ViewList.aspx?module=Occupation&amp;ID=70">Doctor</a> <a href="../Workplaces/Default.aspx?ID=31">Mayo Clinica> </div>

    Read the article

  • Problems with listening an event in child object in Actionscript

    - by Raigomaru
    I have two classes. The first one (the starting class): package { import flash.display.Sprite; import flash.events.KeyboardEvent; import tetris.*; public class TetrisGame extends Sprite { private var _gameWell:Well; public function TetrisGame() { _gameWell = new Well(); addChild(_gameWell); } } } The second: package tetris { import flash.display.Sprite; import flash.events.KeyboardEvent; public class Well extends Sprite { public function Well() { super(); addEventListener(KeyboardEvent.KEY_DOWN, onKeyboard); } private function onKeyboard(event:KeyboardEvent):void { //some code is here } } } But when I press any buttons on my keyboard, the child class Well doesn't have any reaction. What's the problem?

    Read the article

  • Flash AS3 - Dispatching Events from Parent Class to Child Class

    - by John Russell
    I think this is a pretty simply problem but I do not seem to be able to pull it off. Basically I have a parent class A, and a child class B. Class A instantiates class B with addChild. There is a shared object which is being updated from a java server (red5) that has an event listener attached to it in class A. I have a function in class A which will pass certain, specific updates from this shared object to class B. The problem occurs is that when class B is instantiated, the event listener from class A doesn't work anymore. I have not removed the event listener from A. Any thoughts?

    Read the article

  • last-child CSS issues

    - by Neurofluxation
    Hey you guys (and girls), I have implemented the following CSS: #tab-navigation ul li:last-child { background-image: url(../images/tabs-end.gif); background-repeat: no-repeat; color: #fff; display: block; border: 1px solid red; background-position: right; } However, for some reason this is not working at all in IE (surprise!) - I read (after some research) that IE requires a DOCTYPE, but I already have <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> defined. Any ideas peeps?

    Read the article

  • Adding a imageview to child elements in a expandable list query

    - by Thomas Millin
    I am looking to find out how to assign an image to a imageview in each child of an expandable list. If anyone has any information or links to find out how to do this I would be most appreciative. expListAdapter = new SimpleExpandableListAdapter( main.this, createGroupList(), R.layout.parentnode, new String[] { "day", "number" }, new int[] { R.id.TextView01, R.id.TextView02 }, createChildList(), R.layout.child_row, new String[] { "image", "childName", "date"}, new int[] { R.id.ImageView01, R.id.childname, R.id.date } ); setListAdapter( expListAdapter ); is what my adapter looks like at the moment, I have very little experience in customising adapters so I do not know where to start. Any help would be great :D

    Read the article

  • Problems with listening for an event in child object in Actionscript

    - by Raigomaru
    I have two classes. The first one (the starting class): package { import flash.display.Sprite; import flash.events.KeyboardEvent; import tetris.*; public class TetrisGame extends Sprite { private var _gameWell:Well; public function TetrisGame() { _gameWell = new Well(); addChild(_gameWell); } } } The second: package tetris { import flash.display.Sprite; import flash.events.KeyboardEvent; public class Well extends Sprite { public function Well() { super(); addEventListener(KeyboardEvent.KEY_DOWN, onKeyboard); } private function onKeyboard(event:KeyboardEvent):void { //some code is here } } } But when I press any buttons on my keyboard, the child class Well doesn't have any reaction. What's the problem?

    Read the article

  • Android: Access child views from a ListView

    - by lacker
    I need to find out the pixel position of one element in a list that's been displayed using a ListView. It seems like I should get one of the TextViews and then use getTop, but I can't figure out how to get a child view of a ListView. Thanks! Update: The children of the ViewGroup do not correspond 1-to-1 with the items in the list, for a ListView. Instead, the ViewGroup's children correspond to only those views that are visible right now. So getChildAt operates on an index that's internal to the ViewGroup and doesn't necessarily have anything to do with the position in the list that the ListView uses. :-/

    Read the article

  • Issue with child of custom Decorator class in WPF (c#)

    - by galacticgrug
    I need a custom border that renders a little differently than a normal border. I made a class that inherited from Decorator as follows class BetterBorder : Decorator { protected override Size ArrangeOverride(Size arrangeSize) { return arrangeSize; } protected override void OnRender(DrawingContext dc) { //these values are calculated elsewhere dc.DrawGeometry(backgroundBrush, borderPen, pathGeometry); } } //Properties and helper methods below this All of this works fine until I try to add a child to the control, the control can be added but is not visible and seems to be moved off BetterBorders visible client area. If I inherit from Border everything works fine, what am I missing?

    Read the article

  • difference between :first and :first-child not clear

    - by sushil bharwani
    i am having a ul li list <ul> <li>Parent <ul> <li> child1 </li> <li> child2 </li> </ul> </li> </ul> and i am trying to use a selector jQuery('ul li:first') and jQuery('ul li:first-child') both giving the same result this makes me confused about the difference between the two is there a example which clarifies the difference between two selectors

    Read the article

  • C2664 when casting child class to templated parent class

    - by DC
    I have a parent class which is templated, and a child class which implements it. template< typename T1, typename T2> class ParentClass{ . . . }; class ChildClass : public ParentClass<MyT1, MyT2> { . . . }; And I want to have a pointer which I can use polymorphically: ParentClass<T1, T2>* ptr; ptr = static_cast<ParentClass<MyT1, MyT2>* >(new ChildClass() ); No matter how I cast it, I always get a C2664 which has the same expression: error C2664: cannot convert parameter 1 from 'ParentClass< T1,T2 *' to 'ParentClass< T1,T2 *' Is it not possible to cast pointer types between inherited types if the parent is templated, even if the types specified in the templates are the same?

    Read the article

  • Capture KeyUp event on form when child control has focus

    - by Jon B
    I need to capture the KeyUp event in my form (to toggle a "full screen mode"). Here's what I'm doing: protected override void OnKeyUp(KeyEventArgs e) { base.OnKeyUp(e); if (e.KeyCode == Keys.F12) this.ToggleFullScreen(); } private void ToggleFullScreen() { // Snazzy code goes here } This works fine, unless a control on the form has focus. In that case, I don't get the event at all (also tried OnKeyDown - no luck there either). I could handle the KeyUp event from the child control, but the controls on the form are generated dynamically, and there may be many of them - each having many children of their own. Is there any way to do this without generating event handlers for every control on the screen (which I certainly could do with a recursive function)?

    Read the article

  • Supervisor callback for child normal exit

    - by Aler
    I am creating a test app where is one supervisor with simple_one_for_one strategy and many worker children added dynamically to it. How to implement callback (or receive a message) in supervisor that will be called when child exit normally? Main goal is to notify some other process that all supervised worker processes are done and it's time to show final report. How to design such kind of behavior? Should I create my own behavior that combine supervisor and gen_server, or there is a way to do this with standard otp behaviors?

    Read the article

  • Catching an error for a child resource in Ruby on Rails

    - by randombits
    What is the best way to add errors to render if a child resource is really what's having issues and not the parent resource? In english what I mean is the following.. imagine the following code: @foo = Foo.new foochild = Foochild.new // break foochild somehow @foo << foochild @foo.save now when I do: format.xml { render :xml => @foo.errors } I don't get anything about how foochild broke, meaning the error message is useless to the user. How does one go about fixing this?

    Read the article

  • difference be :first and :first-child not clear

    - by sushil bharwani
    i am having a ul li list < ul > < li > Parent < ul > < li > child1 < /li > < li > child2 < /li > < /ul > < /li > < /ul > and i am trying to use a selector jQuery('ul li:first') and jQuery('ul li:first-child') both giving the same result this makes me confused about the difference between the two is there a example which clarifies the difference between two selectors

    Read the article

  • Selecting child element

    - by ScG
    I have the following div <div id="acc"> <a href="#">Link 1</a> <div> Some Content </div> <a href="#">Link 2</a> <div> Some Content </div> </div> All the div's are collapsed to start with. How can I select the first div child of 'acc' and say Slide Down on it I have cached the selector like this: var $acc = $(acc);

    Read the article

  • C signal parent process from child

    - by Gary
    I'm trying to solve a problem I've got where a child process runs execvp() and needs to let the parent know if it returns. So, after the execvp() returns (because there's been an error), how can I tell the parent that this particular event has happened so it can handle it. There's one method of writing a string of text through the pipe I'm using and then reading that from the parent.. but it seems a bit sloppy. Is there a better way? Thanks!

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >