BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
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
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;
}
}
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