Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
149 views
Hi,

I have GridDropDownColumn with EnableEmptyListItem = "true" EmptyListItemValue="0" EmptyListItemText="Select" in my RadGrid and required field validator as well and i am experiencing a problem that my validator is not fired when the drop down selected text is "Select". I have many fields as well in an order (ie) For Ex. User Name, Password, User Type and Contact No etc., in this User Type is the drop down list. The required field validator is fired for username, password,contact no and for user type its not firing. So i used to check the separately OnInsertCommand.

But I required is the required field validator should fire that. So i need some help in this regards

Thanks,
Kannan
Carl
Top achievements
Rank 1
 answered on 10 Dec 2014
3 answers
666 views
 Dear Telerik Support,

I have a radtree bind with dataset. i use context menu to delete selected node, now i want to disable the context menu item if it has child items.
so that user should delete the child items before deleting parent.

Please help

Thanks
Rizwan Ansari
Boyan Dimitrov
Telerik team
 answered on 10 Dec 2014
1 answer
105 views
Hi,

Is there a way I can remove the text highlighted in image and keep it as a watermark in textbox.

Attaching image for reference.

Thanks
Slav
Telerik team
 answered on 10 Dec 2014
3 answers
558 views
Script Access Denied "Telerik.Web.UI.WebResource.axd"
http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx

I have a link on my Main Page that opens a modal window (dialog 1) providing search ability to look up customer information and select them to use on the main page or create a new customer by clicking on a link with in (dialog 1) to popup another modal window (dialog 2) to create new customer.  (Dialog 2) goes to another domain website within our corporate network to setup that customer, when (dialog 2) comes up i get script errors listed above.  I believe this is due to a security browser limitation for iframe cross domain access.

On (dialog 2) all I want is to create a new customer, close (dialog 2) and refresh (dialog 1).  Does anybody have any suggestions?

function GetRadWindow() { 
                var oWindow = null
                if (window.radWindow) oWindow = window.radWindow; 
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; 
                return oWindow; 
            } 
            function CloseRW() { 
                //get a reference to the current RadWindow 
                var oWnd = GetRadWindow(); 
                oWnd.close(); 
            } 
            function openWin2() { 
                var parentPage = GetRadWindow().BrowserWindow; 
                var parentRadWindowManager = parentPage.GetRadWindowManager(); 
                var oWnd2 = parentRadWindowManager.open("http://new domain server/appname/modal/Customer.aspx""r2"); 
                oWnd2.setSize(760, 550); 
                oWnd2.center(); 
                window.setTimeout(function() { 
                    oWnd2.setActive(true); 
                }, 0); 
            } 
Thanks, Bill


Ianko
Telerik team
 answered on 10 Dec 2014
3 answers
133 views
I am having 4 RadAjaxPanels with radhtmlchart controls. And I want to update/control individually each paneI with different skins.
I have two drop down list boxes for Panel No and Color and when user clicks 'Update' button, I am calling function to invoke ajaxRequestwithTarget, with arguments(panel no and color selected).
and on the server side I am having the following logic
 protected void RadAjaxPanel_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        string argument = (e.Argument);
        String[] argArray = argument.Split(",".ToCharArray());
        switch (argArray[0])
        {
            case "1":
                RadSkinManager1.ApplySkin(RadHtmlChart1, argArray[1]);
                lblChart1.Text = argArray[1];
                break;
            case "2":
                RadSkinManager1.ApplySkin(RadHtmlChart2, argArray[1]);
                lblChart2.Text = argArray[1];
                break;
            case "3":
                RadSkinManager1.ApplySkin(RadHtmlChart3, argArray[1]);
                lblChart3.Text = argArray[1];
                break;
            case "4":
                RadSkinManager1.ApplySkin(RadHtmlChart4, argArray[1]);
                lblChart4.Text = argArray[1];
                break;
            default:
                break;
        }

The logic works fine the first time, able to apply different skins to all the four panels..But it doens't work when I want to reapply another skin on them.  Can we apply Skin only once to the controls. I am unable to understand what would be the reason. 

Thank you,
Madhavi






madhavi
Top achievements
Rank 1
 answered on 10 Dec 2014
1 answer
75 views
I want to create Radgrid using asp.net codebehind aspx.cs file and assign datasource from the client side .aspx file. Can some one help me with the code to achieve the same? I came across some client settings. how to set the same if I need to do? can I set autogenerate columns to true? as the data is will dynamically change.
Maria Ilieva
Telerik team
 answered on 10 Dec 2014
3 answers
150 views
Hi, can someone teach me how to auto expand the child item when the parent item was selected by giving sample code?

In ItemCommand, the command name is  "ItemClick".

