<?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>WinForms</title><link>https://www.dotnetzone.gr:443/cs/forums/12/ShowForum.aspx</link><description>Θέματα για rich client / windows εφαρμογές, σε οποιαδήποτε γλώσσα (VB.NET, C#, managed C++, κ.α.)</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: Μετακίνηση σε datagridview</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/15291.aspx</link><pubDate>Sat, 29 Jul 2006 00:23:37 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:15291</guid><dc:creator>gmlogic</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/15291.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=12&amp;PostID=15291</wfw:commentRss><description>&lt;P&gt;Πάνο δοκίμασε αυτό σε μένα δουλεύει &lt;/P&gt;
&lt;P&gt;------------------------------------------------------&lt;BR&gt;&lt;BR&gt;Public Class MyDataGridView&lt;BR&gt;&lt;BR&gt;'this tells this class that is a datagridview&lt;BR&gt;&lt;BR&gt;Inherits System.Windows.Forms.DataGridView&lt;BR&gt;&lt;BR&gt;'Dim titleColumn As New DataGridViewTextBoxColumn()&lt;BR&gt;&lt;BR&gt;'this function do the half of job &lt;BR&gt;&lt;BR&gt;'when you hit a key (like return) it transforms like you &lt;BR&gt;&lt;BR&gt;'have been hit the tab key&lt;BR&gt;&lt;BR&gt;'this doent work when you are editing the cell&lt;BR&gt;&lt;BR&gt;Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean&lt;BR&gt;&lt;BR&gt;If keyData = Keys.Return Then&lt;BR&gt;&lt;BR&gt;keyData = Keys.Tab&lt;BR&gt;&lt;BR&gt;With msg&lt;BR&gt;&lt;BR&gt;.WParam = Keys.Tab&lt;BR&gt;&lt;BR&gt;End With&lt;BR&gt;&lt;BR&gt;End If&lt;BR&gt;&lt;BR&gt;Return MyBase.ProcessCmdKey(msg, keyData)&lt;BR&gt;&lt;BR&gt;End Function&lt;BR&gt;&lt;BR&gt;'this second function works when you are editing the cell&lt;BR&gt;&lt;BR&gt;'does the same as the function above changing return for tab&lt;BR&gt;&lt;BR&gt;Protected Overrides Function ProcessDialogKey(ByVal keyData As System.Windows.Forms.Keys) As Boolean&lt;BR&gt;&lt;BR&gt;If keyData = Keys.Return Then&lt;BR&gt;&lt;BR&gt;keyData = Keys.Tab&lt;BR&gt;&lt;BR&gt;End If&lt;BR&gt;&lt;BR&gt;Return MyBase.ProcessDialogKey(keyData)&lt;BR&gt;&lt;BR&gt;End Function&lt;BR&gt;&lt;BR&gt;'Protected Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs)&lt;BR&gt;&lt;BR&gt;' If e.KeyCode = Keys.Enter Then&lt;BR&gt;&lt;BR&gt;' SendKeys.Send("{TAB}")&lt;BR&gt;&lt;BR&gt;' Else&lt;BR&gt;&lt;BR&gt;' MyBase.OnKeyDown(e)&lt;BR&gt;&lt;BR&gt;' End If&lt;BR&gt;&lt;BR&gt;'End Sub&lt;BR&gt;&lt;BR&gt;End Class&lt;/P&gt;</description></item><item><title>Απ: Μετακίνηση σε datagridview</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/15221.aspx</link><pubDate>Wed, 26 Jul 2006 22:30:05 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:15221</guid><dc:creator>Panos Kousidis</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/15221.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=12&amp;PostID=15221</wfw:commentRss><description>&lt;P&gt;Δες &lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=414647&amp;amp;SiteID=1&amp;amp;PageID=0"&gt;αυτό&lt;/A&gt; κι αν καταλάβεις τι πρέπει να κάνεις ακριβώς πες μου κι εμένα γιατί έχω κολλήσει &lt;/P&gt;</description></item><item><title>Απ: Μετακίνηση σε datagridview</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/15117.aspx</link><pubDate>Sun, 23 Jul 2006 08:07:37 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:15117</guid><dc:creator>gmlogic</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/15117.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=12&amp;PostID=15117</wfw:commentRss><description>Μάνο σε ευχαριστώ πολύ για την απάντηση &lt;br /&gt;
&lt;br /&gt;
Αλλά δεν κατάφερα να λύσω το πρόβλημα&lt;br /&gt;
&lt;br /&gt;
Όταν λές  "Μόλις μπαίνεις σε Edit mode, ο έλεγχος περνάει στο DataGridViewTextBoxColumn control του αντίστοιχου cell. Θα πρέπει κι εκεί να κάνεις κάτι ανάλογο υποθέτω."&lt;br /&gt;
&lt;br /&gt;
δεν καταλαβένω τι ακριβώς να κάνω.&lt;br /&gt;
&lt;br /&gt;
Μπορείς σε παρακαλώ να με βοηθήσης με λίγο κώδικα&lt;br /&gt;
&lt;br /&gt;
Ευχαριστώ εκ των προτέρων&lt;br /&gt;
&lt;br /&gt;</description></item><item><title>Απ: Μετακίνηση σε datagridview</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/14877.aspx</link><pubDate>Tue, 18 Jul 2006 19:37:25 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:14877</guid><dc:creator>KelMan</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/14877.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=12&amp;PostID=14877</wfw:commentRss><description>Μόλις μπαίνεις σε Edit mode, ο έλεγχος περνάει στο DataGridViewTextBoxColumn control του αντίστοιχου cell. Θα πρέπει κι εκεί να κάνεις κάτι ανάλογο υποθέτω. &lt;BR&gt;&lt;BR&gt;Ένας γρήγορος τρόπος για να μην γράφεις εσύ όλοκληρο τον κώδικα είναι να χρησιμοποιήσεις τον designer κανονικά με ένα standard DataGridView και κατόπιν να πας μέσα στην Partial Class του designer και να αλλάξεις το declaration και το instatiation από system.Windows.Forms.DataGridView π.χ. σε MyDataGridView. Αντίστοιχα, αν φτιάξεις και MyDataGridViewTextBoxColumn, τότε άλλαξε και όλα τα DataGridViewTextBoxColumn όπως προηγουμένως. Καλό θα είναι τέλος να περάσεις αυτόν τον κώδικα σε μια δική σου ρουτίνα γιατί υπάρχει μεγάλη πιθανότητα να τον κάνει overwrite ο designer αν κάνεις αλλαγές στη φόρμα.</description></item><item><title>Απ: Μετακίνηση σε datagridview</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/14873.aspx</link><pubDate>Tue, 18 Jul 2006 18:23:34 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:14873</guid><dc:creator>gmlogic</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/14873.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=12&amp;PostID=14873</wfw:commentRss><description>Μάνο δούλεψε μερικώς&lt;br /&gt;
&lt;br /&gt;
Δηλ.όταν είναι πάνω στο Grid  με enter μεταφέρετε στο διπλανό κελί αλλά&lt;br /&gt;
&lt;br /&gt;
όταν είσαι μέσα στο κελί δηλ σε edit του cell τότε με enter μεταφέρετε στη από κάτω γραμμή&lt;br /&gt;
&lt;br /&gt;
Υ.Γ&lt;br /&gt;
&lt;br /&gt;
Αν κατάλαβα καλά για να εφαρμόσω αυτά που μου είπες, γιατί το κάνω πρώτη φορά, δεν μπορώ μέσω designer αλλά κάπως έτσι.&lt;br /&gt;
&lt;br /&gt;
Dim WithEvents dgTIM45 As New MyDataGridView&lt;br /&gt;
&lt;br /&gt;
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle&lt;br /&gt;
&lt;br /&gt;
DataGridViewCellStyle1 = New DataGridViewCellStyle&lt;br /&gt;
&lt;br /&gt;
DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft&lt;br /&gt;
&lt;br /&gt;
        DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.ActiveCaption&lt;br /&gt;
