Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
80 views
How can I get the current DataKey property from a RadListViewEditableItem object?
Princy
Top achievements
Rank 2
 answered on 14 Jun 2012
1 answer
83 views
Here are some suggestions of options for timepicker;

Option to limit range of times offerred to user,  such as only offer times between 8:00 AM and 5:00 PM.
Option to include times on the :15, :30, and :45.

Thanks
Shinu
Top achievements
Rank 2
 answered on 14 Jun 2012
1 answer
377 views
Hi I'm working with a radgrid populated with a few gridboundcolumns and one gridtemplatecolum with a radtextbox.
I have a save button on the bottom of the page wich will update to database the items wich has changes on the template column.
My question is how can I get the value of the cells tha dot not correspond to the templatecolumn.

For the template column I do the next
 
var rdtxtCant = (RadTextBox)rgAct_Indicador.Items[i].Cells[0].FindControl("rdtxt");

And it's working fine, but I don't know how to manage this when it is a gridboundcolumn.
Can you help me please?
Shinu
Top achievements
Rank 2
 answered on 14 Jun 2012
4 answers
1.7K+ views
Hi all I am having my RadTabstrip  designed as follows

<telerik:RadTabStrip ID="rdtabEmployee" runat="server" MultiPageID="rdmpPersonal"
            UnSelectChildren="True" Skin="Vista" EnableEmbeddedSkins="False" ClickSelectedTab="True"
            AutoPostBack="True" SelectedIndex="0" OnTabClick="tabClick">
            <Tabs>
                <telerik:RadTab runat="server" Text="Personal">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Contact">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Salary">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Bank">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Taxes">
                    <Tabs>
                        <telerik:RadTab runat="server" Text="Residence">
                        </telerik:RadTab>
                        <telerik:RadTab runat="server" Text="Work">
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="rdmpPersonal" runat="server">
            <telerik:RadPageView ID="rdpgPersonal" runat="server">
                <label>
                    Demo Personal
                </label>
            </telerik:RadPageView>
            <telerik:RadPageView ID="rdpgContact" runat="server">
                <label>
                    Demo Contact
                </label>
            </telerik:RadPageView>
            <telerik:RadPageView ID="rdpgResident" runat="server">
                <label>
                    Resident Demo
                </label>
            </telerik:RadPageView>
            <telerik:RadPageView ID="rdpgWork" runat="server">
                <label>
                    Work Demo
                </label>
            </telerik:RadPageView>
        </telerik:RadMultiPage>

You can find under Taxes tab I am having sub Tabs. How can I handle Click event for that .

I write my code as follows

protected void tabClick(object sender, RadTabStripEventArgs e)
    {
        AddPageView(e.Tab.Text);
        e.Tab.PageView.Selected = true;
    }
    private void AddPageView(string pageViewID)
    {
        RadPageView pageView = new RadPageView();
        pageView.ID = pageViewID;
        rdmpPersonal.PageViews.Add(pageView);
    }

But this didn't work child Tabs can some one help me

I am also getting the following error if i click the same Tab for multiple times

Multiple controls with the same ID 'Personal' were found. FindControl requires that controls have unique IDs.

Princy
Top achievements
Rank 2
 answered on 14 Jun 2012
0 answers
365 views
hi all,
 
I m using filtering radgrid.

I'm using 2008 version of telerik DLL which does not support "Filter Template". I want to develop a screen which is something like the one attached.

As you can see the attachment i want a button in place of filter text boxes and this is for two columns alone(Column Nominate and Column Approve). To achieve that i wrote a class which is below.

