﻿<?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 - WebDesktop - webgrid issue about CellTemplate using DataBinder</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/webgrid-issue-about-CellTemplate-using-DataBinder/</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 issue about CellTemplate using DataBinder</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/webgrid-issue-about-CellTemplate-using-DataBinder/</link><pubDate>Fri, 29 Jul 2011 05:42:40 GMT</pubDate><dc:creator>Riendy</dc:creator><category>WebGrid</category><category>CellTemplate</category><description>&lt;p&gt;Hi Gavin,&lt;br /&gt;&lt;br /&gt;This issue will appear when use more than 1 parameter. I already forwarded this issue to our development team for further information. I will surely keep follow up our developers to solve this issue and let you know the updates as soon as possible.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards.&lt;br /&gt;Riendy &lt;/p&gt;</description></item><item><title>webgrid issue about CellTemplate using DataBinder</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/webgrid-issue-about-CellTemplate-using-DataBinder/</link><pubDate>Thu, 28 Jul 2011 20:30:11 GMT</pubDate><dc:creator>gavin</dc:creator><category>WebGrid</category><category>CellTemplate</category><description>&lt;p&gt;Hi Riendy,&lt;/p&gt;
&lt;p&gt;the attachment files are the code and the sql server 2005 database.Thanks for your help!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;gavin&lt;br /&gt;&lt;/p&gt;</description></item><item><title>webgrid issue about CellTemplate using DataBinder</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/webgrid-issue-about-CellTemplate-using-DataBinder/</link><pubDate>Thu, 28 Jul 2011 06:18:27 GMT</pubDate><dc:creator>Riendy</dc:creator><category>WebGrid</category><category>CellTemplate</category><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Xu, Unfortunately I could not replicate your issue on my end. &lt;br /&gt;Would you please help me to attach a simple runable sample to me? It's really help me to solve your issue faster. &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regards.&lt;br /&gt;Riendy&lt;/p&gt;</description></item><item><title>webgrid issue about CellTemplate using DataBinder</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/webgrid-issue-about-CellTemplate-using-DataBinder/</link><pubDate>Wed, 27 Jul 2011 06:08:57 GMT</pubDate><dc:creator>karlp@agrecon.com</dc:creator><category>WebGrid</category><category>CellTemplate</category><description>&lt;p&gt;You can get the row values in the javascript function without passing as arguments.  Here is an example that uses only one bound value, and looks up teh row key value.  You could also retreive the BeiZhu value from selObj.GetRowObject()  object in javascript too, inspect the object at runtime to see how.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;function deleteOnePW(BeiZhu){&lt;/p&gt;
&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;var grid = ISGetObject("GridHandle");&lt;/p&gt;
&lt;p&gt; &lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;var selObj = grid.GetSelectedObject();&lt;/p&gt;
&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt; if (selObj != null) {&lt;/p&gt;
&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;    document.getElementById("&amp;lt;%= TxtPingWei.ClientID %&amp;gt;").value = selObj.GetRowObject().KeyValue;&lt;/p&gt;
&lt;p&gt;            document.getElementById("&amp;lt;%= TxtBeiZhu.ClientID %&amp;gt;").value = BeiZhu;&lt;/p&gt;
&lt;p&gt;            document.getElementById("&amp;lt;%= DelDangQian.ClientID %&amp;gt;").click();&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt; }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>webgrid issue about CellTemplate using DataBinder</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/webgrid-issue-about-CellTemplate-using-DataBinder/</link><pubDate>Wed, 27 Jul 2011 05:24:54 GMT</pubDate><dc:creator>gavin</dc:creator><category>WebGrid</category><category>CellTemplate</category><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;we are using WebGrid 7 and  having a strange problem.&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGrid ID="GridHandle" runat="server" Width="99%" OnInitializeRow="WebGrid1_InitializeRow"
    UseDefaultStyle="True" DataSourceID="ISDataSource1" DataMember="Messages_Center"&amp;gt;
    &amp;lt;LayoutSettings AllowSorting="No" AutoFitColumns="true" PagingLoadMode="Custom" AllowGrouping="No" PagingMode="ClassicPaging" PagingSize="20"&amp;gt;
        &amp;lt;TextSettings Language="UseCustom" UseLanguage="zh-CN"&amp;gt;
        &amp;lt;/TextSettings&amp;gt;
    &amp;lt;/LayoutSettings&amp;gt;
    &amp;lt;RootTable DataKeyField="Row_ID"&amp;gt;
        &amp;lt;Columns&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Name="RowNumber" Caption="RowNumber" Width="40px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn AllowGrouping="No" AllowSizing="No" AllowSorting="No" Bound="False" ColumnType="CheckBox" EditType="NoEdit" IsRowChecker="True" Name="colChk" ShowInSelectColumns="No" Width="25px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Name="BeiZhu" Caption="BeiZhu" DataMember="BeiZhu" Width="150px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Name="TargetDispName" Caption="TargetDispName" DataMember="TargetDispName"
                Width="150px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Name="FromDispName" Caption="FromDispName" DataMember="FromDispName"
                Width="150px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Name="GenerateDate" Caption="GenerateDate" DataMember="GenerateDate"
                Width="150px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &lt;span style="text-decoration:underline;"&gt;&amp;lt;ISWebGrid:WebGridColumn Name="Edit" Caption="View" ColumnType="Template" Width="35px"
                IsAutoWidth="false"&amp;gt;
                &amp;lt;CellStyle HorizontalAlign="Center"&amp;gt;
                &amp;lt;/CellStyle&amp;gt;
                &amp;lt;CellTemplate&amp;gt;
                    &amp;lt;a href='javascript:window.showModalDialog("Detail.aspx?Row_ID=&amp;lt;%#DataBinder.Eval(Container.DataItem,"Row_ID")%&amp;gt;")'&amp;gt;
                        &amp;lt;img src='bigview.gif' border='0'&amp;gt;&amp;lt;/a&amp;gt;
                &amp;lt;/CellTemplate&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Name="Enter" Caption="Delete" ColumnType="Template" Width="40px"&amp;gt;
                &amp;lt;FooterStyle HorizontalAlign="Center" /&amp;gt;
                &amp;lt;CellStyle HorizontalAlign="Center" Width="40px"&amp;gt;
                &amp;lt;/CellStyle&amp;gt;
                &amp;lt;CellTemplate&amp;gt;
                    &amp;lt;img src='Delete.gif' style="cursor: hand;" onclick="deleteOnePW('&amp;lt;%#DataBinder.Eval(Container.DataItem,"Row_ID")%&amp;gt;','&amp;lt;%#DataBinder.Eval(Container.DataItem,"BeiZhu")%&amp;gt;');" /&amp;gt;
                &amp;lt;/CellTemplate&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;/span&gt;
        &amp;lt;/Columns&amp;gt;
    &amp;lt;/RootTable&amp;gt;
