Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
128 views
Is there any way to have alternative text for the legend items in the chart?
Ves
Telerik team
 answered on 16 Jun 2009
1 answer
130 views
Hi Telerik

i am using RadGrid with Filter option. and also having a commanditem checkbox which controls Hide/Show of FilterItem.
For example if checkbox is checked then filteritem will be visible otherwise will be invisible.i am controlling it using this javascript code.

 

function showFilterItem(val)

 

{

 

try

 

{

 

var picker = $find("ctl00_ContentPlaceHolder1_User_RadGrid_ctl00_ctl02_ctl00_chkViewFilter");

 

 

 

if (val.checked)

 

{

$find(

'ctl00_ContentPlaceHolder1_User_RadGrid').get_masterTableView().showFilterItem();

 

document.getElementById(

"ctl00_ContentPlaceHolder1_HiddenField8").value=1;

 

}

 

else

 

{

$find(

'ctl00_ContentPlaceHolder1_User_RadGrid').get_masterTableView().hideFilterItem();

 

document.getElementById(

"ctl00_ContentPlaceHolder1_HiddenField8").value=0;

 

}

}

 

catch(ex)

 

{

}

 

} 

 

 

<CommandItemTemplate>

 

 

<table cellpadding="0" cellspacing="0" border="0" width="920px" align="center">

 

 

<tr>

 

 

<td width="675px" align="left" style="padding-right: 15px">

 

 

<asp:CheckBox ID="chkViewFilter" runat="server" Checked="false"   onclick="showFilterItem(this)" />

 

 

<asp:Label ID="Label4" runat="server" Text="Show Filter"></asp:Label>

 

 

</td>

 

</

 

tr>

 

 

</table>

 

 

</CommandItemTemplate>

It is working fine. but my requirement is that In starting/Page_Load  i   want to hide the FilterItem. and this filteritem will be visible only when that checkbox will be checked.
if i try to make FilterItem visible false using this  serverside code then i am unable to make this filteritem visible again using above javascript code.

 

 


if
(!IsPostBack)

 

{

 

foreach (GridFilteringItem filterItem in User_RadGrid.MasterTableView.GetItems(GridItemType.FilteringItem))

 

{

filterItem.Visible =

false;

 

}

}

 

so please guide me how to achieve my result.
Thanks a lot in advance.
Binod.

Shinu
Top achievements
Rank 2
 answered on 16 Jun 2009
2 answers
127 views
Hi Telerik Geniuses! :)

I have two RadMenus on a page and each one uses a different custom css and it shows completely messed up. When I change one of them to use an embedded skin it works nice.

I believe I did all correct with creating the folders and copying all the correct files. I added the Skins folder, under this a CustomBlack and a CustomOutlook folders, on the Skins folder I copied the Menu.css file, on the CustomBlack the Menu.Black.css (renamed to Menu.CustomBlack.css and changed all references inside from RadMenu_Black to RadMenu_CustomBlack), on the CustomOutlook folder I did the same but using the Menu.Outlook.css.

The test page source is as follows, if I change any of the menu's back to use the embedded skins, it works fine.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BreadCrumbTest.aspx.cs" Inherits="TelerikTestN.BreadCrumbTest" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"> 
    <title></title> 
    <link href="Skins/CustomBlack/Menu.CustomBlack.css" rel="stylesheet" type="text/css" /> 
    <link href="Skins/CustomOutlook/Menu.CustomOutlook.css" rel="stylesheet" type="text/css" /> 
     
    <telerik:radcodeblock ID="RadCodeBlock1" runat="server"> 
        <script type="text/javascript"> 
            function onClicking(sender, eventArgs) { 
                var BreadCrumbs = $find("<%= RadMenu1.ClientID %>"); 
                var item = eventArgs.get_item(); 
                var name = item.get_text(); 
                BreadCrumbs.close(); 
                BreadCrumbs.get_items().clear(); 
                var childItem = new Telerik.Web.UI.RadMenuItem(); 
                childItem.set_text(name); 
                for (var i = 0; i < 3; i++) { 
                    var menuItem = new Telerik.Web.UI.RadMenuItem(); 
                    menuItem.set_text("Test " + i); 
                    childItem.get_items().add(menuItem); 
                } 
                BreadCrumbs.get_items().add(childItem); 
            } 
        </script> 
    </telerik:radcodeblock> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
    <div> 
        <telerik:RadMenu ID="RadMenu1" runat="server" Skin="CustomBlack" 
                EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" 
                OnClientItemClicking="onClicking"> 
            <Items> 
                <telerik:RadMenuItem runat="server" Text="Root"> 
                    <Items> 
                        <telerik:RadMenuItem runat="server" Text="Test 1"> 
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem runat="server" Text="Test 2"> 
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem runat="server" Text="Test 3"> 
                        </telerik:RadMenuItem> 
                    </Items> 
                </telerik:RadMenuItem> 
            </Items> 
        </telerik:RadMenu> 
         
        <telerik:RadMenu ID="RadMenu2" runat="server" Skin="CustomOutlook" 
                    EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false"> 
            <Items> 
                <telerik:RadMenuItem runat="server" Text="Root"> 
                    <Items> 
                        <telerik:RadMenuItem runat="server" Text="Test 1"> 
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem runat="server" Text="Test 2"> 
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem runat="server" Text="Test 3"> 
                        </telerik:RadMenuItem> 
                    </Items> 
                </telerik:RadMenuItem> 
            </Items> 
        </telerik:RadMenu> 
    </div> 
    </form> 
</body> 
</html> 
 

Am I missing something?

Thanks,
Eduardo
Eduardo
Top achievements
Rank 1
 answered on 16 Jun 2009