&lt;br /&gt;
        DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(161, Byte))&lt;br /&gt;
&lt;br /&gt;
        DataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(128, Byte), Integer))&lt;br /&gt;
&lt;br /&gt;
        DataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.GreenYellow&lt;br /&gt;
&lt;br /&gt;
        DataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.Red&lt;br /&gt;
&lt;br /&gt;
        DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]&lt;br /&gt;
&lt;br /&gt;
        Me.dgTIM45.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1&lt;br /&gt;
&lt;br /&gt;
        Me.dgTIM45.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize&lt;br /&gt;
&lt;br /&gt;
        Me.dgTIM45.Location = New System.Drawing.Point(8, 117)&lt;br /&gt;
&lt;br /&gt;
        Me.dgTIM45.Name = "dgTIM45"&lt;br /&gt;
&lt;br /&gt;
        Me.dgTIM45.Size = New System.Drawing.Size(840, 227)&lt;br /&gt;
&lt;br /&gt;
        Me.dgTIM45.TabIndex = 138&lt;br /&gt;
&lt;br /&gt;
        Me.Controls.Add(Me.dgTIM45)&lt;br /&gt;
&lt;br /&gt;</description></item><item><title>Απ: Μετακίνηση σε datagridview</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/14854.aspx</link><pubDate>Tue, 18 Jul 2006 03:45:54 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:14854</guid><dc:creator>KelMan</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/14854.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=12&amp;PostID=14854</wfw:commentRss><description>&lt;P&gt;Δοκίμασε αυτή τη προσέγγιση, να κάνεις inherit το DataGridView και να κάνεις override της OnKeyDown&lt;/P&gt;
&lt;P&gt;&lt;span style="color: Black;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;Public&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;Class&lt;/span&gt; MyDataGridView&lt;br /&gt;    &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;Inherits&lt;/span&gt; DataGridView&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;Protected&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;Overrides&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;Sub&lt;/span&gt; OnKeyDown(&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;ByVal&lt;/span&gt; e &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;As&lt;/span&gt; System.Windows.Forms.KeyEventArgs)&lt;br /&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.KeyCode &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; Keys.Enter &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;Then&lt;/span&gt;&lt;br /&gt;            SendKeys.Send(&lt;span style="color: #666666;background-color: #e4e4e4;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;"{RIGHT}"&lt;/span&gt;)&lt;br /&gt;        &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;Else&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;MyBase&lt;/span&gt;.OnKeyDown(e)&lt;br /&gt;        &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;End&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;&lt;br /&gt;    &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;End&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;End&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;Class&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Μετακίνηση σε datagridview</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/14838.aspx</link><pubDate>Mon, 17 Jul 2006 19:04:11 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:14838</guid><dc:creator>gmlogic</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/14838.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=12&amp;PostID=14838</wfw:commentRss><description>&lt;P&gt;Μήπως ξέρει κανείς πως γίνετε με το enter να γίνετε η μετακίνηση στο διπλανό κελί ενός datagridview&lt;/P&gt;
&lt;P&gt;Γιατί με το enter μετακινήτε στη επόμενη γραμμή και αν&amp;nbsp; &lt;FONT color=#008000 size=2&gt;SendKeys.Send("{TAB}") ή&amp;nbsp;&lt;FONT color=#008000 size=2&gt;'SendKeys.Send("{RIGHT}") &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;αντί για enter, τότε μετακινήτε στη επόμενη γραμμή και στο έπομενο κελί&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT color=#000000&gt;Σας ευχαριστώ πολύ&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;Υ.Γ.&lt;/P&gt;
&lt;P&gt;SOSSSSSSSSS&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;/FONT&gt;</description></item></channel></rss>