Im creating a delete column in the codebehind like this:
it does what it needs to but if I click on my edit column or add a row the width of the delete column changes. I view the source and what I see is the <td style="width:50px;"> to <td> . Weird? or do you have a clue as to what is going on. Please do just send me to some random code sample, this has always been a waste of time.
if
(hasRWPerm && UserSettings.CheckSetting(Page_UserSettings, Page_Cab.CabRealName,
"deleteFolders"
))
{
#region delete_folder
GridClientDeleteColumn btnDelete =
new
GridClientDeleteColumn();
btnDelete.ButtonType = GridButtonColumnType.LinkButton;
btnDelete.CommandName = DELETE;
btnDelete.Text = DELETE;
//btnDelete.HeaderText = "Deleted";
btnDelete.UniqueName =
"deleteRow"
;
btnDelete.Resizable =
false
;
btnDelete.ShowInEditForm =
true
;
btnDelete.ItemStyle.Width = Unit.Pixel(50);
btnDelete.ConfirmText =
"Do you want to delete this folder?"
;
RadGridCabFolders.MasterTableView.Columns.Add(btnDelete);
#endregion
}
7 Answers, 1 is accepted
0
Hello,
To set GridClientDeleteColumn width properly you should use HeaderStyle.Width instead ItemStyle.Width. Please try changing your code as shown below and let me know how it goes:
Note that it is not recommended to use ItemStyle.Width for setting columns width.
All the best,
Pavlina
the Telerik team
To set GridClientDeleteColumn width properly you should use HeaderStyle.Width instead ItemStyle.Width. Please try changing your code as shown below and let me know how it goes:
btnDelete.HeaderStyle.Width = Unit.Pixel(50);
Note that it is not recommended to use ItemStyle.Width for setting columns width.
All the best,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0

Fred
Top achievements
Rank 1
answered on 03 Jan 2012, 02:47 PM
if only it were that simple. I had originally did this and just tried it again. This was not the answer. when I view source the html for that row looks like this:
<colgroup>
<col style="display:none;" />
<col style="display:none;" />
<col style="display:none;" />
<col />
<col />
<col />
<col style="display:none;" />
<col />
<col style="width:30px" />
<col />
</colgroup>
the correct on looks like this:
<colgroup>
<col style="display:none;" />
<col style="display:none;" />
<col style="display:none;" />
<col />
<col />
<col />
<col style="display:none;" />
<col />
<col style="width:30px" />
<col style="width:50px" />
</colgroup>
as you can see using the headerstyle does essentialy the same thing. it comes in correct but when you hit the edit column the header style goes missing. I thought mayme it was the column position but it is definitely the delete column. no matter where I put it the width code disapears.
<colgroup>
<col style="display:none;" />
<col style="display:none;" />
<col style="display:none;" />
<col />
<col />
<col />
<col style="display:none;" />
<col />
<col style="width:30px" />
<col />
</colgroup>
the correct on looks like this:
<colgroup>
<col style="display:none;" />
<col style="display:none;" />
<col style="display:none;" />
<col />
<col />
<col />
<col style="display:none;" />
<col />
<col style="width:30px" />
<col style="width:50px" />
</colgroup>
as you can see using the headerstyle does essentialy the same thing. it comes in correct but when you hit the edit column the header style goes missing. I thought mayme it was the column position but it is definitely the delete column. no matter where I put it the width code disapears.
0
Hello,
If you could send us a live url where we can inspect the described issue locally would be very helpful. Thank you in advance for your cooperation.
Greetings,
Pavlina
the Telerik team
If you could send us a live url where we can inspect the described issue locally would be very helpful. Thank you in advance for your cooperation.
Greetings,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0

Fred
Top achievements
Rank 1
answered on 06 Jan 2012, 04:30 PM
here is our test system http://173.203.137.240/
a temp username (Telerik) and password has been setup. can you send me an email address to send a password
a temp username (Telerik) and password has been setup. can you send me an email address to send a password
0
Hi,
At this point after the information is private and you can not share it in the forum then I will ask you to open a support ticket on this. Note that the support ticket is completely confidential. I am looking forward for your reply.
Greetings,
Pavlina
the Telerik team
At this point after the information is private and you can not share it in the forum then I will ask you to open a support ticket on this. Note that the support ticket is completely confidential. I am looking forward for your reply.
Greetings,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Hello,
To avoid duplicate posts I will ask you to continue our communication in the support ticket you have opened.
Thank you for your understanding.
Regards,
Pavlina
the Telerik team
To avoid duplicate posts I will ask you to continue our communication in the support ticket you have opened.
Thank you for your understanding.
Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now