问题标签 [grid]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
4 回答
11372 浏览

.net - WPF - 如何制作绘制方格纸状正方形的画笔?

我如何创建一个画笔来绘制一个规则的、重复的 1 单位粗线网格,在水平轴和垂直轴上均匀分布?想象一下方格纸,如果你愿意的话。

理想情况下,该解决方案将允许控制用于线条和背景(正方形内的区域)的画笔。通过这种方式,背景可以是透明的,因此网格可以用作叠加层。

编辑这是一张显示汤姆回答结果的图像:

在本例中,使用网格来合成三层以显示网格是真正透明的。

0 投票
2 回答
1065 浏览

asp.net - asp.net custom grid vs GridView/ListView

A few years ago, I decided to create my own DataGrid as I didn’t like the standard one provided by Microsoft. It’s a very simple function which takes a DataTable as an input parameter and which returns a string (the html code to display a table on a webpage).

It’s very flexible (there are some optional parameters to do the paging, sorting and to format each column the way I want) and fast (only the records which are used are retrieved from the database). The function itself is very short (about 20ish lines of code). I’ve been using it for at least 4 years now.

Assuming you have a PlaceHolder on your webpage, this is how you would call the custom function:

CreateCustomGrid(MyDataTable))) would return something like this (if MyDataTable has 2 columns and 2 rows):

Internally the function knows how to format each column (this function is only being used on one website) but it’s also possible to change it for each individual column by using optional parameters. Same for the paging and sorting. All in all it’s very flexible and very easy to use.

Now things have changed and the DataGrid has been replaced by the GridView and/or ListView. I’ve looked at them but I don’t see anything that they do that my function doesn’t so I would be tempted to carry on using my function but I might be overlooking something. At the same time, it looks a bit odd to carry on using a custom function to generate an html table. What’s your views on this?

0 投票
1 回答
979 浏览

asp.net-mvc - 将行添加到 MVCContrib 网格

我正在开发我的第一个 MVC 网站,并且正在尝试一些可用的网格。我真的很喜欢 MVCContrib 网格,但是我需要实现一个标准的“添加新记录”功能,而且我没有看到一种清晰的方法来将单个记录添加到数据库和网格中,而不必每次都重新加载整个网格。

我知道有一个 jQuery 网格插件,如果没有使用 MVCContrib 的好方法,我会朝那个方向发展。

0 投票
3 回答
5067 浏览

asp.net-mvc - 寻找 ASP.NET MVC 的网格

我正在为 ASP.NET MVC 寻找一个健壮的轻量级网格。我宁愿不写网格,如果其他人已经做过,但我还没有找到一个像样的网格。它应该是 508 兼容的,并且在大多数情况下,508 兼容消除了所有的 JavaScript 网格。

  • 它必须易于使用。
  • 不太贵(几百块钱)

我已经查看了以下网格:

更新

我找到了一个 javascript 网格,它可以执行我正在寻找的魔法,保持 508 兼容性。

这是一个名为Datatables的 jQuery 插件。它采用页面上预先存在的表格并为其提供可排序性和搜索功能。其他网格要么自己呈现表格,要么向服务器发出 ajax 请求。

0 投票
2 回答
21722 浏览

wpf - 需要滚动一个 WPF Grid

我想在 WPF 页面中创建两个网格。Grid需要滚动条或滚动查看器。另一个Grid是静态的。网格在页面中一个一个放置。如何首先创建和设置滚动Grid

0 投票
3 回答
1283 浏览

asp.net-mvc - mvccontrib 网格默认排序顺序

任何人都知道如何设置 mvccontrib 网格的默认排序顺序?

0 投票
2 回答
14341 浏览

wpf - WPF Grid - 如何为一列应用样式?

我有一个包含许多行和列的 WPF 网格,所有行和列都包含诸如 TextBlocks 和 TextBoxes 之类的东西。

对于这种特定情况,我希望第 1 列中的所有内容都有填充,并且第 2 列中的所有内容都正确对齐。必须在网格中的每个项目上设置这些属性似乎是非常非 WPF 的。

我知道我可以通过执行以下操作为网格中的所有 TextBlocks 创建样式:

但是有没有办法将该样式仅应用于第 2 列中的控件?

我应该使用不同的控件吗?

0 投票
1 回答
1496 浏览

c# - ComponentArt Grid OnKeyPress 重置

有没有办法通过代码(C#)重置按键搜索值和状态?

ComponentArt (CA) 网格用于从数据库中选择要更新的记录。更新过程完成后,我需要重置搜索状态。

由于某种原因,在重新绑定 CA 网格后,按键搜索/过滤器仍然存在。我必须手动从搜索框中删除/删除文本才能通过 CA 网格访问整个记录。

谢谢你。

0 投票
12 回答
105985 浏览

javascript - 调整浏览器大小时调整jqGrid的大小?

调整浏览器窗口大小时,有没有办法调整jqGrid的大小?我已经尝试过这里描述的方法,但该技术在 IE7 中不起作用。

0 投票
1 回答
1203 浏览

php - ExtJS Gridfilter 值到 PHP

我正在使用 ExtJS v2.0 。我想获取这些值并将它们作为,或任何可以使用此后端代码插入 PHP 查询的可能方法gridfilter传递给 PHP 页面:http: //www.vinylfox.com/grid-filter-php -后端代码/$_POST$_GET$variable

我将使用这些查询来打印一张带有打印结果和格式的表格。

有任何想法吗 ?