我的GD库是否打开?(Is my GD library turned on or not?)
我的GD库是否开启? 我使用的是Windows 7,Xampp和Chrome。
<?php gd_info();?>
没有任何显示
php.ini中
extension=php_gd2.dll // not commented
错误日志不包含任何错误。
Is my GD library turned on or not? I am using Windows 7, Xampp and Chrome.
<?php gd_info();?>
there is nothing displayed
php.ini
extension=php_gd2.dll // not commented
The error log does not contain any errors.
原文:https://stackoverflow.com/questions/42785509
最满意答案
此问题在以下MSDN论坛发布: DataGridView + RowValidating = Index 4没有值?
基本上,DataGridView处理验证的方式似乎是一个错误(或者至少非常意外的行为) - MessageBox.Show()导致不再存在的行上的验证。
我发现以下对代码的更改修复了这个问题:
private void myGrid_RowValidating(object sender, DataGridViewCellCancelEventArgs e) { // Note the check to see if the current row is dirty if (string.IsNullOrEmpty(myGrid.Rows[e.RowIndex].Cells["MandatoryColumn"].FormattedValue.ToString()) && myGrid.IsCurrentRowDirty) { e.Cancel = true; myGrid.Rows[e.RowIndex].Cells["MandatoryColumn"].ErrorText = "Mandatory"; MessageBox.Show("Error message"); } else { myGrid.Rows[e.RowIndex].Cells["MandatoryColumn"].ErrorText = string.Empty; } }
更改是检查被验证的行是否脏 - 当您按下转义并删除一行时,它不再脏,所以这可以防止错误地尝试编辑它。
This issue is explained in the following MSDN forums post: DataGridView + RowValidating = Index 4 does not have a value?
Basically it appears to be a bug (or at least very unexpected behaviour) in the way the DataGridView handles validation - the MessageBox.Show() causing validation on a row that no longer exists.
I found that the following change to your code fixes the issue:
private void myGrid_RowValidating(object sender, DataGridViewCellCancelEventArgs e) { // Note the check to see if the current row is dirty if (string.IsNullOrEmpty(myGrid.Rows[e.RowIndex].Cells["MandatoryColumn"].FormattedValue.ToString()) && myGrid.IsCurrentRowDirty) { e.Cancel = true; myGrid.Rows[e.RowIndex].Cells["MandatoryColumn"].ErrorText = "Mandatory"; MessageBox.Show("Error message"); } else { myGrid.Rows[e.RowIndex].Cells["MandatoryColumn"].ErrorText = string.Empty; } }
The change is to check that the row being validated is dirty - when you press escape and remove a row it is no longer dirty so this prevents incorrectly trying to edit it.
相关问答
更多-
查找SQL Server 2005 Management Studio的注册表(To Find the registry of SQL Server 2005 Management Studio)[2022-10-12]
SQL 2005 SSMS将其设置存储在 HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell SQL 2008 SSMS将其设置存储在 HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\100\Tools\Shell SQL 2005 SSMS stores its settings at HKEY_CURRENT_USER\Software\M ... -
SQL Server Management Studio中的预填充参数(Pre-fill parameters in SQL Server Management Studio)[2021-05-24]
不,这是不可能的,没有地方可以保存它们。 但您可以手动填充参数,执行存储过程并将生成的脚本另存为.SQL文件。 这样,您将使用预填充参数保存对SP的调用。 No this is not possible, there's nowhere to save them. But you can fill the parameters manually, execute the stored procedure and save the generated script as a .SQL file. This w ... -
在SQL Server Management Studio中什么是SQLCMD模式?(In SQL Server Management Studio what is SQLCMD mode?)[2022-01-14]
听起来好像是什么 它是一种让您编写SQLCMD脚本的模式。 从MSDN - 使用查询编辑器编辑SQLCMD脚本 : 要使用数据库引擎查询编辑器编写或编辑SQLCMD脚本,必须启用SQLCMD脚本模式。 在SQL Server Management Studio中,通过查询菜单(查询 - > SQLCMD模式)进行设置。 Exactly what it sounds like. It is a mode that lets you author SQLCMD scripts. From MSDN - Edit ... -
只需通过选项启用它。 工具 选项 文本编辑器 所有语言 设置 - 检查Word Wrap Just enable it through the options. Tools Options Text Editor All Languages Settings - Check Word Wrap
-
此问题在以下MSDN论坛发布: DataGridView + RowValidating = Index 4没有值? 基本上,DataGridView处理验证的方式似乎是一个错误(或者至少非常意外的行为) - MessageBox.Show()导致不再存在的行上的验证。 我发现以下对代码的更改修复了这个问题: private void myGrid_RowValidating(object sender, DataGridViewCellCancelEventArgs e) { // Note ...
-
你不能在SQL Server中使用整数字段来做到这一点(我也不会用Varchar推荐它)。 让SQL Server将该字段存储为Identity,然后(假设这是用于显示),在您选择它时格式化数据: SELECT RIGHT('000000' + CONVERT(VARCHAR(6),ID), 6) FROM Table You cannot do this with an integer field in SQL Server (nor would I recommend it with a Varcha ...
-
用于SQL Server 2000的SQL Sever Management Studio(SQL Sever Management Studio for SQL Server 2000)[2022-08-15]
SQL Server 2000管理工具包括企业管理器(如Management Studio),查询分析器(一种执行脚本的工具)和Profiler(一种分析查询的工具)。 你可以在SQL Server 2000中连接和使用SQL Management Studio 2005) 或者如果你想要不同的东西,你可以使用EMS SQL管理器 。 SQL Server 2000 Management Tools includes Enterprise Manager (like Management Studio), ... -
我听说过Aqua Data Studio的好消息 。 适用于Win,OSX,Linux和Solaris。 Update: I had to come back and add to this. Navicat has a FREE solution for MySQL and MS SQL server. They are both available (for free) in the mac app store. App store links: Navicat for SQL Server Navic ...
-
您可以安装SQL Server 2008的Nov CTP。 SSMS支持连接到Azure,就像连接到任何其他内部部署数据库一样。 你也可以尝试这个工具 - http://hanssens.org/tools/sqlazuremanager/ 另一种选择是由Cerebrata提供的工具http://onlinedemo.cerebrata.com/sqlazureclient/ 。 You can install the Nov CTP of SQL Server 2008 . The SSMS suppor ...
-
您已连接到SQL Server的不同实例。 Visual Studio连接到LocalDB实例,而SQL Server Management Studio连接到SQL Server Express实例。 要解决此问题,只需在SQL Server Management Studio工具的登录步骤中选择本地实例。 You are connected to different instances of SQL Server. Visual Studio is connected to a LocalDB inst ...