6 answers
178 views
I have the below code that is filtering the menu options........there is one problem, when I switch between a datetime or amount datatype to a string datatype - the filteroptions just show me three options "NoFilter, EqualTo, NotEqualTo". This happens only sometimes ? what am I doing wrong ? 

// JScript File

 

function filterMenushowing(sender, eventArgs)

 

{

 

 

var menu = eventArgs.get_menu();

 

 

var items = menu._itemData;

 

 

var dataType = eventArgs.get_column().get_dataType().toString();

 

 

 

var usedTypes = "System.String, System.DateTime, System.Decimal";

 

 

//debugger;

 

 

if(usedTypes.indexOf(dataType != -1))

 

{

 

 

var filterForString = "";

 

 

 

if(dataType == "System.String")

 

filterForString =

"NoFilter, Contains, DoesNotContain, StartsWith, EndsWith, EqualTo, NotEqualTo";

 

 

if(dataType == "System.Decimal" || dataType == "System.DateTime")

 

filterForString =

"NoFilter, EqualTo, NotEqualTo, GreaterThan, LessThan, GreaterThanOrEqualTo, LessThanOrEqualTo";

 

 

 

var i = 0;

 

 

while (i < items.length)

 

{

 

if (filterForString.indexOf(items[i].value.toString()) != -1)

 

{

 

var item = menu._findItemByValue(items[i].value);

 

 

if (item != null)

 

item._element.style.display =

"";

 

 

//else

 

 

// item._element.style.display = "";

 

}

 

 

else

 

{

 

var item = menu._findItemByValue(items[i].value);

 

 

if (item != null)

 

item._element.style.display=

"none";

 

 

}

i++;

}

 

}

 

else

 

{

 

var i = 0;

 

 

while (i < items.length)

 

{

 

var item = menu._findItemByValue(items[i].value);

 

 

if (item != null)

 

item._element.style.display=

"";

 

 

i++;

}

 

}

}

Neeraj
Top achievements
Rank 1
 answered on 15 Jun 2009
2 answers
94 views
Hi,

In my project, I'd like to be able to customize the item template this way. I'll explain with the PanelBar on the page of the following link:
http://demos.telerik.com/aspnet-ajax/panelbar/examples/functionality/simple/defaultcs.aspx

For each panel item (no matter it's root item such as "Mail", or sub-item such as "Personal Folders"), I'd like to display a control (for example a label or a link button) which is on the same horizontal level as the item. So it will look something like this:

Mail                                  [29 items]
    Personal Folders         [3 items]
    Deleted Items              [6 items]
......

One more requirement: I need to bind the data dynamically in the code behind; not some pre-defined items in aspx page.

Can someone please tell me how to achieve this?

Thanks a lot!

Gary


Gary
Top achievements
Rank 1
 answered on 15 Jun 2009
2 answers
86 views
In FF3 or IE8, starting with both Default and Simple, you can't change the background image, and you can't enter a line-height that isn't in the list. That last point might be by design, but since the paddings can't actually be changed, I was hoping I could fake it with a big line-height.

Should I wait for a new version? Honestly, I'm finding more things that don't work than do.
ATS
Top achievements
Rank 1
 answered on 15 Jun 2009
16 answers
120 views
Hi all

A strange one.

When I click anything on the scheduler a 2nd time I get this error. The first click is fine and works but the second clicks fails everytime.

HTTP Error 403.14 - Forbidden


Any ideas?
Joe
Top achievements
Rank 1
 answered on 15 Jun 2009
1 answer
176 views

I am creating a variable number of RadGrids dynamically in code.  Everything is working fine and as expected, except this one thing.  I am trying to override the font for a particular column:

GridBoundColumn codeCov = new GridBoundColumn();  
                codeCov.ItemStyle.Font.ClearDefaults();  
                codeCov.ItemStyle.Font.Names = new String[] { "Webdings2" };  
                codeCov.HtmlEncode = true;                  
                codeCov.HeaderText = "Code Cov";  
                codeCov.DataField = "IsCodeCov";  
                codeCov.ItemStyle.HorizontalAlign = HorizontalAlign.Center;  
                codeCov.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;  
                rg.Columns.Add(codeCov);  
 

The cell is being serialized correctly (I think):

<
td align="center" style="font-family:Webdings 2;">
P</td>
(This should show up as a check-mark)

Yet the font is not displayed in the Webdings 2 font on the web page.  I wonder if the style for the row is overriding the cell?

The page contains a RadSkinManager and the skin is set to Web20.

Appreciate any help you can provide.

Regards,
Louis
Louis
Top achievements
Rank 1
 answered on 15 Jun 2009
2 answers
97 views
I just changed the background image on the RadPanelBar Root Items, which worked fine. But then I tried to adjust the padding on the Root Item Text Wrappers, and that didn't work at all. Not only can you not type in the boxes (you have to use the mouse to cut/paste), but nothing happens when you enter them. If you leave the screen and come back, padding and margins and such are changed back to the default values. I tried it on a few different elements, using both Default and Simple styles as the base. Is this feature not yet implemented? Because it's one of the main points in the introduction text. I've tried it in IE8 and FF3.
ATS
Top achievements
Rank 1
 answered on 15 Jun 2009
0 answers
140 views

Hi there,

I am using the drag and drop behaviour of the treeview and want to use the client side calls to move nodes using "OnClientNodeDropping". The issue with this is that the server side event "OnNodeDrop" is not firing and so my changes are not persisted to the database. 

Is there an easy way around this? Am I doing something wrong or do I simply need to use an update panel and accept the update lags?

Thanks in advance

Steve
 

 

MakeMedia
Top achievements
Rank 1
 asked on 15 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?