public class GenerateButton : GridCheckBoxColumn
    {
 
        //RadGrid will call this method when it initializes the controls inside the filtering item cells
        protected override void SetupFilterControls(TableCell cell)
        {
 
            base.SetupFilterControls(cell);
            cell.Controls.RemoveAt(0);
            Button b = new Button();
            b.ID = ("SelectDeselect"+ this.UniqueName);
            b.BackColor = System.Drawing.Color.White;
            b.Text = "Select/Deselect All";
            string s = b.ID;
                 
            //b.OnClientClick = "clickbutton('"+s+"')";
            if (s.Equals("SelectDeselectColumnNominate"))
            {
                b.OnClientClick = "ColumnNominateClickButton()";
            }
            else if(s.Equals("SelectDeselectColumnApprove"))
            {
                b.OnClientClick = "ColumnApproveClickButton()";
            }
            cell.Controls.AddAt(0, b);
            cell.Controls.RemoveAt(1);
 
        }
 
 
    }


For those two columns i used the below logic which is written in the PageLoad.
if (dataColumn.ColumnName == "ColumnNominate")
     {
            GenerateButton columnNominate = new GenerateButton();
             RadGrid1.MasterTableView.Columns.Add(columnNominate);
             columnNominate.DataField = dataColumn.ColumnName;
             columnNominate.SortAscImageUrl = @"Arrow Down.jpg";
             columnNominate.SortDescImageUrl = @"Arrow Up.jpg";
             columnNominate.HeaderText = dataColumn.ColumnName;
      }
       else if (dataColumn.ColumnName == "ColumnApprove")
        {
         GenerateButton columnApprove = new GenerateButton();
          this.RadGrid1.MasterTableView.Columns.Add(columnApprove);
           columnApprove.DataField = dataColumn.ColumnName;
           columnApprove.SortAscImageUrl = @"Arrow Down.jpg";
           columnApprove.SortDescImageUrl = @"Arrow Up.jpg";
           columnApprove.HeaderText = dataColumn.ColumnName;
         }

Item data bound logic is below where in i'm setting the properties of checkboxes.
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
                CheckBox chkbxNominate = (CheckBox)item["ColumnNominate"].Controls[0];
                chkbxNominate.ID = "ChkNominate";
                 
                chkbxNominate.Visible = true;
                chkbxNominate.Enabled = true;
              
 
                CheckBox chkbxApprove = (CheckBox)item["ColumnApprove"].Controls[0];
                chkbxApprove.ID = "ChkApprove";
                chkbxApprove.Visible = true;
                chkbxApprove.Enabled = true;
                
 
            }
          
        }

Now things are getting complicated for me.

The following tasks needs to be done
1. Persist the checkbox's checked status while i filter.
2. On clicking the SelectAll/DeselectAll button i need to select all checkboxes and deselect all checkboxes. I wrote this in javascript and is working fine
3. I need to identify the checked checkboxes in the (.cs) file so that i could pass in this value to the DB. Now where to write this logic? If i try to find the checkboxes in the "ColumnNominate" or "ColumnApprove" then the system is throwing an error saying "No controls are bound to that particular cell". Kind suggestion please on how to proceed further?

Also can you please suggest me some other better way to create two checkbox columns programatically?
Gowtham
Top achievements
Rank 1
 asked on 14 Jun 2012
0 answers
87 views
I have a master page that has the script manager on it.
I have a content page that has the follow RadajaxManager and Panels

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">
</telerik:RadAjaxManager>
 
<!-- Loading Panel -->
<telerik:RadAjaxLoadingPanel ID="DefaultAjaxLoadingPanel" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="0"
    Skin="" Transparency="30" BackColor="#CCCCCC">
    <div id="MyLoadingPanel">
        <span class="WbHeader">Configuring Document...</span><br />
        <asp:Image ID="LoadingImage" runat="server" ImageUrl="~/images/ajax-loader.gif"></asp:Image>
    </div>
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" MinDisplayTime="0"
    Skin="" Transparency="30" BackColor="#CCCCCC">
    <div id="Div1">
        <span class="WbHeader">Restructuring Document...</span><br />
        <asp:Image ID="Image1" runat="server" ImageUrl="~/images/ajax-loader.gif"></asp:Image>
    </div>
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel3" runat="server" MinDisplayTime="0"
    Skin="" Transparency="10" BackColor="#CCCCCC" ZIndex="2000">
    <div id="Div3" style="margin: 50px 10px 10px 10px; text-align: left">
        <span class="WbHeader">The document outline view is disabled while you are editing this
            particular content block. When you have finished and saved your work, this view
            will refresh to reflect your changes.</span>
    </div>
</telerik:RadAjaxLoadingPanel>

The RadAjaxManager is called from javascript that is initiated by a RadTree OnClientNodeClicking

<div id="MainDiv" style="height:100%;width:100%;overflow:auto;">
        <telerik:RadSplitter ID="rsMain" runat="server" VisibleDuringInit="True" Height="100%" Width="100%" AccessKey="o" style="overflow: auto;">
         
            <telerik:RadPane ID="pOutline" runat="server" Width="26%" CssClass="VisibleScrollbar">
 
            <telerik:RadTreeView ID="OutlineTree" runat="server" AccessKey="w" CausesValidation="False"
                EnableDragAndDrop="True" EnableDragAndDropBetweenNodes="True" WebServiceSettings-Path="/wbTree.asmx"
                WebServiceSettings-Method="LoadNodes"
                onclientcontextmenushowing="ClientContextMenuShowing"
                OnClientNodePopulating="ClientNodePopulating"
                OnClientNodeDropping="ClientNodeDropping"
                OnClientNodePopulated="ClientNodePopulated" Height="99%"
                OnClientNodeClicking="ClientNodeClicking"
                EnableViewState="False"
                CollapseAnimation-Type="None"
                ExpandAnimation-Type="None">
                <WebServiceSettings Method="LoadNodes" Path="/wbTree.asmx"></WebServiceSettings>
                <ContextMenus>
                    <telerik:RadTreeViewContextMenu ID="ElementMenu" runat="server" EnableAutoScroll="True">
                    </telerik:RadTreeViewContextMenu>
                </ContextMenus>
                <ExpandAnimation Type="None" />
            </telerik:RadTreeView>
         
            </telerik:RadPane>
 
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" />
     
            <telerik:RadPane ID="pContent" runat="server" Width="74%">
                <telerik:RadAjaxPanel id="plEdit" runat="server" EnableAJAX="True" Width="99%"
                    LoadingPanelID="DefaultAjaxLoadingPanel"  ClientEvents-OnResponseEnd="plEditResponseEnd"
                    Height="99%">
                     
                    <asp:HiddenField ID="SelectedIID" Value="0" runat="server" />
                     
                    <telerik:RadSpell ID="RadSpell1" runat="server" IsClientID="True" ButtonType="None" EnableViewState="False"  />                          
                     
                    <asp:Button ID="NextButton" runat="server" Visible="false" Text="Next" CausesValidation="false" EnableViewState="false"/>
 
                </telerik:RadAjaxPanel
            </telerik:RadPane>
 
        </telerik:RadSplitter>
    </div>

//Called when you are attempting to click a node on the tree.
function ClientNodeClicking(sender, args) {
    var Node = args.get_node();
    var attrs = Node.get_attributes();
    var ClickStatus = attrs.getAttribute("ClickStatus");
    var IID = attrs.getAttribute("IID");
 
    if (ClickStatus != null) {
        if (ClickStatus == "None") {
            args.set_cancel(true);
            return;
        }
    }
 
    if (IID == null || IID == "") {
        args.set_cancel(true);
        return;
    }
 
    Page_ValidationActive = false;
 
    var _ajax = $find("<%=RadAjaxManager1.ClientID %>");
     
    if (_ajax != null) {
        var CmdStr = "IID=" + IID;
        _ajax.ajaxRequestWithTarget("<%= plEdit.ClientID %>", CmdStr);
    }
 
}

The ClientIDs and CmdStr are properly assigned (attached ClickedValues).

I also have a server side method that overrides the RaisePostbackEvent which I would expect to get called but does not.

