This question is locked. New answers and comments are not allowed.
Hi,
I found that to show/hide column with context menu would unexpectedly disable column resizing.
Here are the steps to re-produce the issue:
1) Edit "Column Resizing" demo, enable context menu
2) Open new "Column Resizing" demo
3) Hide "Order Id" with context menu
4) You could find resizing is not working properly for all columns
5) Click page 2 to refresh the grid, you could find resizing is working normally
6) Show "Order Id" with context menu
7) You could find resizing is not working again
8) If you hide "Contract Name" at step 3), it seems the resizing is not working for "Ship Address" and "Order Date".
I guess the resizing is incorrectly disabled for columns after the shown/hided column.
Regards
Wicky
I found that to show/hide column with context menu would unexpectedly disable column resizing.
Here are the steps to re-produce the issue:
1) Edit "Column Resizing" demo, enable context menu
2) Open new "Column Resizing" demo
3) Hide "Order Id" with context menu
4) You could find resizing is not working properly for all columns
5) Click page 2 to refresh the grid, you could find resizing is working normally
6) Show "Order Id" with context menu
7) You could find resizing is not working again
8) If you hide "Contract Name" at step 3), it seems the resizing is not working for "Ship Address" and "Order Date".
I guess the resizing is incorrectly disabled for columns after the shown/hided column.
Regards
Wicky
6 Answers, 1 is accepted
0
Accepted
Hello Wicky,
We are aware of this issue and it is already resolved.
Greetings,
Nikolay Rusev
the Telerik team
We are aware of this issue and it is already resolved.
Greetings,
Nikolay Rusev
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Le Van
Top achievements
Rank 1
answered on 12 Mar 2012, 07:38 PM
Hi,
I use contextmenu(.ColumnContextMenu()) in grid mvc 3 to hide/show column by check/uncheck. But i want to disable one checkbox after open context menu. I think we need change .ColumnContextMenu().But i can't. Please help me!
Regards
Coco
I use contextmenu(.ColumnContextMenu()) in grid mvc 3 to hide/show column by check/uncheck. But i want to disable one checkbox after open context menu. I think we need change .ColumnContextMenu().But i can't. Please help me!
Regards
Coco
0
Hello Le,
I don't understand what exactly you are trying to achieve. Can you please explain in more details?
Regards,
Nikolay Rusev
the Telerik team
I don't understand what exactly you are trying to achieve. Can you please explain in more details?
Regards,
Nikolay Rusev
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Truong
Top achievements
Rank 1
answered on 20 Mar 2012, 04:16 AM
Hi all,
I have a same problem with Mr. Le. Says that my grid has 3 columns col_1, col_2, col_3. I enabled column context menu. So when I right-click in the column header, I see the context menu with 3 options to hide/show the columns. But I want column col_3 to be showed every time. So that, I don't want to show the option hide/show columns col_3 in the context menu.
How can I visible the col_3 options in the context menu? Or can I customize the column context menu in the jquery?
Could anyone help me with my problem?
Thanks for your helps!
Regards,
Truong
I have a same problem with Mr. Le. Says that my grid has 3 columns col_1, col_2, col_3. I enabled column context menu. So when I right-click in the column header, I see the context menu with 3 options to hide/show the columns. But I want column col_3 to be showed every time. So that, I don't want to show the option hide/show columns col_3 in the context menu.
How can I visible the col_3 options in the context menu? Or can I customize the column context menu in the jquery?
Could anyone help me with my problem?
Thanks for your helps!
Regards,
Truong
0
Hello Truong,
You can control whether given column to be visible in the context menu by setting IncludeInContextMenu(false) setting of column. This options was introduced with Q1 2012 release.
All the best,
Nikolay Rusev
the Telerik team
You can control whether given column to be visible in the context menu by setting IncludeInContextMenu(false) setting of column. This options was introduced with Q1 2012 release.
All the best,
Nikolay Rusev
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Truong
Top achievements
Rank 1
answered on 20 Mar 2012, 09:03 AM
Hi Nikolay Rusev,
Thanks for your quick reply. I am using the Q3 2011 release. I will get latest release of Telerik's products, and follow by your advice.
I also found the way to solve my problem by using the jquery to handle the "mouseover" event of the context menu:
$("#Grid_contextMenu").live('mouseover', function () {
var items = $('#Grid_contextMenu').find(".t-item");
$.each(items, function(key, value) {
var inputElement = value.childNodes[0];
var text = inputElement.outerHTML;
if (text.indexOf("Column_title") >= 0) {
if (inputElement.lastElementChild != null && inputElement.lastElementChild != undefined) {
inputElement.lastElementChild.disabled = true;
}
else { // for IE
inputElement.disabled = true;
}
return false;
}
});
});
But it's not good for performance :(
Thanks,
Truong
Thanks for your quick reply. I am using the Q3 2011 release. I will get latest release of Telerik's products, and follow by your advice.
I also found the way to solve my problem by using the jquery to handle the "mouseover" event of the context menu:
$("#Grid_contextMenu").live('mouseover', function () {
var items = $('#Grid_contextMenu').find(".t-item");
$.each(items, function(key, value) {
var inputElement = value.childNodes[0];
var text = inputElement.outerHTML;
if (text.indexOf("Column_title") >= 0) {
if (inputElement.lastElementChild != null && inputElement.lastElementChild != undefined) {
inputElement.lastElementChild.disabled = true;
}
else { // for IE
inputElement.disabled = true;
}
return false;
}
});
});
But it's not good for performance :(
Thanks,
Truong