Search Results

Search found 4208 results on 169 pages for 'grid'.

Page 11/169 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • WPF: TextBox expanding with surrounding Grid but not with text

    - by haagel
    I have a problem with a TextBox in an application... A window has a Grid with two columns. The left column contains a control with a constant width but with a height that adapts. The right column contains a TextBox that takes up all remaining space in the Grid (and thereby in the Window). The Grid is given a minimal width and height and is wrapped within a ScrollViewer. If the user resizes the window to be smaller than the minimal widht/height of the Grid, scrollbars are displayed. This is exactly how I want it to be. However, a problem occurs when the user starts typing text. If the text is to long to fit in one line in the TextBox, I want the text to wrap. Therefore I set TextWrapping="Wrap" on the TextBox. But since the TextBox has an automatic width and is wrapped in a ScrollViewer (its actually the whole Grid that is wrapped), the TextBox just keeps expanding to the right. I do want the TextBox to expand if the window is expanded, but I don't want the TextBox to expand by the text. Rather the text should wrap inside the available TextBox. If the text don't fit within the TextBox height, a scrollbar should be displayed within the TextBox. Is there a way to accomplish this? Below is some code that shows my problem. <Window x:Class="AdaptingTextBoxes.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="300" Width="400" Background="DarkCyan"> <Grid Margin="10" Name="LayoutRoot"> <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"> <Grid MinWidth="300" MinHeight="200"> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Button Grid.Column="0" Margin="0,0,10,0" Content="Button" Width="100" /> <TextBox Grid.Column="1" AcceptsReturn="True" TextWrapping="Wrap" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" /> </Grid> </ScrollViewer> </Grid> </Window>

    Read the article

  • Bring the Grid to Your Desktop with the TRON Legacy Theme for Windows 7

    - by Asian Angel
    The battle for control of the Grid and escape back to our reality in TRON Legacy was nothing less than epic. Now you can relive the adventure right on your desktop with the TRON Legacy theme for Windows 7. The theme comes with 39 Hi-Res wallpapers, custom TRON icons, a TRON styled set of cursors, and music from the movie as system sounds to make your desktop as one with the Grid. Tron Legacy Theme For Windows (Movie Themes) [VikiTech] More TRON Goodness for Your Desktop Desktop Fun: TRON and TRON Legacy Customization Set Four Awesome TRON Legacy Themes for Chrome and Iron Latest Features How-To Geek ETC How To Make Disposable Sleeves for Your In-Ear Monitors Macs Don’t Make You Creative! So Why Do Artists Really Love Apple? MacX DVD Ripper Pro is Free for How-To Geek Readers (Time Limited!) HTG Explains: What’s a Solid State Drive and What Do I Need to Know? How to Get Amazing Color from Photos in Photoshop, GIMP, and Paint.NET Learn To Adjust Contrast Like a Pro in Photoshop, GIMP, and Paint.NET Bring the Grid to Your Desktop with the TRON Legacy Theme for Windows 7 The Dark Knight and Team Fortress 2 Mashup Movie Trailer [Video] Dirt Cheap DSLR Viewfinder Improves Outdoor DSLR LCD Visibility Lakeside Sunset in the Mountains [Wallpaper] Taskbar Meters Turn Your Taskbar into a System Resource Monitor Create Shortcuts for Your Favorite or Most Used Folders in Ubuntu

    Read the article

  • Grid collision - finding the location of an entity in each box

    - by Gregg1989
    I am trying to implement grid-based collision in a 2d game with moving circles. The canvas is 400x400 pixels. Below you can see the code for my Grid class. What I want it to do is check inside which box the entities are located and then run a collision check if there are 2 or more entities in the same box. Right now I do not know how to find the position of an entity in a specific box. I know there are many tutorials online, but I haven't been able to find an answer to my question, because they are either written in C/C++ or use the 2d array approach. Code snippets and other help is greatly appreciated. Thanks. public class Grid { ArrayList<ArrayList<Entity>> boxes = new ArrayList<>(); double boxSize = 40; double boxesAmount = 10; ... ... public void checkBoxLocation(ArrayList<Entity> entities) { for (int i = 0; i < entities.size(); i++) { // Get top left coordinates of each entity double entityLeft = entities.get(i).getLayoutX() - entities.get(i).getRadius(); double entityTop = entities.get(i).getLayoutY() + entities.get(i).getRadius(); // Divide coordinate by box size to find the approximate location of the entity for (int j = 0; j < boxesAmount; j++) { //Select each box if ((entityLeft / boxSize <= j + 0.7) && (entityLeft / boxSize >= j)) { if ((entityTop / boxSize <= j + 0.7) && (entityTop / boxSize >= j)) { holdingBoxes.get(j).add(entities.get(i)); System.out.println("Entity " + entities.get(i) + " added to box " + j); } } } } } }

    Read the article

  • GridView in UpdatePanel adds extra rows when sorting another grid

    - by chopps
    Hey Everyone, I'm a seeing some weird behavior that i have never seen before. I have two grid in separate UpdatePanels. I can page and sort each without any problems. Each grid is set for 10 per page. If the first grid (13 records) is paged to the second page and then i go down to the second grid (14 records) and page to the next page and the first grid adds a bunch of empty rows to the grid so it is full to show 10. There is no data in the rows...just empty rows. Each grid does this on paging and sorting. Ive stepped through the code and the the loading of the other grids never happens so it tells my AJAX is doing something to add the 'phantom' rows to the grid. Any ideas why or ways to debug this?

    Read the article

  • ASP.NET MVC Paging/Sorting/Filtering using the MVCContrib Grid and Pager

    - by rajbk
    This post walks you through creating a UI for paging, sorting and filtering a list of data items. It makes use of the excellent MVCContrib Grid and Pager Html UI helpers. A sample project is attached at the bottom. Our UI will eventually look like this. The application will make use of the Northwind database. The top portion of the page has a filter area region. The filter region is enclosed in a form tag. The select lists are wired up with jQuery to auto post back the form. The page has a pager region at the top and bottom of the product list. The product list has a link to display more details about a given product. The column headings are clickable for sorting and an icon shows the sort direction. Strongly Typed View Models The views are written to expect strongly typed objects. We suffix these strongly typed objects with ViewModel since they are designed specifically for passing data down to the view.  The following listing shows the ProductViewModel. This class will be used to hold information about a Product. We use attributes to specify if the property should be hidden and what its heading in the table should be. This metadata will be used by the MvcContrib Grid to render the table. Some of the properties are hidden from the UI ([ScaffoldColumn(false)) but are needed because we will be using those for filtering when writing our LINQ query. public ActionResult Index( string productName, int? supplierID, int? categoryID, GridSortOptions gridSortOptions, int? page) {   var productList = productRepository.GetProductsProjected();   // Set default sort column if (string.IsNullOrWhiteSpace(gridSortOptions.Column)) { gridSortOptions.Column = "ProductID"; }   // Filter on SupplierID if (supplierID.HasValue) { productList = productList.Where(a => a.SupplierID == supplierID); }   // Filter on CategoryID if (categoryID.HasValue) { productList = productList.Where(a => a.CategoryID == categoryID); }   // Filter on ProductName if (!string.IsNullOrWhiteSpace(productName)) { productList = productList.Where(a => a.ProductName.Contains(productName)); }   // Create all filter data and set current values if any // These values will be used to set the state of the select list and textbox // by sending it back to the view. var productFilterViewModel = new ProductFilterViewModel(); productFilterViewModel.SelectedCategoryID = categoryID ?? -1; productFilterViewModel.SelectedSupplierID = supplierID ?? -1; productFilterViewModel.Fill();   // Order and page the product list var productPagedList = productList .OrderBy(gridSortOptions.Column, gridSortOptions.Direction) .AsPagination(page ?? 1, 10);     var productListContainer = new ProductListContainerViewModel { ProductPagedList = productPagedList, ProductFilterViewModel = productFilterViewModel, GridSortOptions = gridSortOptions };   return View(productListContainer); } The following diagram shows the rest of the key ViewModels in our design. We have a container class called ProductListContainerViewModel which has nested classes. The ProductPagedList is of type IPagination<ProductViewModel>. The MvcContrib expects the IPagination<T> interface to determine the page number and page size of the collection we are working with. You convert any IEnumerable<T> into an IPagination<T> by calling the AsPagination extension method in the MvcContrib library. It also creates a paged set of type ProductViewModel. The ProductFilterViewModel class will hold information about the different select lists and the ProductName being searched on. It will also hold state of any previously selected item in the lists and the previous search criteria (you will recall that this type of state information was stored in Viewstate when working with WebForms). With MVC there is no state storage and so all state has to be fetched and passed back to the view. The GridSortOptions is a type defined in the MvcContrib library and is used by the Grid to determine the current column being sorted on and the current sort direction. The following shows the view and partial views used to render our UI. The Index view expects a type ProductListContainerViewModel which we described earlier. <%Html.RenderPartial("SearchFilters", Model.ProductFilterViewModel); %> <% Html.RenderPartial("Pager", Model.ProductPagedList); %> <% Html.RenderPartial("SearchResults", Model); %> <% Html.RenderPartial("Pager", Model.ProductPagedList); %> The View contains a partial view “SearchFilters” and passes it the ProductViewFilterContainer. The SearchFilter uses this Model to render all the search lists and textbox. The partial view “Pager” uses the ProductPageList which implements the interface IPagination. The “Pager” view contains the MvcContrib Pager helper used to render the paging information. This view is repeated twice since we want the pager UI to be available at the top and bottom of the product list. The Pager partial view is located in the Shared directory so that it can be reused across Views. The partial view “SearchResults” uses the ProductListContainer model. This partial view contains the MvcContrib Grid which needs both the ProdctPagedList and GridSortOptions to render itself. The Controller Action An example of a request like this: /Products?productName=test&supplierId=29&categoryId=4. The application receives this GET request and maps it to the Index method of the ProductController. Within the action we create an IQueryable<ProductViewModel> by calling the GetProductsProjected() method. /// <summary> /// This method takes in a filter list, paging/sort options and applies /// them to an IQueryable of type ProductViewModel /// </summary> /// <returns> /// The return object is a container that holds the sorted/paged list, /// state for the fiters and state about the current sorted column /// </returns> public ActionResult Index( string productName, int? supplierID, int? categoryID, GridSortOptions gridSortOptions, int? page) {   var productList = productRepository.GetProductsProjected();   // Set default sort column if (string.IsNullOrWhiteSpace(gridSortOptions.Column)) { gridSortOptions.Column = "ProductID"; }   // Filter on SupplierID if (supplierID.HasValue) { productList.Where(a => a.SupplierID == supplierID); }   // Filter on CategoryID if (categoryID.HasValue) { productList = productList.Where(a => a.CategoryID == categoryID); }   // Filter on ProductName if (!string.IsNullOrWhiteSpace(productName)) { productList = productList.Where(a => a.ProductName.Contains(productName)); }   // Create all filter data and set current values if any // These values will be used to set the state of the select list and textbox // by sending it back to the view. var productFilterViewModel = new ProductFilterViewModel(); productFilterViewModel.SelectedCategoryID = categoryID ?? -1; productFilterViewModel.SelectedSupplierID = supplierID ?? -1; productFilterViewModel.Fill();   // Order and page the product list var productPagedList = productList .OrderBy(gridSortOptions.Column, gridSortOptions.Direction) .AsPagination(page ?? 1, 10);     var productListContainer = new ProductListContainerViewModel { ProductPagedList = productPagedList, ProductFilterViewModel = productFilterViewModel, GridSortOptions = gridSortOptions };   return View(productListContainer); } The supplier, category and productname filters are applied to this IQueryable if any are present in the request. The ProductPagedList class is created by applying a sort order and calling the AsPagination method. Finally the ProductListContainerViewModel class is created and returned to the view. You have seen how to use strongly typed views with the MvcContrib Grid and Pager to render a clean lightweight UI with strongly typed views. You also saw how to use partial views to get data from the strongly typed model passed to it from the parent view. The code also shows you how to use jQuery to auto post back. The sample is attached below. Don’t forget to change your connection string to point to the server containing the Northwind database. NorthwindSales_MvcContrib.zip My name is Kobayashi. I work for Keyser Soze.

    Read the article

  • Something to add to your library...

    - by werner.de.gruyter
    There is a new book in town: The Grid Control Handbook. Featuring an in-depth discussion of what Grid Control is and what Grid Control can do for your IT environment. It starts right at the beginning, and guides you through the all steps of a typical deployment: From the planning phase, to installing, to the strengthening of the environment and finally (most importantly) the maintenance and daily-use of the product. And there are quite a few tips, tricks, workshops and best practices along the way to help you with some very practical day-to-day challenges. For all those using Grid Control, something definitely worth checking out!

    Read the article

  • How to attach a sprite to a TMXTiledMap at a particular coordinate, in AndEngine?

    - by shailenTJ
    I am trying to add a sprite at a "grid" location on the tiled map. The TMX tiled Map is like a grid, and you can access the size of the grid by calling mTMXtiledMap.getTileRows() and mTMXtiledMap.getTileColumns(). I want to add an object at grid location, say (2, 5). My tileMap is of size (10,10). How can I do that? There is no function like mTMXTiledMap.addChild(int x, int y, Entity mEntity). I would appreciate any suggestions!

    Read the article

  • Smart Grid Gateway and New Meter Data Management released

    - by Anthony Shorten
    Two products have just been released and are available from edlivery.oracle.com. Smart Grid Gateway 2.0.0 - A new product to integrate to Smart Grid networks Meter Data Management 2.0.1 - A new version of the Meter Data Management product. These products are the first products to use the brand new version of the Oracle Utilities Applicaton Framework (V4.1). The new framework builds up on FW2.2 and FW4.0.2 to add exciting new features (this is just a subset): Support for Database Vault Enhancements to Business Object Maintenance Batch Statistics Portal for benchmarking Custom template user exit support File permissions now consistent with other Oracle products Use of Universal Connection Pool for all database pool access Ability to manage the batch data cache Over the next few weeks I will be publishing articles and updates to existing whitepapers to highlight all the new features.

    Read the article

  • Move Data into the grid for scalable, predictable response times

    - by JuergenKress
    CloudTran is pleased to introduce the availability of the CloudTran Transaction and Persistence Manager for creating scalable, reliable data services on the Oracle Coherence In-Memory Data Grid (IMDG). Use of IMDG architectures has been key to handling today’s web-scale loads because it eliminates database latency by storing important and frequently access data in memory instead of on disk. The CloudTran product lets developers easily use an IMDG for full ACID-compliant transactions without having to be concerned about the location or spread of data. The system has its own implementation of fast, scalable distributed transactions that does NOT depend on XA protocols but still guarantees all ACID properties. Plus, CloudTran asynchronously replicates data going into the IMDG to back-end datastores and back-up data centers, again ensuring ACID properties. CloudTran can be accessed through Java Persistence API (JPA via TopLink Grid) and now, through a new Low-Level API, or LLAPI. This is ideal for use in SOA applications that need data reliability, high availability, performance, and scalability. It is still in its limited beta release, the LLAPI gives developers the ability to use standard put/remove logic available in Coherence and then wrap logic with simple Spring annotations or XML+AspectJ to start transactions. An important feature of LLAPI is the ability to join transactions. This is a common outcome for SOA applications that need to reduce network traffic by aggregating data into single cache entries and then doing SOA service processing in the node holding the data. This results in the need to orchestrate transaction processing across multiple service calls. CloudTran has the capability to handle these “multi-client” transactions at speed with no loss in ACID properties. Developing software around an IMDG like Oracle Coherence is an important choice for today’s web-scale applications and services. But this introduces new architectural considerations to maintain scalability in light of increased network loads and data movement. Without using CloudTran, developers are faced with an incredibly difficult task to ensure data reliability, availability, performance, and scalability when working with an IMDG. Working with highly distributed data that is entirely volatile while stored in memory presents numerous edge cases where failures can result in data loss. The CloudTran product takes care of all of this, leaving developers with the confidence and peace of mind that all data is processed correctly. For those interested in evaluating the CloudTran product and IMDGs, take a look at this link for more information: http://www.CloudTran.com/downloadAPI.ph , or send your questions to [email protected]. SOA & BPM Partner Community For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit  www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center. Blog Twitter LinkedIn Mix Forum Technorati Tags: CloudTran,data grid,M,SOA Community,Oracle SOA,Oracle BPM,BPM,Community,OPN,Jürgen Kress

    Read the article

  • 3D terrain map with Hexagon Grids (XNA)

    - by Rob
    I'm working on a hobby project (I'm a web/backend developer by day) and I want to create a 3D Tile (terrain) engine. I'm using XNA, but I can use MonoGame, OpenGL, or straight DirectX, so the answer does not have to be XNA specific. I'm more looking for some high level advice on how to approach this problem. I know about creating height maps and such, there are thousands of references out there on the net for that, this is a bit more specific. I'm more concerned with is the approach to get a 3D hexagon tile grid out of my terrain (since the terrain, and all 3d objects, are basically triangles). The first approach I thought about is to basically draw the triangles on the screen in the following order (blue numbers) to give me the triangles for terrain (black triangles) and then make hexes out of the triangles (red hex). http://screencast.com/t/ebrH2g5V This approach seems complicated to me since i'm basically having to draw 4 different types of triangles. The next approach I thought of was to use the existing triangles like I did for a square grid and get my hexes from 6 triangles as follows http://screencast.com/t/w9b7qKzVJtb8 This seems like the easier approach to me since there are only 2 types of triangles (i would have to play with the heights and widths to get a "perfect" hexagon, but the idea is the same. So I'm looking for: 1) Any suggestions on which approach I should take, and why. 2) How would I translate mouse position to a hexagon grid position (especially when moving the camera around), for example in the second image if the mouse pointer were the green circle, how would I determine to highlight that hexagon and then translating that into grid coordinates (assuming it is 0,0)? 3) Any references, articles, books, etc - to get me going in the right direction. Note: I've done hex grid's and mouse-grid coordinate conversion before in 2d. looking for some pointers on how to do the same in 3d. The result I would like to achieve is something similar to the following: http :// www. youtube .com / watch?v=Ri92YkyC3fw (sorry about the youtube link, but it will only let me post 2 links in this post... same rep problem i mention below...) Thanks for any help! P.S. Sorry for not posting the images inline, I apparently don't have enough rep on this stack exchange site.

    Read the article

  • Randomly generate directed graph on a grid

    - by Talon876
    I am trying to randomly generate a directed graph for the purpose of making a puzzle game similar to the ice sliding puzzles from Pokemon. This is essentially what I want to be able to randomly generate: http://bulbanews.bulbagarden.net/wiki/Crunching_the_numbers:_Graph_theory. I need to be able to limit the size of the graph in an x and y dimension. In the example given in the link, it would be restricted to an 8x4 grid. The problem I am running into is not randomly generating the graph, but randomly generating a graph, which I can properly map out in a 2d space, since I need something (like a rock) on the opposite side of a node, to make it visually make sense when you stop sliding. The problem with this is that sometimes the rock ends up in the path between two other nodes or possibly on another node itself, which causes the entire graph to become broken. After discussing the problem with a few people I know, we came to a couple of conclusions that may lead to a solution. Including the obstacles in the grid as part of the graph when constructing it. Start out with a fully filled grid and just draw a random path and delete out blocks that will make that path work. The problem then becomes figuring out which ones to delete to avoid introducing an additional, shorter path. We were also thinking a dynamic programming algorithm may be beneficial, though none of us are too skilled with creating dynamic programming algorithms from nothing. Any ideas or references about what this problem is officially called (if it's an official graph problem) would be most helpful. Here are some examples of what I have accomplished so far by just randomly placing blocks and generating the navigation graph from the chosen start/finish. The idea (as described in the previous link) is you start at the green S and want to get to the green F. You do this by moving up/down/left/right and you continue moving in the direction chosen until you hit a wall. In these pictures, grey is a wall, white is the floor, and the purple line is the minimum length from start to finish, and the black lines and grey dots represented possible paths. Here are some bad examples of randomly generated graphs: http://i.stack.imgur.com/9uaM6.png Here are some good examples of randomly generated (or hand tweaked) graphs: i.stack.imgur.com/uUGeL.png (can't post another link, sorry) I've also seemed to notice the more challenging ones when actually playing this as a puzzle are ones which have lots of high degree nodes along the minimum path.

    Read the article

  • Compizconfig Grid doesn't work under Ubuntu as virtual machine

    - by SoftTimur
    I have installed Ubuntu as virtual machine within Mac. I have installed VM tools. The approach in this link of Compizconfig Grid, which worked in my previous laptop where Ubuntu was not a virtual machine, does not work anymore. I set some shortcut, but no action is launched... Does anyone know why? The major functionality I need from Grid is tiling windows to left/right side of the screen... Does anyone know any alternative?

    Read the article

  • Better to build or buy a compute grid platform?

    - by James B
    I am looking to do some quite processor-intensive brute force processing for string matching. I have run my prototype in a multi-threaded environment and compared the performance to an implementation using Gridgain with a couple of nodes (also multithreaded). The performance I observed was that my Gridgain implementation performed slower to my multithreaded implementation. It could be the case that there was a flaw in my gridgain implementation, but it was only a prototype, and I thought the results were indicative. So my question is this: What are the advantages of having to learn and then build an implementation for a particular grid platform (hadoop, gridgain, or EC2 if going hosted - other suggestions welcome), when one could fairly easily put together a lightweight compute grid platform with a much shallower learning curve?...i.e. what do we get for free with these cloud/grid platforms that are worth having/tricky to implement? (Please note, I don't have any need for a data grid) Cheers, -James (p.s. Happy to make this community wiki if needbe)

    Read the article

  • Selenium Grid not always using all of its registered RC's, why?

    - by BenA
    My Selenium Grid setup is as follows (all VMs) VM1 - Windows 7 x64 - Grid Hub + 2 RCs registering the default *firefox environment VM2 - Windows XP x32 - 2 RCs registering the default *firefox environment VM3 - Windows XP x32 - 2 RCs registering the default *firefox environment I'm happily using Mbunit and Gallio to drive the Grid, but my problem is that sometimes the Grid hub will stop passing executions over to 1 or more of the RCs, despite their showing available on the hub console. They seem to be happily maintaining their heartbeat back to the hub, but they're never asked to do any more work. This is after they had been executing tests earlier in the test run. Does anybody have any ideas why this should happen? In every case I've observed this behaviour, the last test an RC executed, before it then seemingly gets ignored by the hub, passed, and the session was successfully closed. Interestingly, whenever it happens to more than 1 of the RCs, its always (so far) been the pair that are running on the same VM. Yet they're managing to maintain their heartbeat, so it isn't a network connectivity problem. Any help would be greatly appreciated!

    Read the article

  • Is there a free (LGPL compatible) Grid plugin for jQuery that has similiar capabilities to the Ext-J

    - by Ehrann Mehdan
    One of the most appealing features of Ext-JS is the Grid control in my opinion. I was searching for something free that does something close and have set my hopes on jQuery. I haven't found a jQuery (or other LGPL compatible) Table / Grid plugin that allows to: Reorder columns by dragging Resize columns by dragging Add or Remove columns on the fly Have a default good looking UI (subjective, but Ext-JS look I think is a concensus) In addition to the rest most grid controls have (Sort, Paging etc) Is there a free (LGPL) jQuery plugin that does the above?

    Read the article

  • WPF: Why all the love for the Grid control?

    - by Eduardo Molteni
    Seen various examples of WPF applications I've seen the use of the Grid control for almost anything, even simplest things with only 1 column or row. Also, the WPF templates start with an empty grid. For me, using StackPanel or DockPanel is less verbose and are better for maintenance (think adding a row later and having to add +1 to all the other rows) Why is Grid better or what I am missing?

    Read the article

  • What is the lightest way to make a huge chess-like grid?

    - by Sotkra
    Hey there I'm working on a browser-game and I can't help but wonder about what's the lightest way to make the grid/board on which the game takes place. Right now, as a mere sample, I'll show you this: http://sotkra.com/game/ Now, as the grid gets bigger and bigger, the table and its td's create a very heavy filepage which in turn...sucks in more resources from the browser engine and computer. So, is a table with td's the most lightweight way to craft a huge grid-like board or is there something lighter that you recommend? Cheers Sotkra

    Read the article

  • Drag and drop between ListBox items and Grid cells in WPF?

    - by AJ
    Hi There is a list box with some items in it. Also there is a grid with 3x3 matrix. The user will be dragging an item and dropping on one the cells of grid. Most of the samples I found are about dragging-dropping from one listbox to another listbox. But I want to drop in one cell of grid. How can I achieve this? Please advise. thanks PJ

    Read the article

  • Telerik ASP.NET MVC2 Grid Delete Function with compound key.

    - by Dani
    I have a grid with a compound key: OrderId, ItemID. When I update the grid - the public ActionResult UpdateItemGridAjax(int OrderID, string ItemID) Gets both values from the grid. When I delete a row I get only the first one: public ActionResult DeleteItemGridAjax(int OrderID, string ItemID) Why is it happens and how can I get the ItemId value of the deleted row ? Grid Definition: <%= Html.Telerik().Grid<ItemsInOrderPOCO>() .Name("ItemsInOrderGrid") .DataKeys(dataKeys => { dataKeys.Add(e => e.OrderID); dataKeys.Add(e => e.ItemID); }) .ToolBar(commands => commands.Insert()) .DataBinding(dataBinding => { dataBinding.Ajax() //Ajax binding .Select("SelectItemGridAjax", "Orders", new { OrderID = Model.myOrder.OrderID }) .Insert("InsertItemGridAjax", "Orders", new { OrderID = Model.myOrder.OrderID }) .Update("UpdateItemGridAjax", "Orders") .Delete("DeleteItemGridAjax", "Orders"); }) .Columns(c => { c.Bound(o => o.ItemID); c.Bound(o => o.OrderID).Column.Visible = false; c.Bound(o => o.ItemDescription); c.Bound(o => o.NumOfItems); c.Bound(o => o.CostOfItem); c.Bound(o => o.TotalCost); c.Bound(o => o.SupplyDate); c.Command(commands => { commands.Edit(); commands.Delete(); }).Width(180).Title("Upadte"); })

    Read the article

  • Silverlight ValidationSummary screen real estate

    - by Mark Cooper
    Silverlight 3; I have a ValidationSummary in the top row of my grid. When the ValidationSummary appears, it pushes my button row (row 3) off the bottom of the displayable screen. <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="36" /> </Grid.RowDefinitions> <di:ValidationSummary Grid.Row="0" /> <Grid x:Name="gridOuterContentHolder" Grid.Row="1"> <Grid.RowDefinitions> <RowDefinition Height="0.68*" /> <RowDefinition Height="5" /> <RowDefinition Height="0.32*" /> </Grid.RowDefinitions> <!-- elements removed for brevity --> </Grid> <StackPanel x:Name="stack" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right"> <Button Content="Delete" x:Name="btnDelete" Height="20" Width="75" /> </StackPanel> </Grid> I'm a code monkey not a pixel pusher and can't figure out which combination of Stretch's, Auto's and *'s I need. Any pushers out there that can help?? Thanks, Mark

    Read the article

  • dojox.enhancedGrid get Selected Row

    - by user256007
    How can I get the Selected Row Object of dojox.enhancedGrid ? I am using selectionMode: 'single' e.g. with Radio Buttons. dijit.byId("gridViewWidget").selection.selectedIndex Returns the rowIndex. But how to get the rowObject of that Index ? I can get the rowNode()But What I need is value of the id column of that Row. Its possible to travarse the HTML DOM returned by rowNode() But Is theer any straight forward way ?

    Read the article

  • Java: Preventing array going out of bounds.

    - by Troy
    I'm working on a game of checkers, if you want to read more about you can view it here; http://minnie.tuhs.org/I2P/Assessment/assig2.html When I am doing my test to see if the player is able to get to a certain square on the grid (i.e. +1 +1, +1 -1 .etc) from it's current location, I get an java.lang.ArrayIndexOutOfBoundsException error. This is the code I am using to make the move; public static String makeMove(String move, int playerNumber) { // variables to contain the starting and destination coordinates, subtracting 1 to match array size int colStart = move.charAt(1) - FIRSTCOLREF - 1; int rowStart = move.charAt(0) - FIRSTROWREF - 1; int colEnd = move.charAt(4) - FIRSTCOLREF - 1; int rowEnd = move.charAt(3) - FIRSTROWREF - 1; // variable to contain which player is which char player, enemy; if (playerNumber==1) { player= WHITEPIECE; enemy= BLACKPIECE; } else { player= BLACKPIECE; enemy= WHITEPIECE; } // check that the starting square contains a player piece if (grid [ colStart ] [ rowStart ] == player) { // check that the player is making a diagonal move if (grid [ colEnd ] [ rowEnd ] == grid [ (colStart++) ] [ (rowEnd++) ] && grid [ colEnd ] [ rowEnd ] == grid [ (colStart--) ] [ (rowEnd++) ] && grid [ colEnd ] [ rowEnd ] == grid [ (colStart++) ] [ (rowEnd--) ] && grid [ colEnd ] [ rowEnd ] == grid [ (colStart--) ] [ (rowEnd--) ]) { // check that the destination square is free if (grid [ colEnd ] [ rowEnd ] == BLANK) { grid [ colStart ] [ rowStart ] = BLANK; grid [ colEnd ] [ rowEnd ] = player; } } // check if player is jumping over a piece else if (grid [ colEnd ] [ rowEnd ] == grid [ (colStart+2) ] [ (rowEnd+2) ] && grid [ colEnd ] [ rowEnd ] == grid [ (colStart-2) ] [ (rowEnd+2) ] && grid [ colEnd ] [ rowEnd ] == grid [ (colStart+2) ] [ (rowEnd-2) ] && grid [ colEnd ] [ rowEnd ] == grid [ (colStart-2) ] [ (rowEnd-2) ]) { // check that the piece in between contains an enemy if ((grid [ (colStart++) ] [ (rowEnd++) ] == enemy ) && (grid [ (colStart--) ] [ (rowEnd++) ] == enemy ) && (grid [ (colStart++) ] [ (rowEnd--) ] == enemy ) && (grid [ (colStart--) ] [ (rowEnd--) ] == enemy )) { // check that the destination is free if (grid [ colEnd ] [ rowEnd ] == BLANK) { grid [ colStart ] [ rowStart ] = BLANK; grid [ colEnd ] [ rowEnd ] = player; } } } } I'm not sure how I can prevent the error from happening, what do you recommend?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >