EzDevInfo.com

grid

CSS Grid Framework

Mosaic Grid gallery with dynamic sized images [closed]

I have just received the following design for a project, for an image grid gallery, with dynamic width & height images (user submitted images). (Screenshot at the end of post)

I have tried jQuery Masonry, Tympanus Automatic Image Montage and CSS-Tricks Seemless Responsive Photo Grid, but each has their limitation.

  • Jquery Masonry allows for both width and height to be dynamic, however there are gaps generated
  • The latter 2 scripts, generate very nice grids, but with the problem that either width or height must be static

EDIT: i came across, Isotope, which is almost perfect and i will probably end up using it, unless there's something that fixes my needs exactly. Therefore my question still remains the same...

Is there any javascript (preferably jQuery) script that can generate a completely dynamic mosaic (in respect to image size), like the one in the screenshot below?

Thanks for any help


Gallery


Source: (StackOverflow)

Good ASP.NET excel-like Grid control? [closed]

We are looking for an ASP.NET compatible data grid that allows for multi-line editing similar to Excel or a WinForms data grid. It must also support very basic keyboard input (tab, arrow keys, return). Note that we are not looking for Excel capabilities (functions, formatting, formulas) ... just a grid for fast data entry.

I've looked at Telerik, Infragistics, ComponentOne, DevExpress, and many others ... all their support teams have said that the controls either do not support multi-line, or do so in such a clunky way that it would be unusable.

Has anyone used any Excel-like grids that they can recommend? The client-side grids seemed closer to what we needed, with Sigma Widgets ( example ) being the closest I've found so far. Extjs's grid was too inflexible, and the jQuery grid was too buggy.


Source: (StackOverflow)

Advertisements

Spacing between child controls in WPF Grid

I have a set of Key/Value pairs I want to display on a WPF Window. I'm using a grid to lay them out like so:

<Grid Margin="4">
	<Grid.ColumnDefinitions>
		<ColumnDefinition Width="Auto"/>
		<ColumnDefinition/>
	</Grid.ColumnDefinitions>
	<Grid.RowDefinitions>
		<RowDefinition Height="Auto"/>
		<RowDefinition Height="Auto"/>
	</Grid.RowDefinitions>

	<Label Grid.Row="0" Grid.Column="0">Code</Label>
	<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Code}"/>

	<Label Grid.Row="1" Grid.Column="0">Name</Label>
	<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Name}"/>
</Grid>

However when I display this, the TextBoxes are squashed up with their top and bottom borders touching the TextBox above/below. What is the best way to add vertical space to the rows in this layout?


Source: (StackOverflow)

Best dynamic JavaScript/JQuery Grid [closed]

I'm working with JavaScript, JQuery and HTML. UI Of my project is completely dynamic. I am looking for a dynamic JavaScript/JQuery Grid which supports following features.

Can anybody tell me is there any good looking open sources Grid which supports the following features?

  1. I should be able to create an instance of the grid at run-time and add to DOM.
  2. Supports column templates (textbox, select, checkbox or any inputs or simple text)
  3. Supports set new column template or replace existing column template at real-time.
  4. Few input control (e.g textbox, checkbox..) present under a column may be enabled and few may be disabled.
  5. Supports setData() at real-time.
  6. Supports event if any input data changed by user.
  7. It should support selection of a Row
  8. Add row or delete row support at real-time without rendering the whole grid.
  9. Supports Paging.
  10. Supports sorting by any column at real-time.
  11. Fires an event if data is sorted by user at real-time.
  12. Grid UI must support realizable columns
  13. Auto re-sizable (It will be great if grid is auto re-sizable according to the size of the parent element)
  14. Definitely has good documentation.

Source: (StackOverflow)

GridView VS GridLayout in Android Apps

I have to use a grid to implement Photo Browser in Android, and I want to know the difference between GridView and GridLayout.

I'm using GridView to display the images dynamically (from SD card).


Source: (StackOverflow)

How to validate inputs dynamically created using ng-repeat, ng-show (angular)

I have a table that is created using ng-reapeat. I want to add validation to each element in the table. The problem is that each input cell has the same name as the cell above and below it. I attempted to use the {{$index}} value to name the inputs, but despite the string literals in HTML appearing correct, it is now working.

Here is my code as of now:

<td>
    <input ng-model="r.QTY" class="span1" name="QTY{{$index}}" ng-pattern="/^[\d]*\.?[\d]*$/" required/>
    <span class="alert-error" ng-show="form.QTY{{$index}}.$error.pattern"><strong>Requires a number.</strong></span>
    <span class="alert-error" ng-show="form.QTY{{$index}}.$error.required"><strong>*Required</strong></span>
</td>

