﻿<?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 - How do I initailly set the WebGrid in Edit Mode?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/</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>How do I initailly set the WebGrid in Edit Mode?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/</link><pubDate>Tue, 11 Jan 2011 02:17:10 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Dear Douglas,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;A nightly build hotfix for WebGrid has been build and it has fixed your issue. I have tried them and it works nicely at my end.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Please find the attachment and do not hesitate to let me know if you have any further questions. Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Noted that this is a nightly build, any feedback regarding this build is really appreciated.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How do I initailly set the WebGrid in Edit Mode?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/</link><pubDate>Thu, 16 Dec 2010 14:22:55 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Dear Douglas,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;First of all, deeply apologize. It seems that the issue is still under investigation on our Developer Team Department.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;I have followed them up with a high priority, I will surely let you know as soon as possible when they've come with updates.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How do I initailly set the WebGrid in Edit Mode?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/</link><pubDate>Wed, 15 Dec 2010 02:55:37 GMT</pubDate><dc:creator>DJBadin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What is the status of the feature request to the developer team to support batch update in a template cell?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;</description></item><item><title>How do I initailly set the WebGrid in Edit Mode?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/</link><pubDate>Fri, 19 Feb 2010 08:11:38 GMT</pubDate><dc:creator>DJBadin</dc:creator><description>&lt;p&gt;The following setting helps a lot.&lt;/p&gt;
&lt;p&gt;WebGrid - LayoutSettings - EditOnClick&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;</description></item><item><title>How do I initailly set the WebGrid in Edit Mode?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/</link><pubDate>Fri, 12 Feb 2010 04:27:16 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Douglas,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; I am so sorry for the mistaken. I have forwarded this issue to our developer. This scenario, actually. is not being prepared and, by using template cell in batch update is not supported yet. I have already submitted this as a feature request to our developer team. At this moment, the best workaround is, by using a dropdown list as an edit type. Sorry for the inconvenience.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; I hope it helps. Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How do I initailly set the WebGrid in Edit Mode?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/</link><pubDate>Thu, 11 Feb 2010 18:34:27 GMT</pubDate><dc:creator>DJBadin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Apparently, you have sent me down a dead end from the beginning.&lt;/p&gt;
&lt;p&gt;You said to use a Template.&lt;/p&gt;
&lt;p&gt;My code example in my intial posting 3 days ago had the following properties:&lt;/p&gt;
&lt;p&gt;- LayoutSettings.AllowBatchUpdate="true"&lt;/p&gt;
&lt;p&gt;- LayoutSettings.BatchUpdateSettings.AllowReviewChanges="true"&lt;/p&gt;
&lt;p&gt;Now I understand you don't know how to make LayoutSettings.BatchUpdateSettings.AllowReviewChanges="true" work with Templates because it is kind of hard.&lt;/p&gt;
&lt;p&gt;What do the developers say?&lt;/p&gt;
&lt;p&gt;So, I try to forge ahead without the AllowReviewChanges and now AllowBatchUpdate is not working.&lt;/p&gt;
&lt;p&gt;In the Server Side BatchUpdate Event&lt;/p&gt;
&lt;p&gt;- there are e.PendingChanges&lt;/p&gt;
&lt;p&gt;- WebRowChanges.RowState is Modified&lt;/p&gt;
&lt;p&gt;But&lt;/p&gt;
&lt;p&gt;- WebRowChanges.Data is null&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;What am I to do?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;On top of that, the WebGrid Styles do not cascade to the DropDownList, even in your examples.  I have not figured out what the WebGrid Styles are so I can apply them to the DropDownList.&lt;/p&gt;
&lt;p&gt;You said "Because cell template is only attached on the WebGrid and not attached to a physical database.".&lt;/p&gt;
&lt;p&gt;So, how do we attach the template to the physical database?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>How do I initailly set the WebGrid in Edit Mode?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/</link><pubDate>Wed, 10 Feb 2010 21:43:06 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Douglas,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Unfortunately, there are no better way in doing this scenario. It is only a workaround and it is kind of hard if we want to threat this cell as a regular cell since it is only a template. Because cell template is only attached on the WebGrid and not attached to a physical database. For instance, we have a database with 4 attributes on it, then we create another 5th column of cell template and I do not think that we can include the data to restore into our database which only has 4 attributes on it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;So, I hope it helps and please, do not hesitate to ask if you have any other questions. Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;     &lt;/p&gt;</description></item><item><title>How do I initailly set the WebGrid in Edit Mode?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/</link><pubDate>Wed, 10 Feb 2010 19:45:53 GMT</pubDate><dc:creator>DJBadin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It is still not working completely.&lt;/p&gt;
&lt;p&gt;As for the pending changes issue, when using the "Reviewing Pending Changes" Feature, all that is displayed in the Changes Column is "}".  As a result, the changes can not be undone.&lt;/p&gt;
&lt;p&gt;As in my example, when the ColumnType is not a Template and the EditType is DropdownList, the Changes Column displays something like "{Priority_WebGridColumn=ASSESS -3}".  Plus, the changes can be undone.&lt;/p&gt;
&lt;p&gt;What is still missing?&lt;/p&gt;
&lt;p&gt;Is there a better way to do all this?&lt;/p&gt;
&lt;p&gt;- Register the Control with the BatchUpdate, AllowReviewChanges Features so we don't have to try to emulate it.&lt;/p&gt;
&lt;p&gt;- Another approach to setting the Row into Edit Mode&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>How do I initailly set the WebGrid in Edit Mode?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/</link><pubDate>Wed, 10 Feb 2010 06:18:54 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Douglas,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Yes, it would be the same. The different is, mine is created at behind code and yours is not. Attached is a sample on how to let the WebGrid recognize the changes on TemplateCell and on how to access the child control in server side. To access the child control, on WebGrid_OnInitializeRow server side, you will need to get the specific cell and assign as a template object. Before that, on you cs file, you will need to define what are the attribute for the Template cell its self.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;I hope it helps and please, do not hesitate to ask if you have any other questions. Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How do I initailly set the WebGrid in Edit Mode?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/</link><pubDate>Tue, 09 Feb 2010 17:46:54 GMT</pubDate><dc:creator>DJBadin</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Does this effectively do the same thing?&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGridColumn
	Name="PriorityCellTemplate_WebGridColumn"
	Bound="False"
	Caption="PRIORITY"
	ColumnType="Template"
	Width="100px"
