We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

HOw Popup TextBox In Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

118063 Jan 27,2015 02:04 PM UTC Feb 1,2015 05:22 PM UTC WinForms 3
loading
Tags: GridControl
Ankit
Asked On January 27, 2015 02:04 PM UTC

I want to popup textBox In Cell Of Grid MAnually



Muthukumar Kalyanasundaram [Syncfusion]
Replied On January 28, 2015 04:59 PM UTC

Hi Ankit,

 

Thank you for your interest in Syncfusion products.

 

If you want to show the popup textbox in a cell of grid, you can use “CellClick” event. In the event, you can use the “PopupContainer” class. Please refer the below code,

 

Code:

 

// main form

this.gridControl1.CellClick += new GridCellClickEventHandler(gridControl1_CellClick);

void gridControl1_CellClick(object sender, GridCellClickEventArgs e)

{

PopupContainer container = new PopupContainer();

Point pt = new Point(this.gridControl1.Location.X+520, this.gridControl1.Location.Y + 130 + this.gridControl1.Height - 10);

container.ShowPopup(pt);

}

 

// PopupContainer Class

public class PopupContainer  : PopupControlContainer

{

TextBox tbx = new TextBox();

public PopupContainer()

{

this.Controls.Add(tbx);

}

}

 

Please let us know if you have any concern.

 

Regards,

Muthukumar K



Attachment: PopupWindow_ff9e549b.zip

Revathi K [Syncfusion]
Replied On January 29, 2015 05:16 AM UTC

From: ankit patel [mailto:ankit_patel314@yahoo.com]
Sent: Wednesday, January 28, 2015 11:55 PM
To: Syncfusion Support
Subject: Re: Syncfusion support community forum 118063, HOw Popup TextBox In Grid, has been updated.

i require to display textbox within CurrentCell area Of Grid(manually).

My Code Is below

  private void GCColumn_KeyPress(object sender, KeyPressEventArgs e)
        {

            try
            {
                String idno;
                idno = this.GCColumn[gcColumn_Col_Id, this.GCColumn.CurrentCell.RowIndex].CellValue as String;
               
                if (this.GCColumn.CurrentCell.ColIndex == gcColumn_Col_ColumnName)
                {

                    if (e.KeyChar != (Char)Keys.Enter)
                        return;

                    Rectangle rect = this.GCColumn.RangeInfoToRectangle(GridRangeInfo.Cell(this.GCColumn.CurrentCell.RowIndex, this.GCColumn.CurrentCell.ColIndex));
                    //Point pt = this.GCColumn.GridPointToScreen(new Point(rect.Left, rect.Top));
                    //Point pt = this.GCColumn.ViewLayout.RowColToPoint(this.GCColumn.CurrentCell.RowIndex, this.GCColumn.CurrentCell.ColIndex,false);
                    //rect = this.GCColumn.GridRectangleToScreen(rect);

                    this.TxtColumnName.Size = rect.Size;
                    this.TxtColumnName.Location = rect.Location;
                    this.TxtColumnName.Visible = true;
                    this.TxtColumnName.BringToFront();
                    this.TxtColumnName.Text = this.GCColumn[this.GCColumn.CurrentCell.RowIndex,this.GCColumn.CurrentCell.ColIndex].CellValue as string;
                    this.TxtColumnName.Focus();
                   
                }
           
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }

        }



Muthukumar Kalyanasundaram [Syncfusion]
Replied On February 1, 2015 05:22 PM UTC

Hi Ankit,

 

Thank you for update.

 

We will update details for your reported query in that incident 134617. Please refer the incident for better follow up. We suggest you to logon your Direct trac account with your username and password to view your incidents.

 

Here is the link:

http://www.syncfusion.com:91/Support/DirectTrac/incidentview.aspx?incidentID= 134617

 

Please let me know if you have any concern.

 

Regards,

Muthukumar K


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;