<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.dotnetzone.gr:443/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET WebForms</title><link>https://www.dotnetzone.gr:443/cs/forums/13/ShowForum.aspx</link><description>Θέματα για web εφαρμογές, σε ASP.NET WebForms</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: GridView &amp; RowCommand Event</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/59688.aspx</link><pubDate>Thu, 19 Aug 2010 00:14:03 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:59688</guid><dc:creator>Markos</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/59688.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=59688</wfw:commentRss><description>&lt;P&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://www.dotnetzone.gr/cs/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;m6s:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Τι είναι και τι αφορά τελικά το ASP.NET Form Control και το ASP.NET MVC τότε τι διαφορά έχει;&lt;BR&gt;&lt;BR&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/P&gt;
&lt;P&gt;Νομίζω ότι όλο το ζουμί βρίσκεται σ' αυτή την παράγραφο από το &lt;A href="http://msdn.microsoft.com/en-us/magazine/dd942833.aspx"&gt;άρθρο&lt;/A&gt; του Dino Esposito (έχω κάνει bold κάποια σημεία):&lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;When you write an ASP.NET MVC application, you think in terms of &lt;STRONG&gt;controllers&lt;/STRONG&gt; and &lt;STRONG&gt;views&lt;/STRONG&gt;. You make your decisions about how to pass data to the view and how to expose your middle tier to the controllers. &lt;STRONG&gt;The controller chooses which view to display&lt;/STRONG&gt; based on the requested URL and pertinent data. Each request is resolved by &lt;STRONG&gt;invoking a method&lt;/STRONG&gt; on a controller class. &lt;STRONG&gt;No postbacks are ever required to service a user request. No viewstate is ever required to persist the state of the page. No arraysof black-box server controls exist to produce the HTML for the browser&lt;/STRONG&gt;.&lt;/EM&gt;&lt;/P&gt;
&lt;DIV id=id0080021 class=ArticleNormalPara&gt;&lt;EM&gt;With ASP.NET MVC, you rediscover the good old taste of the Web—stateless behavior, full control over every single bit of HTML, total script and CSS freedom. &lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV id=id0080022 class=ArticleNormalPara&gt;&lt;EM&gt;The HTML served to the browser is generated by a separate, and replaceable, engine. &lt;STRONG&gt;There's no dependency on ASPX physical server files&lt;/STRONG&gt;. ASPX files may still be part of your project, but they now serve as plain HTML templates, along with their code-behind classes. The default view engine is based on the Web Forms rendering engine, but you can use other pluggable engines such as nVelocity or XSLT. (For more details, have a look at the MVCContrib Web site at mvccontrib.codeplex.com.)&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV id=id0080023 class=ArticleNormalPara&gt;&lt;EM&gt;The runtime environment is largely the same as in ASP.NET Web Forms, but the request cycle is simpler and more direct. &lt;STRONG&gt;An essential part of the Web Forms model, the page lifecycle, is no longer necessary in ASP.NET MVC&lt;/STRONG&gt;. It should be noted, though, that &lt;STRONG&gt;the default view engine in ASP.NET MVC is still based on the Web Forms rendering engine&lt;/STRONG&gt;. &lt;STRONG&gt;This&lt;/STRONG&gt; &lt;STRONG&gt;is the trick that allows you to use master pages and some server controls in ASP.NET MVC views&lt;/STRONG&gt;. As long as the view engine is based on Web Forms, the view is an ASPX file with a regular code-behind class where you can handle classic events such as Init, Load, PreRender, plus control-specific events such as RowDataBound for a GridView control. If you switch off the default view engine, you no longer need Page_Loador other events of the standard page lifecycle."&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class=ArticleNormalPara&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=ArticleNormalPara&gt;Πάντως, σίγουρα μέσω routing μπορείς να βάλεις webforms σε mvc project. Θέλει λίγο διάβασμα.&lt;/DIV&gt;
&lt;DIV class=ArticleNormalPara&gt;&amp;nbsp;&lt;/DIV&gt;</description></item><item><title>Απ: GridView &amp; RowCommand Event</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/59687.aspx</link><pubDate>Wed, 18 Aug 2010 23:53:30 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:59687</guid><dc:creator>m6s</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/59687.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=59687</wfw:commentRss><description>Τι είναι και τι αφορά τελικά το ASP.NET Form Control και το ASP.NET MVC τότε τι διαφορά έχει;&lt;br&gt;&lt;br&gt;</description></item><item><title>Απ: GridView &amp; RowCommand Event</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/59686.aspx</link><pubDate>Wed, 18 Aug 2010 23:42:31 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:59686</guid><dc:creator>Markos</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/59686.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=59686</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://www.dotnetzone.gr/cs/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;George J. Capnias:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;
&lt;P&gt;Τα ASP.NET Form controls δεν παίζουν μέσα σε ASP.NET MVC projects...&lt;/P&gt;
&lt;P&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/P&gt;
&lt;P&gt;&lt;img src="http://www.dotnetzone.gr/cs/emoticons/emotion-3.gif" alt="Surprise" /&gt;Μάλιστα... πιάστηκα αδιάβαστος. Πάντως θα πρέπει να υπάρχει κάποιος τρόπος να προσθέσεις Web Forms&amp;nbsp;σε MVC project.&lt;/P&gt;</description></item><item><title>Απ: GridView &amp; RowCommand Event</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/59685.aspx</link><pubDate>Wed, 18 Aug 2010 23:34:04 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:59685</guid><dc:creator>m6s</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/59685.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=59685</wfw:commentRss><description>ΩΧ! Σοβαρά;&lt;br&gt;Για αυτό παιδεύωμαι τόσο καιρό;&lt;br&gt;Παιδιά έχω φάει τέτοια απογοήτευση που δεν προφέρεται!&lt;br&gt;&lt;br&gt;Ξεκίνησα δοκιμάζωντας τα infragistics γιατί τα δούλευα σε winform ( και είναι τέλεια εκεί ) , αλλά σε asp.net mvc2 έφαγα πολλά άκυρα.&lt;br&gt;Γυρνάω στην λύση την απλή των datagrid/gridview και με τα πολλά έφτασα εδώ.ΩΧ! Μιλάμε για μέρες ακόμα και στην άδεια μου!&lt;br&gt;&lt;br&gt;Είναι σίγουρο αυτό; &lt;br&gt;&lt;br&gt;Δείτε το κώδικα στο http://pastebin.com/G8G3bAHm , αν γίνεται!&lt;br&gt;Εκεί, έχω καταφέρει το DropDownList, σύνδεση με mysql...όλα! Το μόνο που δεν πιάνει είναι το Click!&lt;br&gt;&lt;br&gt;Και κερνάω καφέ! Το λιγότερο! :-))&lt;br&gt;</description></item><item><title>Απ: GridView &amp; RowCommand Event</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/59684.aspx</link><pubDate>Wed, 18 Aug 2010 23:15:34 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:59684</guid><dc:creator>George J. Capnias</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/59684.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=59684</wfw:commentRss><description>&lt;P&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://www.dotnetzone.gr/cs/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;m6s:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;BR&gt;Εδώ είναι το πώς ξεκινάει&amp;nbsp; η σελίδα :&lt;BR&gt;&amp;lt;%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inherits="System.Web.Mvc.ViewPage&amp;lt;IEnumerable&amp;lt;Test.Models.company&amp;gt;&amp;gt;" EnableViewState="true" %&amp;gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;Τι κάνω λάθος;&lt;BR&gt;&lt;BR&gt;( Είναι μέσα σε asp:Content το gridview το οποίο είναι και αυτό μέσα σε ένα form tag. )&lt;BR&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/P&gt;
&lt;P&gt;Τα ASP.NET Form controls δεν παίζουν μέσα σε ASP.NET MVC projects =&amp;gt; το control που χρησιμοποιείς δεν θα "τρέξει".&amp;nbsp;Οι επιλογές σου είναι είτε να καταφύγεις σε MVC extensions που έχουν φτιαχτεί να κάνουν παρόμοια δουλειά ή να δεις extensions του&amp;nbsp;MVC framework από τρίτους κατασκευαστές που προσφέρουν παρόμοια λειτουργικότητα...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;George J.&lt;BR&gt;&lt;/P&gt;</description></item><item><title>Απ: GridView &amp; RowCommand Event</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/59683.aspx</link><pubDate>Wed, 18 Aug 2010 22:57:34 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:59683</guid><dc:creator>Markos</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/59683.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=59683</wfw:commentRss><description>&lt;P&gt;&lt;U&gt;Ερώτηση&lt;/U&gt;: Αφού κόβεις το PostBack, πως θα εκτελεστεί το event; Βγάλε το OnClientClick από το button. Επίσης, ρίξε και μια ματιά στο &lt;A href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.updaterow.aspx"&gt;UpdateRow&lt;/A&gt; method του GridView για να δεις αν στον κώδικά σου ισχύουν οι προϋποθέσεις που αναφέρονται στο Note:&lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;This method can be called only for the row that is currently in edit mode, or for a row that contains a two-way data-bound input control. For more information about two-way binding expressions, see &lt;SPAN&gt;&lt;A id=ctl00_MTCS_main_ctl43_ctl00_ctl02 href="http://msdn.microsoft.com/en-us/library/ms178361.aspx"&gt;&lt;FONT color=#800080&gt;Binding to Databases&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/EM&gt;."&lt;/P&gt;</description></item><item><title>Απ: GridView &amp; RowCommand Event</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/59682.aspx</link><pubDate>Wed, 18 Aug 2010 22:02:40 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:59682</guid><dc:creator>m6s</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/59682.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=59682</wfw:commentRss><description>Καλημέρα Μάρκο,&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Δεν προσπαθώ να κάνω κάτι override θέλω να εκτελέσω ένα event, σε κάθε γραμμή.&lt;/div&gt;&lt;div&gt;Σκέψου δηλαδή ότι το σενάριο είναι :&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;1. Εχω gridview με γραμμές.&lt;/div&gt;&lt;div&gt;2. Σε κάθε γραμμή έχω ένα κουμπί(ButtonField) ( μπορούσε να είναι και link! αλλά και αυτό μου δημιούργησε θέματα )&lt;/div&gt;&lt;div&gt;3. Πατώντας το κουμπί, να ανοίξει μια σελίδα, που να έχει και μια τιμή κρατήσει π.χ. το Primary Key της γραμμής που ανήκει το κουμπί.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Παραθέτω το GridView, &amp;nbsp;[και πρόσεξε ( αν θές ) ότι δοκίμασα και με templatefield να έχω κουμπί από ένα tutorial της microsoft&lt;/div&gt;&lt;div&gt;και προσπάθησα να κόψω το PostBack....] :&lt;/div&gt;&lt;div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:#f2f2f2;border:solid 1px #e5e5e5;"&gt;&lt;tr style="vertical-align:top;line-height:normal;"&gt;&lt;td style="width:40px;text-align:right;"&gt;&lt;pre style="font-family:courier new;font-size:11px;color:gray;margin:0px;padding:2px;border-right:solid 1px #e7e7e7;"&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 &lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style="margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&amp;lt;fieldset&amp;gt;
		&amp;lt;cc2:DataGridBase ID=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"GridBase1"&lt;/span&gt; runat=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"server"&lt;/span&gt; CssClass=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"grid"&lt;/span&gt; AutoGenerateColumns=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"False"&lt;/span&gt;
			ShowFooter=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"true"&lt;/span&gt; AutoGenerateEditButton=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"true"&lt;/span&gt; OnRowCommand=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"GridBase1_RowCommand"&lt;/span&gt;
			DataKeyNames=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"CompanyId, DepartmentId"&lt;/span&gt; EnableViewState=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"true"&lt;/span&gt;&amp;gt;
			&amp;lt;Columns&amp;gt;
				&amp;lt;asp:ButtonField ButtonType=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Button"&lt;/span&gt; CommandName=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Select"&lt;/span&gt; HeaderText=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Open Web Page"&lt;/span&gt;
					Text=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"New Webpage"&lt;/span&gt;&amp;gt;
					&amp;lt;ControlStyle Font-Size=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"X-Small"&lt;/span&gt; /&amp;gt;
				&amp;lt;/asp:ButtonField&amp;gt;
				&amp;lt;asp:TemplateField&amp;gt;
					&amp;lt;ItemTemplate&amp;gt;
						&amp;lt;asp:Button runat=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"server"&lt;/span&gt; ID=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"IncreaseButton"&lt;/span&gt; Text=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Increase Price 5%"&lt;/span&gt; CommandName=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Increase"&lt;/span&gt;
							OnClientClick=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"return false;"&lt;/span&gt; CommandArgument=&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"&amp;lt;%# ((GridViewRow) Container).RowIndex %&amp;gt;"&lt;/span&gt; /&amp;gt;
					&amp;lt;/ItemTemplate&amp;gt;
				&amp;lt;/asp:TemplateField&amp;gt;
			&amp;lt;/Columns&amp;gt;
		&amp;lt;/cc2:DataGridBase&amp;gt;
	&amp;lt;/fieldset&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Και εδώ είναι το event το ίδιο :&lt;/div&gt;&lt;div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:#f2f2f2;border:solid 1px #e5e5e5;"&gt;&lt;tr style="vertical-align:top;line-height:normal;"&gt;&lt;td style="width:40px;text-align:right;"&gt;&lt;pre style="font-family:courier new;font-size:11px;color:gray;margin:0px;padding:2px;border-right:solid 1px #e7e7e7;"&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 &lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style="margin:0px;padding:2px;padding-left:8px;"&gt;&lt;span style="color:Black;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;void&lt;/span&gt; GridBase1_RowCommand(Object sender, GridViewCommandEventArgs e) {
			&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// If multiple buttons are used in a GridView control, use the&lt;/span&gt;
			&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// CommandName property to determine which button was clicked.&lt;/span&gt;
			&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;if&lt;/span&gt; ( e.CommandName == &lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"Increase"&lt;/span&gt; ) {
				&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// Convert the row index stored in the CommandArgument&lt;/span&gt;
				&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// property to an Integer.&lt;/span&gt;
				&lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;int&lt;/span&gt; index &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; Convert.ToInt32(e.CommandArgument);

				&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// Retrieve the row that contains the button clicked &lt;/span&gt;
				&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// by the user from the Rows collection.      &lt;/span&gt;
				GridViewRow row &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; GridBase1.Rows[index];

				&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// Calculate the new price.&lt;/span&gt;
				Label listPriceTextBox &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (Label)row.FindControl(&lt;span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;"PriceLabel"&lt;/span&gt;);
				listPriceTextBox.Text &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;=&lt;/span&gt; (Convert.ToDouble(listPriceTextBox.Text) &lt;span style="color:Red;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;*&lt;/span&gt; 1.05).ToString();

				&lt;span style="color:Green;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;// Update the row.&lt;/span&gt;
				GridBase1.UpdateRow(index, &lt;span style="color:Blue;background-color:Transparent;font-family:Courier New;font-size:11px;font-weight:normal;"&gt;false&lt;/span&gt;);
			}&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Ελπίζω να βοηθάει η παράθεση μου....&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;</description></item><item><title>Απ: GridView &amp; RowCommand Event</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/59680.aspx</link><pubDate>Wed, 18 Aug 2010 19:32:47 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:59680</guid><dc:creator>Markos</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/59680.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=59680</wfw:commentRss><description>&lt;P&gt;Καλημέρα,&lt;/P&gt;
&lt;P&gt;Έχεις κάποια derived κλάση και θέλεις να κάνεις override το &lt;A href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.onrowcommand.aspx"&gt;OnRowCommand&lt;/A&gt; ή θέλεις να εκτέλεσεις ένα command; Τι τιμή έχει το CommandName; Αν πρόκειται για τη δεύτερη περίπτωση, το CommandName παίρνει &lt;A href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowcommand.aspx"&gt;συγκεκριμένες τιμές&lt;/A&gt;&amp;nbsp;και ανάλογα με την τιμή γίνεται raise συγκεκριμένο event.&lt;/P&gt;</description></item><item><title>GridView &amp; RowCommand Event</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/59679.aspx</link><pubDate>Wed, 18 Aug 2010 10:23:37 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:59679</guid><dc:creator>m6s</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/59679.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=59679</wfw:commentRss><description>Καλησπέρα,&lt;br&gt;&lt;br&gt;Εχω ένα gridview. Το datasource είναι ένα linq αποτέλεσμα. Και έχω ένα ButtonField. Όρισα CommandName, και sτο gridview το OnRowCommand είναι "δεμένο" με το event "GridBase1_RowCommand".&lt;br&gt;Ότι και να κάνω, όποια παραλαγή ( ακόμα και στον τύπο του Field του ίδιου),&lt;br&gt;δεν ενεργοποιείται το event : &lt;br&gt;void GridBase1_RowCommand(Object sender, GridViewCommandEventArgs e).&lt;br&gt;&lt;br&gt;Το event το έχω στην ίδια την aspx σελίδα, δεν έχω CodeBehind ορίσει.&lt;br&gt;Απλά μοιάζει σαν να κάνει ανανέωση την σελίδα...τίποτα άλλο! :-(&lt;br&gt;Κάπου σε κάποιο φορουμ διάβασα το EnableViewState να είναι true. Δεν βοήθησε.&lt;br&gt;&lt;br&gt;Εδώ είναι το πώς ξεκινάει&amp;nbsp; η σελίδα :&lt;br&gt;&amp;lt;%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inherits="System.Web.Mvc.ViewPage&amp;lt;IEnumerable&amp;lt;Test.Models.company&amp;gt;&amp;gt;" EnableViewState="true" %&amp;gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Τι κάνω λάθος;&lt;br&gt;&lt;br&gt;( Είναι μέσα σε asp:Content το gridview το οποίο είναι και αυτό μέσα σε ένα form tag. )&lt;br&gt;</description></item></channel></rss>