﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - Lounge - Paste multiple rows from clipboard is crashing</title><link>http://www.intersoftsolutions.com/Community/Lounge/Paste-multiple-rows-from-clipboard-is-crashing/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Paste multiple rows from clipboard is crashing</title><link>http://www.intersoftsolutions.com/Community/Lounge/Paste-multiple-rows-from-clipboard-is-crashing/</link><pubDate>Mon, 10 Aug 2015 05:03:58 GMT</pubDate><dc:creator>yudi</dc:creator><category>paste multiple rows from clipboard</category><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Thank you for the hint. Instead of changing "UnitInStock" column as System.Decimal, I'm using "UnitPrice" column which by default has decimal data type.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;The reported problem occurs if the following conditions are met:&lt;/span&gt;&lt;/p&gt;&lt;ul style="color: #1f497d;"&gt;&lt;li&gt;&lt;strong&gt;EditType&lt;/strong&gt; of the column is &lt;strong&gt;NoEdit&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;DataFormatString&lt;/strong&gt; of the column is set. For example: c2; or #,###,##; etc.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;If your grid's structure met the above condition, the steps below can be used as workaround in order to avoid the problem.&lt;/span&gt;&lt;/p&gt;
&lt;ol style="color: #1f497d;"&gt;&lt;li&gt;Removes &lt;strong&gt;EditType="NoEdit"&lt;/strong&gt; from the WebGridColumn definition.&lt;br&gt;Original:&lt;br&gt;&amp;lt;ISWebGrid:WebGridColumn ... Name="UnitPrice" DataFormatString="c2" EditType="NoEdit" ... /&amp;gt;&lt;br&gt;&lt;br&gt;Modified to:&lt;br&gt;&amp;lt;ISWebGrid:WebGridColumn ... Name="UnitPrice" DataFormatString="c2" ... /&amp;gt;&lt;/li&gt;&lt;li&gt;In &lt;strong&gt;InitializeRow&lt;/strong&gt; server-side event, enable &lt;strong&gt;ForceNoEdit&lt;/strong&gt; of the cell. Enabling this property will force the cell to not allow editing (which has the same effect as set EditType to NoEdit).&lt;br&gt;Example:&lt;br&gt;protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)&lt;br&gt;
{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e.Row.Cells.GetNamedItem("UnitPrice").ForceNoEdit = true;&lt;br&gt;}&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I have tested this workaround and found that the exception is no longer persist when user paste multiple rows from clipboard. Please let me know whether this helps or not.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Paste multiple rows from clipboard is crashing</title><link>http://www.intersoftsolutions.com/Community/Lounge/Paste-multiple-rows-from-clipboard-is-crashing/</link><pubDate>Fri, 07 Aug 2015 11:47:17 GMT</pubDate><dc:creator>Vishal</dc:creator><category>paste multiple rows from clipboard</category><description>&lt;p&gt;Hi Yudi,&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;Can you please make "UnitinStocks" Colunm as System.Decimal instead of Int and try to replicate. Because my colunm is decimal type.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;Thanking You&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Paste multiple rows from clipboard is crashing</title><link>http://www.intersoftsolutions.com/Community/Lounge/Paste-multiple-rows-from-clipboard-is-crashing/</link><pubDate>Fri, 07 Aug 2015 03:59:19 GMT</pubDate><dc:creator>yudi</dc:creator><category>paste multiple rows from clipboard</category><description>&lt;blockquote&gt;Points To Remember :&lt;br&gt;I have a column  with Numeric Type and its EditType = NoEdit&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I was unable to reproduce the problem by using CopyPasteMultipleRows.aspx sample file of WebGrid. Please see attached video which shows how the reported problem is evaluated in my end.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Paste multiple rows from clipboard is crashing</title><link>http://www.intersoftsolutions.com/Community/Lounge/Paste-multiple-rows-from-clipboard-is-crashing/</link><pubDate>Wed, 05 Aug 2015 11:55:30 GMT</pubDate><dc:creator>Vishal</dc:creator><category>paste multiple rows from clipboard</category><description>&lt;p&gt;Hi Team,&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;I am getting an error while using "paste multiple rows from clipboard" in webgrid from context menu.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Paste multiple rows from clipboard in webgrid crashing if containing a numeric column and MyColumn.EditType = EditType.NoEdit&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Attached a video for your refrence.&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;&lt;b&gt;Points To Remember :&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;I have a column &amp;nbsp;with Numeric Type and its EditType = NoEdit&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;Steps to replicate.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;The Properties of this Column are :&lt;/span&gt;&lt;/p&gt;&lt;p&gt;In database, table is having column(having datatype float and supports null).(DB.png File attached for example)&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;1. Fetch DataTable from database.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;2. Bind the DataTable into webgrid.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;3. Copy the row from the context menu option "Copy this row".&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;4. Paste the row using context menu option "Paste multiple rows from clipboard".&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;5. you will get an error "Unable to get property Inner text of undefined or null reference".(grid.png attached for example)&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>