Here is my JavaScript:
<script type="text/javascript">
       var parenItemSelected = false;
       function OnClientNodeClicked(sender, args) {
           var currNode = args.get_item();
           var childNodes = currNode.get_childItems();
           var nodeCount = currNode.get_childItems().length;
           var parentItem = currNode.get_parentItem();
 
           if (parentItem) {
 
               parenItemSelected = true;
               parentItem.set_selected(true);
           }
 
           if (currNode.get_selected()) {
               CheckAllChildren(childNodes, nodeCount);
           }
           else {
               UnCheckAllChildren(currNode, childNodes, nodeCount);
           }
           parenItemSelected = false;
       }
 
       function UnCheckAllChildren(currNode, nodes, nodecount) {
           var i;
           for (i = 0; i < nodecount; i++) {
               nodes[i].set_selected(false);
           }
           currNode.set_selected(false);
       }
 
       function CheckAllChildren(nodes, nodecount) {
           var i;
 
           if (!parenItemSelected) {
               for (i = 0; i < nodecount; i++) {
                   nodes[i].set_selected(true);
               }
           }
       }
   </script>

UI design:
01.<telerik:RadTreeList ID="RadTreeList1" runat="server" AutoGenerateColumns="False" DataKeyNames="id" ParentDataKeyNames="ParentId" CellSpacing="0" GridLines="None" OnNeedDataSource="RadTreeList1_NeedDataSource" HideExpandCollapseButtonIfNoChildren="true" AllowMultiItemSelection="true" OnPreRender="RadTreeList1_PreRender" OnItemCommand="RadTreeList1_ItemCommand" OnItemDataBound="RadTreeList1_ItemDataBound">
02.<Columns>
03.<telerik:TreeListBoundColumn DataField="id" HeaderText="access_id" UniqueName="access_id" DataType="System.decimal" ReadOnly="True" SortExpression="access_id" Display="false"></telerik:TreeListBoundColumn>
04.<telerik:TreeListBoundColumn DataField="access_code" HeaderText="Access Right" UniqueName="role_access_access_id" ReadOnly="True" SortExpression="access_code"></telerik:TreeListBoundColumn>
05.<telerik:TreeListBoundColumn DataField="ParentId" HeaderText="Parent ID" UniqueName="ParentId" ReadOnly="True" SortExpression="ParentId" Display="false"></telerik:TreeListBoundColumn>
06.<telerik:TreeListSelectColumn UniqueName="SelectColumn" HeaderText="Select Menu" ></telerik:TreeListSelectColumn>
07.</Columns>
08. <ClientSettings AllowPostBackOnItemClick="true">
09.<ClientEvents OnItemDeselected="OnClientNodeClicked" OnItemSelected="OnClientNodeClicked"  />
10.<Selecting AllowItemSelection="true" />
11.</ClientSettings>
12.</telerik:RadTreeList>

and the code:
1.Protected Sub RadTreeList1_NeedDataSource(sender As Object, e As TreeListNeedDataSourceEventArgs)
2.        Try
3.            Dim gvAccess = DirectCast(sender, RadTreeList)
4.            gvAccess.DataSource = GetAccessMenuView().ToList
5.        Catch ex As Exception
6.            InformationBox.DisplayError(ex)
7.        End Try
8.End Sub

i had try this,  but not work.
1.Protected Sub RadTreeList1_PreRender(sender As Object, e As EventArgs)
2.        Dim RadTreeList1 = DirectCast(sender, RadTreeList)
3.        If parentIndex IsNot Nothing Then
4.            Dim parent As TreeListDataItem = RadTreeList1.Items(CInt(parentIndex))
5.            RadTreeList1.ExpandItemToLevel(parent, parent.HierarchyIndex.NestedLevel + 1)
6.        End If
7.End Sub

Kostadin
Telerik team
 answered on 10 Dec 2014
1 answer
638 views
Hello guys,

Can't anyone help me?, I'm new in ASP.NET and Telerik.

I do have problem, I can't disable the button in my grid.

I put RadButton in GridTemplateColumn in my grid. This is the hierarchy that I mean :

RadGrid
    MasterTableView
        Column
            GridTemplateColumn
                     ItemTemplate
                       --------->RadButton
                      /ItemTemplate
            /GridTemplateColumn

            GridBoundColumn
            /GridBoundColumn
        /Column

I use RadGrid_NeedDataSource for the data source. I want to disable RadButton if the value in other GridBoundColumn "yes", and if  the value is "No" RadButton will be able.

Do you get it what I meant?
Konstantin Dikov
Telerik team
 answered on 10 Dec 2014
11 answers
709 views
can this be done?
Konstantin Dikov
Telerik team
 answered on 10 Dec 2014
1 answer
126 views
Hello Team,

I am using Telerik RadEditor  and having Design and HTML as Edit Mode ,but problem is when I select HTML mode , it gets change to Design after postback event.

Could you please help, how can I keep the last selected Edit mode(Design or HTML) after postback event.

Thanks
Afroz Khan
Ianko
Telerik team
 answered on 10 Dec 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?