&amp;gt;
	&amp;lt;CellTemplate&amp;gt;
		&amp;lt;asp:DropDownList 
			ID="RefurbPriority_DropDownList" 
			runat="server"
			SelectedValue='&amp;lt;%# Bind("REFURB_PRIORITY") %&amp;gt;'
		&amp;gt;
			&amp;lt;asp:ListItem Text="ASSESS - 1" Value="1" /&amp;gt;
			&amp;lt;asp:ListItem Text="ASSESS - 2" Value="2" /&amp;gt;
			&amp;lt;asp:ListItem Text="ASSESS - 3" Value="3" /&amp;gt;
			&amp;lt;asp:ListItem Text="DISPOSE" Value="D" /&amp;gt;
			&amp;lt;asp:ListItem Text="UNDECIDED" Value="" Selected="True" /&amp;gt;
		&amp;lt;/ASP:DropDownList&amp;gt;
	&amp;lt;/CellTemplate&amp;gt;
&amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
&lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If so, and as with your example when the following is added, LayoutSettings.AllowBatchUpdate and BatchUpdateSettings.AllowReviewChanges does not recognize changes to the Controls in the Template.&lt;/p&gt;
&lt;p&gt;What needs to be added?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;</description></item><item><title>How do I initailly set the WebGrid in Edit Mode?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/</link><pubDate>Mon, 08 Feb 2010 18:10:20 GMT</pubDate><dc:creator>DJBadin</dc:creator><description>&lt;p&gt;Currently the user has to click on the WebGrid Column and either Double-Click or start typing to get the DropDownList to appear.&lt;/p&gt;
&lt;p&gt;How do I initailly set the WebGrid in Edit Mode on either the Current Row and/or All Rows?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;pre&gt;&amp;lt;%@ Page Language="C#" AutoEventWireup="true" %&amp;gt;

&amp;lt;%@ Import Namespace="System.Data" %&amp;gt;


&amp;lt;%@ Register assembly="ISNet.WebUI.WebGrid" namespace="ISNet.WebUI.WebGrid" tagprefix="ISWebGrid" %&amp;gt;

&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;

&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;

&amp;lt;head runat="server"&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
    
	&amp;lt;script runat="server"&amp;gt;
		
		protected void _WebGrid_InitializeLayout(object sender, LayoutEventArgs e)
		{
			ISNet.WebUI.WebGrid.WebValueList Priority_WebValueList = _WebGrid.GetTableByName("").Columns.GetNamedItem("Priority_WebGridColumn").ValueList;

			SortedList Priority_SortedList = new SortedList();

			Priority_SortedList.Add("ASSESS - 1", "1");
			Priority_SortedList.Add("ASSESS - 2", "2");
			Priority_SortedList.Add("ASSESS - 3", "3");
			Priority_SortedList.Add("DISPOSE", "D");
			Priority_SortedList.Add("UNDECIDED", "");

			Priority_WebValueList.DataSource = Priority_SortedList;
			Priority_WebValueList.DataTextField = "Key";
			Priority_WebValueList.DataValueField = "Value";

			RefurbPriority_DropDownList.DataSource = Priority_SortedList;
			RefurbPriority_DropDownList.DataTextField = "Key";
			RefurbPriority_DropDownList.DataValueField = "Value";

			RefurbPriority_DropDownList.SelectedValue = "";

			RefurbPriority_DropDownList.DataBind();
		}


		protected void Company_DropDownList_PreRender(object sender, EventArgs e)
		{
			DropDownList _DropDownList = (DropDownList) sender;
			_DropDownList.Items.Insert(0, "--- PLEASE SELECT ---");
		}
				
	&amp;lt;/script&amp;gt;

