﻿<?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 - WebGrid Enterprise - Webgrid doesn't update row after OnCellDblClick</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-doesnt-update-row-after-OnCellDblClick/</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>Webgrid doesn't update row after OnCellDblClick</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-doesnt-update-row-after-OnCellDblClick/</link><pubDate>Tue, 13 May 2014 23:18:58 GMT</pubDate><dc:creator>Hans</dc:creator><category>WebGrid</category><category>javascript</category><category>Update</category><category>function</category><description>&lt;p&gt;Hello,&lt;br&gt;&lt;br&gt;Here’s the snippet example code how to get name of the double clicked column:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnCellDblClick(controlId, tblName, rowIndex, cellIndex, cellEl){
    var WebGrid1 = ISGetObject(controlId);
    alert(WebGrid1.RootTable.Columns[cellIndex - 1].Caption);
    return true;
}&lt;/pre&gt;&lt;p&gt;Hope this helps.&lt;br&gt;&lt;br&gt;Thank you.&lt;br&gt;&lt;br&gt;Regards,&lt;br&gt;Hans K.&lt;br&gt;&lt;/p&gt;</description></item><item><title>Webgrid doesn't update row after OnCellDblClick</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-doesnt-update-row-after-OnCellDblClick/</link><pubDate>Tue, 13 May 2014 06:19:38 GMT</pubDate><dc:creator>sobikash11@googlemail.com</dc:creator><category>WebGrid</category><category>javascript</category><category>Update</category><category>function</category><description>&lt;p&gt;Hello Hans Kristian,&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;is there another way to Identify the Column which got double clicked? Because if i move the column, so that column has a different cellindex then before and the value gets set to the wrong column.&lt;/p&gt;</description></item><item><title>Webgrid doesn't update row after OnCellDblClick</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-doesnt-update-row-after-OnCellDblClick/</link><pubDate>Thu, 20 Feb 2014 01:25:35 GMT</pubDate><dc:creator>Hans</dc:creator><category>WebGrid</category><category>javascript</category><category>Update</category><category>function</category><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Thank you for the reply.&lt;br /&gt;I apologize for the inconvenience.&lt;br /&gt;&lt;br /&gt;This issue appears due to the WebGrid doesn’t enter edit mode when you double click on the cell.&lt;br /&gt;&lt;br /&gt;I made a WebGrid page. I bind the WebGrid to access data source (Northwind.mdb &amp; Shippers table) and set the OnCellDblClick client event to the WebGrid as well.&lt;br /&gt;In OnCellDblClick event, I try to make changes on Phone column.&lt;br /&gt;Here’s the Javascript code:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnCellDblClick(controlId, tblName, rowIndex, cellIndex, cellEl){
    var WebGrid1 = ISGetObject(controlId);
            
    var RowObject = WebGrid1.GetSelectedObject().ToRowObject()
    var CellObject = RowObject.GetCell('Phone');
    CellObject.ActivateEdit();
    CellObject.SetText("123456", true);
    CellObject.SetValue("123456");
    RowObject.SetDataChanged(); // indicates that this row's data has been changed.      
    WebGrid1.MarkEdit(); // sets the row's status as edited, as if user has typed inside the cell.
            
    return true;
}&lt;/pre&gt;
&lt;p&gt;Please kindly have review on the page as well. You could get the page from this link: http://1drv.ms/1bNO8dJ&lt;br /&gt;&lt;br /&gt;Hope this helps.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Hans K.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Webgrid doesn't update row after OnCellDblClick</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-doesnt-update-row-after-OnCellDblClick/</link><pubDate>Wed, 19 Feb 2014 04:24:26 GMT</pubDate><dc:creator>macedes</dc:creator><category>WebGrid</category><category>javascript</category><category>Update</category><category>function</category><description>i tried it but still does't work.</description></item><item><title>Webgrid doesn't update row after OnCellDblClick</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-doesnt-update-row-after-OnCellDblClick/</link><pubDate>Wed, 19 Feb 2014 04:19:41 GMT</pubDate><dc:creator>Hans</dc:creator><category>WebGrid</category><category>javascript</category><category>Update</category><category>function</category><description>Hello,&lt;br /&gt;&lt;br /&gt;Thank you for the question regarding WebGrid.&lt;br /&gt;&lt;br /&gt;Please kindly try to modify your javascript code from:&lt;pre&gt;if (cellIndex == 17){
    grid.GetSelectedObject().ToRowObject().GetCell('ANKUNFT').SetValue(now, true);
    grid.GetSelectedObject().ToRowObject().GetCell('ANKUNFT').SetText(datum.toString());
    grid.GetSelectedObject().ToRowObject().GetCell('STATUS').SetValue('0', true);
    grid.GetSelectedObject().ToRowObject().GetCell('STATUS').SetText('Awensend');
}
if (cellIndex == 18)
{
    grid.GetSelectedObject().ToRowObject().GetCell('ABREISE').SetValue(now, true);
    grid.GetSelectedObject().ToRowObject().GetCell('ABREISE').SetText(datum.toString());
}&lt;/pre&gt;
&lt;p&gt;To:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;if (cellIndex == 17)
{
    grid.GetSelectedObject().ToRowObject().GetCell('ANKUNFT').SetValue(now);
    grid.GetSelectedObject().ToRowObject().GetCell('ANKUNFT').SetText(datum.toString(), true);
    grid.GetSelectedObject().ToRowObject().GetCell('STATUS').SetValue('0');
    grid.GetSelectedObject().ToRowObject().GetCell('STATUS').SetText('Awensend', true);
}
if (cellIndex == 18)
{
    grid.GetSelectedObject().ToRowObject().GetCell('ABREISE').SetValue(now);
    grid.GetSelectedObject().ToRowObject().GetCell('ABREISE').SetText(datum.toString(), true);
}&lt;/pre&gt;
&lt;p&gt;Hope this helps.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Hans K.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Webgrid doesn't update row after OnCellDblClick</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-doesnt-update-row-after-OnCellDblClick/</link><pubDate>Tue, 18 Feb 2014 05:16:01 GMT</pubDate><dc:creator>macedes</dc:creator><category>WebGrid</category><category>javascript</category><category>Update</category><category>function</category><description>&lt;p&gt;Hello, i have a WebGrid with some rows filled, when i doubleclick to a specific cell it will call the function "WebGrid1_OnCellDblClick" and sets the current DateTime in the Cell. after i press shift and Enter it won't save the changes in die DB. It doesn't recognize the entry as an Update. When I edit a cell by myself it work.  Do you have any solutions?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;here is my code:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;        &amp;lt;ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="518px" UseDefaultStyle="True"
            Width="1219px" DataMember="DefaultView" DataSourceID="SqlDataSource1"&amp;gt;
            &amp;lt;RootTable DataKeyField="ID"&amp;gt;
                &amp;lt;Columns&amp;gt;
                    &amp;lt;ISWebGrid:WebGridColumn Caption="ID" DataMember="ID" DataType="System.Decimal" Name="ID"
                        Width="100px" Visible="False"&amp;gt;
                    &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
                 
                    &amp;lt;ISWebGrid:WebGridColumn Caption="Ankunft" DataMember="ANKUNFT" DataType="System.DateTime"
                        Name="ANKUNFT" Width="150px"&amp;gt;
                    &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
                    &amp;lt;ISWebGrid:WebGridColumn Caption="Abreise" DataMember="ABREISE" DataType="System.DateTime"
                        Name="ABREISE" Width="150px"&amp;gt;
                    &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
                    &amp;lt;ISWebGrid:WebGridColumn Caption="Status" Name="STATUS"
                        Width="100px" DataMember="STATUS" DataType="System.Decimal"&amp;gt;
                    &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
                &amp;lt;/Columns&amp;gt;
            &amp;lt;/RootTable&amp;gt;
             &amp;lt;LayoutSettings AllowAddNew="Yes" AllowDelete="Yes" AllowEdit="Yes" AllowFilter="Yes"
                AllowSorting="Yes"&amp;gt;
                &amp;lt;ClientSideEvents OnCellDblClick="WebGrid1_OnCellDblClick" /&amp;gt;
            &amp;lt;/LayoutSettings&amp;gt;
        &amp;lt;/ISWebGrid:WebGrid&amp;gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;&lt;pre&gt;       function WebGrid1_OnCellDblClick(controlId, tblName, rowIndex, cellIndex, cellEl) {
          var grid = ISGetObject(controlId);
          var WebCombo2 = ISGetObject("WebCombo2");
          var now = new Date();
          var datum = (pad(now.getDate())).toString() &amp;#43; "." &amp;#43; (pad(1 &amp;#43; now.getMonth())).toString() &amp;#43; "." &amp;#43; now.getFullYear().toString() &amp;#43; " " &amp;#43; (pad(now.getHours())).toString() &amp;#43; ":" &amp;#43; (pad(now.getMinutes())).toString() &amp;#43; ":00";
          if (cellIndex == 17) {
              grid.GetSelectedObject().ToRowObject().GetCell('ANKUNFT').SetValue(now, true);
              grid.GetSelectedObject().ToRowObject().GetCell('ANKUNFT').SetText(datum.toString() );
              grid.GetSelectedObject().ToRowObject().GetCell('STATUS').SetValue('0', true);
              grid.GetSelectedObject().ToRowObject().GetCell('STATUS').SetText('Awensend');
          }
          if (cellIndex == 18) {
              grid.GetSelectedObject().ToRowObject().GetCell('ABREISE').SetValue(now, true);
              grid.GetSelectedObject().ToRowObject().GetCell('ABREISE').SetText(datum.toString());
          }
      return true;
      }&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;</description></item></channel></rss>