I am using a datagri control on my web page. I edit, update and cancel on this control.
------------------------
OnCancelCommand="cmd_cancel">
-------------------------
The problem is when I click the edit button, textbox's showing at rows which I want to edit. No problem at this point. But This textbox's width is too long and I want to edit this textbox's lengths. How may I do that?
Sharad GuptaPosted Jul 3, 2012, 11:41 PM
2-After it stablish connection.
3-Take a asp control kike repeter ,datagrid etc.
4-And write that code into source code file;
sathish kumarPosted Jun 11, 2012, 8:06 AM
((Textbox)(e.rows[e.editIndex].cell[0].control[0])).width = 100px;
try this....
yokzuPosted Apr 5, 2012, 8:09 AM
But there is no textbox control on my code. I mean When I click the "edit", textbox's appears automatically.
-------------------------------------------------------------------
OnCancelCommand="komut_cancel" CellPadding="4" ForeColor="#333333" GridLines="None" Width="400px" >
-------------------------------------------------------------------
When I change the "editItemStyle" propeties above, I can change somethings but not textbox's.
SenthilkumarPosted Apr 5, 2012, 8:01 AM
You can restrict the width of the text box in either way
If you want to maintain this size in many problems then you are adivsed to do through css
.TextBox85
{
width:85px;
}
If you want to set the size at the time of editing then edit command,
you can find the control and set the width to it.