&amp;lt;/ISWebGrid:WebGrid&amp;gt;&lt;/pre&gt;&lt;pre&gt;&amp;lt;script&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function deleteOnePW(rowGuid, BeiZhu) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById("&amp;lt;%= TxtPingWei.ClientID %&amp;gt;").value = rowGuid;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById("&amp;lt;%= TxtBeiZhu.ClientID %&amp;gt;").value = BeiZhu;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById("&amp;lt;%= DelDangQian.ClientID %&amp;gt;").click();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;p&gt; the details of the problem are as follows,&lt;br /&gt;when I click Delete Image and it will show "Index was outside the bounds of the array" error.&lt;/p&gt;
&lt;p&gt;However, we change the 'Delete' image's template to &lt;/p&gt;&lt;pre&gt;&amp;lt;img src='Delete.gif' style="cursor: hand;" onclick="deleteOnePW('&amp;lt;%#DataBinder.Eval(Container.DataItem,"Row_ID")%&amp;gt;');" /&amp;gt;
&lt;/pre&gt;

&lt;p&gt;it will be all right.Should the "deleteOnePW" function only have one parameter?However, when I delete the "View" Column , it will be all right.(this issue does not occur)&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGrid ID="GridHandle" runat="server" Width="99%" OnInitializeRow="WebGrid1_InitializeRow"
    UseDefaultStyle="True" DataSourceID="ISDataSource1" DataMember="Messages_Center"&amp;gt;
    &amp;lt;LayoutSettings AllowSorting="No" AutoFitColumns="true" PagingLoadMode="Custom" AllowGrouping="No" PagingMode="ClassicPaging" PagingSize="20"&amp;gt;
        &amp;lt;TextSettings Language="UseCustom" UseLanguage="zh-CN"&amp;gt;
        &amp;lt;/TextSettings&amp;gt;
    &amp;lt;/LayoutSettings&amp;gt;
    &amp;lt;RootTable DataKeyField="Row_ID"&amp;gt;
        &amp;lt;Columns&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Name="RowNumber" Caption="RowNumber" Width="40px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn AllowGrouping="No" AllowSizing="No" AllowSorting="No" Bound="False" ColumnType="CheckBox" EditType="NoEdit" IsRowChecker="True" Name="colChk" ShowInSelectColumns="No" Width="25px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Name="BeiZhu" Caption="BeiZhu" DataMember="BeiZhu" Width="150px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Name="TargetDispName" Caption="TargetDispName" DataMember="TargetDispName"
                Width="150px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Name="FromDispName" Caption="FromDispName" DataMember="FromDispName"
                Width="150px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &amp;lt;ISWebGrid:WebGridColumn Name="GenerateDate" Caption="GenerateDate" DataMember="GenerateDate"
                Width="150px"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            &lt;span style="text-decoration:underline;"&gt;&amp;lt;ISWebGrid:WebGridColumn Name="Enter" Caption="Delete" ColumnType="Template" Width="40px"&amp;gt;
                &amp;lt;FooterStyle HorizontalAlign="Center" /&amp;gt;
                &amp;lt;CellStyle HorizontalAlign="Center" Width="40px"&amp;gt;
                &amp;lt;/CellStyle&amp;gt;
                &amp;lt;CellTemplate&amp;gt;
                    &amp;lt;img src='Delete.gif' style="cursor: hand;" onclick="deleteOnePW('&amp;lt;%#DataBinder.Eval(Container.DataItem,"Row_ID")%&amp;gt;','&amp;lt;%#DataBinder.Eval(Container.DataItem,"BeiZhu")%&amp;gt;');" /&amp;gt;
                &amp;lt;/CellTemplate&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;/span&gt;
        &amp;lt;/Columns&amp;gt;
    &amp;lt;/RootTable&amp;gt;
&amp;lt;/ISWebGrid:WebGrid&amp;gt;&lt;/pre&gt;
&lt;p&gt;Do you have any idea on what is causing this behaviour ?We need to fix this soon, kindly help&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item></channel></rss>