Protected Overrides Sub RaisePostBackEvent(ByVal source As IPostBackEventHandler, ByVal eventArgument As String)
       MyBase.RaisePostBackEvent(source, eventArgument)
 
       If TypeOf source Is RadAjaxPanel Then
 
           ''No, there is no tree!
           If MyTree Is Nothing Then
               Exit Sub
           End If
 
           If eventArgument.Contains("IID=") Or eventArgument.Contains("Refresh") Then
               ''Slight Hack for multi-page wizard controls
               Session("_CurrentWizardPage") = 0
               If _NodeTransformed = True Then
                   RadAjaxManager1.ResponseScripts.Add(String.Format("ServerSideRefreshNode('{0}');", SelectedIID.Value))
               End If
           End If
 
           If eventArgument.Contains("IID=") Then
               Dim _NodeStr As String = eventArgument.Substring(eventArgument.LastIndexOf("=") + 1)
               If SelectedIID.Value <> _NodeStr Then
                   _NodeStr = _NodeStr
                   SelectedIID.Value = _NodeStr
                   BuildControls(_NodeStr, True)
               End If
           End If
 
           If eventArgument.Contains("Refresh") Then
               BuildControls(SelectedIID.Value, True)
           End If
 
           If eventArgument.Contains("SaveFile") Then
               ''Do nothing technically. We've already done the binding to the XML document in the postback at this point.
           End If
 
           If eventArgument.Contains("SaveWithValidation") Then
               RadAjaxManager1.ResponseScripts.Add("ValidateXmlCallback();")
           End If
 
           If eventArgument.Contains("ValidationOnly") Then
               RadAjaxManager1.ResponseScripts.Add("ValidateXmlCallback('report');")
           End If
 
           _NodeTransformed = False
       End If
 
   End Sub

This is a web application (Not Web site).  I have an application level function for logging errors and nothing is being caught, No javascript error is being received nor is any IIS error being logged in the event viewer.  It appear that processing is simply stopping.

Any suggestions as to why this would not be working would be appreciated.
Phillip
Top achievements
Rank 1
 asked on 14 Jun 2012
4 answers
136 views
Hi
    I am using telerik Radcontrols for AJAX 2011.3.1115 version. Some times my web page UI is disturbing, the Telerik controls are not visible properly,please find the attachment. 
Please help me ASAP,Getting lot of disturb for this,this is happening in rad controls(Radlistbox,Radcombobox)


Thank you
Gurumoorthy.V
JJ
Top achievements
Rank 1
 answered on 13 Jun 2012
1 answer
103 views
I need to implement the below requirement in my telerik rad grid.

1. In the X-> Axis we need to show the days of a month(1-31) and in Y-Axis we need to show the month name. We have a name column which shows the name of different persons worked on a team.

2. A person can take multiple categories leaves in a single day. For Example in a day if we consider 8 hours as working hours and lets say I took 2 hours of Sick Leave, 2 hours of Working from home and 4 hours of out of office.

3. For each kind of leave we have different color codes to represents that in a grid cell for that day. These color code as the hex codes coming from a database based on the user preference set for that employee.

4. If you see the attachment, for the month of Jan, Person1, took 3 categories of leaves on 3rd Jan and 14th Jan. How to achieve this functionality of having 3 different color codes in a single grid cell and that to those colors are coming from database.

It will be great if you can tell me how to achieve this functionality.

Thanks,
Nishith
Richard
Top achievements
Rank 1
 answered on 13 Jun 2012
1 answer
53 views
I have a RadGrid and an RadAjaxLoadingPanel and wire them together.  I choose to edit a row of the grid within an Edit Form template and if I click on the update or cancel buttons of my edit form the RadAjaxLoadingPanel displays as normal.  If I click into one of the fields of my edit form and TAB over to the submit or cancel buttons and then click the enter key... the postback occurs and my grid is updated BUT the RadAjaxLoadingPanel never displays.

What's going on here?
Richard
Top achievements
Rank 1
 answered on 13 Jun 2012
1 answer
197 views
Hi all,

am using asp.net 3.5 i need to limit the adding levels of my tree list main categories limit to MAX 6 levels... wont alow to add after 6th level..

have you any idea about this then please let me know..

Regards,

Prassin
Richard
Top achievements
Rank 1
 answered on 13 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?