&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
    &amp;lt;form id="form1" runat="server"&amp;gt;
    &amp;lt;div&amp;gt;

	&amp;lt;table&amp;gt;
		&amp;lt;tr&amp;gt;
			&amp;lt;td&amp;gt;PRIORITY&amp;lt;/td&amp;gt;
			&amp;lt;td&amp;gt;COMPANY&amp;lt;/td&amp;gt;
		&amp;lt;/tr&amp;gt;
		&amp;lt;tr&amp;gt;
			&amp;lt;td&amp;gt;
				&amp;lt;ASP:DROPDOWNLIST 
					ID="RefurbPriority_DropDownList" 
					runat="server"
				&amp;gt;
				&amp;lt;/ASP:DROPDOWNLIST&amp;gt;
			&amp;lt;/td&amp;gt;
			&amp;lt;td&amp;gt;
				&amp;lt;ASP:DROPDOWNLIST 
					ID="Company_DropDownList" 
					runat="server" 
					DataValueField="CustomerID"
					DataTextField="CompanyName"
					DataSourceID="Company_SqlDataSource"
					onPreRender="Company_DropDownList_PreRender"
				&amp;gt;
				&amp;lt;/ASP:DROPDOWNLIST&amp;gt;
				
			&amp;lt;/td&amp;gt;
		&amp;lt;/tr&amp;gt;
		&amp;lt;tr&amp;gt;
			&amp;lt;td colspan="2"&amp;gt;
				&amp;lt;ISWebGrid:WebGrid 
					ID="_WebGrid"
					runat="server"
					DataSourceID="Orders_SqlDataSource"
					Height="250px"
					UseDefaultStyle="True"
					DefaultStyleMode="Win7"
					OnInitializeLayout="_WebGrid_InitializeLayout"
				&amp;gt;
					&amp;lt;LayoutSettings
						AllowEdit="Yes"
						AllowSorting="Yes"
						AllowBatchUpdate="true"
					&amp;gt;
						&amp;lt;BatchUpdateSettings
							AllowReviewChanges="true"
							AutomaticObjectUpdate="false"
						/&amp;gt;
					&amp;lt;/LayoutSettings&amp;gt;
					&amp;lt;RootTable
						DataKeyField="OrderID"
					&amp;gt;
						&amp;lt;Columns&amp;gt;
							&amp;lt;ISWebGrid:WebGridColumn
								Name="Priority_WebGridColumn"
								Bound="True"
								DataMember="REFURB_PRIORITY"
								EditType="DropdownList"
								Caption="PRIORITY"
								Width="100px"
								NullText=""
								DefaultValue=""
								InputRequired="true"
								InputRequiredErrorText="Priority Needed"
							&amp;gt;
							&amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
							&amp;lt;ISWebGrid:WebGridColumn
								Name="Company_WebGridColumn"
								Bound="True"
								EditType="DropdownList"
								Caption="Company"
								Width="100px"
								InputRequired="false"
							&amp;gt;
								&amp;lt;ValueList
									DataSourceID="Company_SqlDataSource"
									DataTextField="CompanyName"
									DataValueField="CustomerID"
								&amp;gt;
								&amp;lt;/ValueList&amp;gt;
							&amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
							&amp;lt;ISWebGrid:WebGridColumn
								Caption="Order ID"
								EditType="NoEdit"
								DataMember="OrderID"
								Name="OrderID_WebGridColumn"
								Width="100px"
							&amp;gt;
								&amp;lt;CellStyle ForeColor="Black"/&amp;gt;
							&amp;lt;/ISWebGrid:WebGridColumn&amp;gt;

						&amp;lt;/Columns&amp;gt;
					&amp;lt;/RootTable&amp;gt;
				&amp;lt;/ISWebGrid:WebGrid&amp;gt;
				&amp;lt;/td&amp;gt;
		&amp;lt;/tr&amp;gt;
	&amp;lt;/table&amp;gt;
	
	&amp;lt;asp:SqlDataSource
		ID="Company_SqlDataSource"
		runat="server"
		ConnectionString="&amp;lt;%$ ConnectionStrings:NorthwindConnectionString2005 %&amp;gt;"
		SelectCommand="SELECT [CustomerID], [CompanyName] FROM [Customers] ORDER BY [CustomerID]"
	&amp;gt;&amp;lt;/asp:SqlDataSource&amp;gt;

	&amp;lt;asp:SqlDataSource
		ID="Orders_SqlDataSource"
		runat="server"
		ConnectionString="&amp;lt;%$ ConnectionStrings:NorthwindConnectionString2005 %&amp;gt;"
		SelectCommand="SELECT TOP 5 [OrderID], [CustomerID], '' AS REFURB_PRIORITY, '' AS GRAPHICS_NEW FROM [Orders] ORDER BY [OrderID]"
	&amp;gt;&amp;lt;/asp:SqlDataSource&amp;gt;

    &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;</description></item></channel></rss>