Hi,
I've been searching the forum for an answer to this question for days and it appears that no one has covered it before. I'm using InPlaceEdit mode for my RadGrid control. When I put it into edit mode, the size of the text fields that show up stretch the page I'm using quite a bit.
Question: Is there a way to customize the width of the textboxes that appear in the RadGrid edit mode's inplace edit mode?
I've been searching the forum for an answer to this question for days and it appears that no one has covered it before. I'm using InPlaceEdit mode for my RadGrid control. When I put it into edit mode, the size of the text fields that show up stretch the page I'm using quite a bit.
Question: Is there a way to customize the width of the textboxes that appear in the RadGrid edit mode's inplace edit mode?
7 Answers, 1 is accepted
0
Jonathan
Top achievements
Rank 1
answered on 03 Sep 2010, 04:27 AM
It appears that my question has an alternative answer as shown by this helpful video. Thanks anyway.
0
Elmar De Groot
Top achievements
Rank 1
answered on 15 Jun 2011, 05:17 PM
Not sure whether this is one of the solutions discussed in the video as I didn't take the time to watch the video as it took to long...
Anyway the easiest solution (to the best of my knowledge) is to add a css class with the following definition:
and then reference this css class in your bound column like so:
This way the text editor will follow the size that you have set in your gridcolumn.
Ciao,
Elmar
Anyway the easiest solution (to the best of my knowledge) is to add a css class with the following definition:
.maximize input[type=text] {
width
:
100%
; }
and then reference this css class in your bound column like so:
<
telerik:gridboundcolumn
datafield
=
"Name"
headertext
=
"Name"
headerstyle-width
=
"200px"
itemstyle-cssclass
=
"maximize"
/>
This way the text editor will follow the size that you have set in your gridcolumn.
Ciao,
Elmar
0
Iman
Top achievements
Rank 1
answered on 25 May 2012, 01:28 AM
hi
i have same problem, but my column is GridNumericColum and input box is RadNumericTextBox
your CssClass is work properly for input[type=text] and dont work for RadNumericTextBox!
are you have any suggestion?
i have same problem, but my column is GridNumericColum and input box is RadNumericTextBox
your CssClass is work properly for input[type=text] and dont work for RadNumericTextBox!
are you have any suggestion?
0
Shinu
Top achievements
Rank 2
answered on 25 May 2012, 06:53 AM
Hello Iman,
One suggestion is you can access the column in edit mode and set the width as shown below.
C#:
Thanks,
Shinu.
One suggestion is you can access the column in edit mode and set the width as shown below.
C#:
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridEditableItem && e.Item.IsInEditMode)
{
GridEditableItem item = (GridEditableItem)e.Item;
RadNumericTextBox txt = (RadNumericTextBox)item[
"Numeric"
].Controls[0];
txt.Width = Unit.Pixel(160);
}
}
Thanks,
Shinu.
0
Iman
Top achievements
Rank 1
answered on 25 May 2012, 07:11 AM
hi Shinu
Tank you for your replay.
I founded it after research but i have to many Numeric column in my grid.
however, now i have another question,
did has any way to set
regards.
Tank you for your replay.
I founded it after research but i have to many Numeric column in my grid.
however, now i have another question,
did has any way to set
RadNumericTextBox
inGridEditableItem
without programmatically?regards.
0
Ramon
Top achievements
Rank 2
answered on 12 Jan 2014, 10:09 PM
some JQuery:
in this case id*=Text means that the control contains, somewhere in the name, the UniqueName you assigned to the column.
UniqueName="Text"
which is inside the .rgEditRow at edit time
$telerik.$(document).ready(function () {
$telerik.$(".rgEditRow :input[id*=Text]").width("400px");
});
UniqueName="Text"
which is inside the .rgEditRow at edit time
0
Sabaratnam
Top achievements
Rank 1
answered on 15 Sep 2016, 07:18 PM
Thanks a lot Elmar for your post.
It saved me a lot of trouble.
[quote]Elmar De Groot said:Not sure whether this is one of the solutions discussed in the video as I didn't take the time to watch the video as it took to long...
Anyway the easiest solution (to the best of my knowledge) is to add a css class with the following definition:
.maximize input[type=text] {
width
:
100%
; }
and then reference this css class in your bound column like so:
<
telerik:gridboundcolumn
datafield
=
"Name"
headertext
=
"Name"
headerstyle-width
=
"200px"
itemstyle-cssclass
=
"maximize"
/>
This way the text editor will follow the size that you have set in your gridcolumn.
Ciao,
Elmar[/quote]