Hello,
I want hide/unhide radgrid column depends on certain conditions.
I have used Followinf Code provided by you on link
http://demos.telerik.com/aspnet-ajax/grid/examples/client/clientsideapi/defaultcs.aspx
function HideColumn(index)
{
var columnCount = RadGrid1.get_masterTableView().get_columns().length - 1;
if(index < 0 || index > columnCount)
{
alert("Invalid index! The valid range is: " + 0 + "-" + columnCount);
}
else
{
RadGrid1.get_masterTableView().hideColumn(index);
}
}
function ShowColumn(index)
{
var columnCount = RadGrid1.get_masterTableView().get_columns().length - 1;
if(index < 0 || index > columnCount)
{
alert("Invalid index! The valid range is: " + 0 + "-" + columnCount);
}
else
{
RadGrid1.get_masterTableView().showColumn(index);
}
}
I have also set AllowColumnHide="True" property.
This code works well only when I provide dedicated button to call this methods.But when I call this Methods in between execution of business logic, I get follwoing problems
1. showColumn(columnindex) itself hides the column
2. once column is not visibile, it will not become visible even after calling "showColumn" Method.
3. showColumn(columnindex) takes significant time to execute
Am I missing any property or any thing....
any help will be highly appreciated...
thanks in advance,
Ajay