I have tried removing the `{{}}' from index, but that does not work either. As of now, the validation property of the input is working correctly, but the error message is not displayed.

Anyone have any suggestions?

Edit: In addition to the great answers below, here is a blog article that covers this issue in more detail: http://www.thebhwgroup.com/blog/2014/08/angularjs-html-form-design-part-2/


Source: (StackOverflow)

WPF: Grid with column/row margin/padding?

Is it easily possible to specify a margin and/or padding for rows or columns in a WPF Grid?

I could of course add extra columns to space things out, but this seems like a job for padding/margins (it will give much simplier XAML). Has someone derived from the standard Grid to add this functionality?


Source: (StackOverflow)

WPF: Hide grid row

I have a simple WPF form with a <Grid> declared on the Form.

In this Grid I then have a bunch of Rows:

   <Grid.RowDefinitions>
        <RowDefinition Height="Auto" MinHeight="30" />
        <RowDefinition Height="Auto" Name="rowToHide"/>
        <RowDefinition Height="Auto" MinHeight="30" />
    </Grid.RowDefinitions>

So basically the row with the name "rowToHide" has a few input fields in it, and now I want to hide this row as I don't need these fields. Its simple enough to just set all items in the Row to Visibility = Hidden, but the Row still takes up space in the Grid. So need to do something like setting Height = 0 or something. But that didn't seem to work.

You can think of it like this: You have a form, in there we have a drop down saying "Payment Type", and if the person selects "Cash", then hide the row containing the Card details. And it isn't an option to start the form with this hidden already.

Thanks everyone!


Source: (StackOverflow)

How to populate a WPF grid based on a 2-dimensional array

I have a 2-dimensional array of objects and I basically want to databind each one to a cell in a WPF grid. Currently I have this working but I am doing most of it procedurally. I create the correct number of row and column definitions, then I loop through the cells and create the controls and set up the correct bindings for each one.

At a minimum I would like to be able to use a template to specify the controls and bindings in xaml. Ideally I would like to get rid of the procedural code and just do it all with databinding, but I'm not sure that's possible.

Here is the code I am currently using:

public void BindGrid()
{
    m_Grid.Children.Clear();
    m_Grid.ColumnDefinitions.Clear();
    m_Grid.RowDefinitions.Clear();

    for (int x = 0; x < MefGrid.Width; x++)
    {
        m_Grid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star), });
    }

    for (int y = 0; y < MefGrid.Height; y++)
    {
        m_Grid.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star), });
    }

    for (int x = 0; x < MefGrid.Width; x++)
    {
        for (int y = 0; y < MefGrid.Height; y++)
        {
            Cell cell = (Cell)MefGrid[x, y];                    

            SolidColorBrush brush = new SolidColorBrush();

            var binding = new Binding("On");
            binding.Converter = new BoolColorConverter();
            binding.Mode = BindingMode.OneWay;

            BindingOperations.SetBinding(brush, SolidColorBrush.ColorProperty, binding);

            var rect = new Rectangle();
            rect.DataContext = cell;
            rect.Fill = brush;
            rect.SetValue(Grid.RowProperty, y);
            rect.SetValue(Grid.ColumnProperty, x);
            m_Grid.Children.Add(rect);
        }
    }

}

Source: (StackOverflow)

twitter bootstrap grid system. Spacing between columns

Im sure there is a simple solution to this problem. Basically if I have two columns how can i add a space between them.

eg if the html is :

<div class="col-md-6"></div>
<div class="col-md-6"></div>

The output would simply be two columns right next to each other taking up the whole width of the page. Say the width was set to 1000px then each div would be 500px wide.

If I wanted a 100px space between the two how could I acheive this? Obviously automatically through bootstrap the div sizes would become 450px each to compensate for the space


Source: (StackOverflow)

Grid Star-Size in code behind

I have a grid as follows,

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="0.5*" />
        <RowDefinition Height="0.5*" />
    </Grid.RowDefinitions>
</Grid>

How do I give the Height = "0.5*" in code behind?


Source: (StackOverflow)

What is the best library for Java to grid/cluster-enable your application? [closed]

This is the ability to run your application on a cluster of servers with the intent to distribute the load and also provide additional redundancy.

I've seen a presentation for GridGain and I was very impressed with it.

Know of any others?


Source: (StackOverflow)

Meaning of * (asterisk) in a WPF ColumnDefinition? (weighted proportion of available space)

What is the meaning of * (asterisk) in the XAML below?

 <ColumnDefinition Width="0.07*"/>
<Grid Height="100" HorizontalAlignment="Left" 
          Margin="102,134,0,0" 
          Name="grid1" VerticalAlignment="Top" 
          Width="354">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="40*" />
            <ColumnDefinition Width="314*" />
        </Grid.ColumnDefinitions>
    </Grid>

Source: (StackOverflow)

What does RowDefinition Height="10*" mean in a XAML Grid?

I use Height="*" a bit to mean that the height of the last row should fill to the bottom of the grid.

But what does "10*" mean?

<Grid Name="mainGrid">
    <Grid.RowDefinitions>
    	<RowDefinition Height="100" />
    	<RowDefinition Height="40" />
    	<RowDefinition Height="10*" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
    	<ColumnDefinition Width="200"  />
    	<ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
</Grid>

Source: (StackOverflow)

Meaning of numbers in col-md-4 , col-xs-1 , col-lg-2 in bootstrap

I am confused with the grid system in the new bootstrap, particularly these classes:

col-lg-*
col-md-*
col-xs-*

(where * represents some number)

can anyone please explain how that number is aligning the grids, and how to use these numbers, and what they actually represent


Source: (StackOverflow)