Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0
major thing is...
Textbox size wants to change according to the datagridview’s current cell in windows application...
 
All the cells in the datagridview going to enter the values through this textbox..
 
Throughout the datagridview we are using single textbox only...
 
So if we are in datagridview’s first cell means, the textbox must be changed according to datagridview’s current cell size (ie.,first cell of the dgv) and it wants to located there...
 
And then this process should be continue till the end of the cell in the dgv...
 

 
I am in troubling friends...
Please help me...
Thanks in Advance...
Posted 4-Sep-12 1:01am
Edited 6-Sep-12 0:27am
v4
Comments
Dasaradhi_r at 4-Sep-12 12:46pm
   
Excuse me, Your question is not very clear. Please rephrase it.
Sergey Alexandrovich Kryukov at 4-Sep-12 14:58pm
   
If is System.Windows.Forms.TextBox or something else? Always tag your application type or UI library you use. The question is not clear anyway. You can use "Improve question", to get any help.
--SA
manognya kota at 6-Sep-12 5:29am
   
do you mean that you want to have a editable grid view?
MThiyagaraja at 8-Sep-12 7:00am
   
yes mano .
 
1)textbox position,size will be render in every column of datagridview when navigating to one cell to another using c#.net(windows application)

2) DataGridview's every cell going to get input from this textbox (single textbox)only

3)For that textbox size, location must be render according to the currentcell of the datagridview

 

Private Sub show()
txtbox.Size=Grid.CurrentCell.Size
txtbox.Location= Grid.Location + Grid.GetCellDisplayRectangle(Grid.CurrentCell.ColumnIndex, Grid.CurrentCell.RowIndex,True)
txtbox.Visible= True
txtbox.Focus()
EndSub

By using the above vb.net code works fine and gives the output but not in c#.net.
Actually i am working with C#.net.

 

I need to do this task in c#.net
So Kindly convert it to c#.net
I tried a lot but i didn't get the solution..
Please help me.
Thanks in advance...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 340
1 OriginalGriff 210
2 DamithSL 170
3 Kornfeld Eliyahu Peter 130
4 Peter Leow 95
0 OriginalGriff 7,315
1 DamithSL 5,199
2 Sergey Alexandrovich Kryukov 4,917
3 Maciej Los 4,866
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web04 | 2.8.141223.1 | Last Updated 6 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100