Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
337 views
Hi,
  1.  I want to highlight the today while clicking today  from  week or month view .
Please give any suggestion ...

  2. And also ,I need to format the calender(Navigation Pane) with in the rad scheduler .
How to acheive this ?


Regards
Prabha
prabha
Top achievements
Rank 1
 answered on 22 Dec 2010
1 answer
148 views
Is it possible to access an ItemDataBound routine for a detail table?

What I want to do is toggle fields based on permissions as well as edit the text in a label. The detail table has a item template:

<ItemTemplate>
<table width="100%">
<tr>
<td style="width:250px;" >
Created by: <%# Eval("created_by")%><br />
Created On: <%# Eval("created_on""{0: ddd MM/dd/yy hh:mm}")%><br />
<asp:Label ID="lblNoteType" runat="server" Text="" Visible="false" />
<asp:Label ID="lblNoteTypeData" runat="server" Text='<%# Eval("note_type")%>' Visible="false" />
</td>
<td>
<%# Eval("note")%>
</td>
</tr>
</table>
</ItemTemplate>

I am trying to toggle lblNoteType visible and invisible based on permissions as well as change the text property.



I put a name on the detail grid and setup a
    Protected Sub gvNotes_ItemDataBound(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridItemEventArgs)
event, but that didn't work, setting
<telerik:GridTableView Name="gvNotes" OnDataBound="gvNotes_ItemDataBound" 
on the detail grid didn't launch the event either.
What is the best way to do this?
Thanks
Randy Miller
TransGuardian
Princy
Top achievements
Rank 2
 answered on 22 Dec 2010
2 answers
205 views
hi,

i am binding combobox with ef.when i run the app 1st value is selected..how can bind it with null value.i want to show emptymessage string in runtime.

i tried
if(!ispostback)
combo.selectedindex=-1 ;

but its not working.
Teoman
Top achievements
Rank 1
 answered on 21 Dec 2010
0 answers
122 views
Hello,

I have a RadGridCombo populated with checkbox items. When I click a specific item, I want to enable another RadGridCombo box. My problem in my javascript code is I'm unable to retrieve the value of the checkbox item I click. Take a look:

function onCheckBoxClick(chk)
            { 
                // YEEAAH JAVASCRIPT PROGGING!!!1
                var combo = $find("<%= cboPolicyScope.ClientID %>");
                var agencylist = $find("<%= cboUserAgencies.ClientID %>");
                
                //holds the text of all checked items
                var text = "";
                //holds the values of all checked items
                var values = "";
                //get the collection of all items
                var items = combo.get_items();
                //enumerate all items
                for (var i = 0; i < items.get_count(); i++)
                {
                    var item = items.getItem(i);
                    var values = $telerik.findValue(item.get_value(), "cboScope");
                    //get the checkbox element of the current item
                    var chk1 = $get(combo.get_id() + "_i" + i + "_cboScope");
                    if (values == "*")
                    {
                        agencylist.enable();
                        break;
                    } else {
                        agencylist.disable();
                    }
                }
            }
function onCheckBoxClick(chk)
            {
                var combo = $find("<%= cboPolicyScope.ClientID %>");
                var agencylist = $find("<%= cboUserAgencies.ClientID %>");
                 
                //holds the text of all checked items
                var text = "";
                //holds the values of all checked items
                var values = "";
                //get the collection of all items
                var items = combo.get_items();
                //enumerate all items
                for (var i = 0; i < items.get_count(); i++)
                {
                    var item = items.getItem(i);
                    var values = $telerik.findValue(item.get_value(), "cboScope");
                    //get the checkbox element of the current item
                    var chk1 = $get(combo.get_id() + "_i" + i + "_cboScope");
                    if (values == "*")
                    {
                        agencylist.enable();
                        break;
                    } else {
                        agencylist.disable();
                    }
                }
            }


Ignore the unused variables, I was trying to finagle a method to get the data but no success. Anyone know a better way to do this? 

Thanks very much for any help -- I've looked over every source regarding RadGridCombo and the demos/templates.
Kid
Top achievements
Rank 1
 asked on 21 Dec 2010
3 answers
94 views
I have created a dynamic Gantt chart that my customer likes (attached distribution.jpg), but they want a vertical line running down the midpoint to make it stand out better (x 3.5 in this case which the user enters via a textbox, along with min and max for x axis).  Any suggestions on how to accomplish this?  (attachment distribution_desired.png is what I am looking to do)
Giuseppe
Telerik team
 answered on 21 Dec 2010
2 answers
101 views
I have a grid with 100% height and borderstyle="Solid" which is in a container with some padding. The bottom border of the grid appears to be missing. Is this an expected behavior of a 100% height grid in a padded container? If so , is there any way to get the bottom border to appear?
Pavlina
Telerik team
 answered on 21 Dec 2010
1 answer
287 views
Hello,

Is it possible to implement the following code in the code behind on run time only.
This code prevent post back when sorting the columns in the grid.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="RadGrid1">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="RadGrid1"  LoadingPanelID="2" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
   </telerik:RadAjaxManager>

I would like to prevent to write it in the html.

I have tried to write the following code with no results:

public void Page_Load(object sender, EventArgs e)
        {                       
            RadAjaxManager ajaxManager=new RadAjaxManager();
            ajaxManager.ID = "mkn";
  
            AjaxUpdatedControl ajaxUpdatedControl = new AjaxUpdatedControl("RadGrid1", "2");
  
              
            AjaxSetting see = new AjaxSetting();           
            see.AjaxControlID = "RadGrid1";
            see.UpdatedControls.Add(ajaxUpdatedControl);
  
            ajaxManager.AjaxSettings.Add(see);//.AddAjaxSetting(RadGrid1, RadGrid1,null);
                    }


Oren
Pavlina
Telerik team
 answered on 21 Dec 2010
8 answers
190 views
I have a problem with raising the event OnClientLoad inside the RadSplitter. I have instantiated  3 Radsplitter inside a RadMultiPage. 
If I click the tabs, nothing happens, only if a click the last tab the event OnClientLoad is raised and the alarm dialogbox is shown.


Here my default.aspx:
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal" PanesBorderSize="0"
        BorderSize="0">
        <telerik:RadPane ID="PanelTGDet" runat="server" Locked="true" Height="24" Scrolling="None">
            <telerik:RadTabStrip ID="tabStripTalkGroupDetails" OnTabClick="tabStripTalkGroupDetails_OnTabClick"
                runat="server" MultiPageID="mpageTalkGroupDetails">
                <Tabs>
                </Tabs>
            </telerik:RadTabStrip>
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane3" runat="server" Scrolling="Y" Height="100%">
            <telerik:RadMultiPage ID="mpageTalkGroupDetails" OnPageViewCreated="mpageTalkGroupDetails_PageViewCreated"
                SelectedIndex="0" runat="server">
            </telerik:RadMultiPage>
        </telerik:RadPane>
    </telerik:RadSplitter>
</asp:Content>

I have created 3 Tabs dynamically:
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            AddTab("Orango");
            AddTab("OrangoTango");
            AddTab("AnotherOrango");
        }
    }
 
    private void AddTab(string tabName)
    {
        RadTab tab = new RadTab();
        tab.Text = tabName;
        tabStripTalkGroupDetails.Tabs.Add(tab);
 
        RadPageView pageView = new RadPageView();
        pageView.ID = tabName;
        mpageTalkGroupDetails.PageViews.Add(pageView);
    }
 
    protected void tabStripTalkGroupDetails_OnTabClick(object sender, RadTabStripEventArgs e)
    {
    }
 
    protected void mpageTalkGroupDetails_PageViewCreated(object sender, RadMultiPageEventArgs e)
    {
        string userControlName = string.Empty;
 
        switch (e.PageView.ID)
        {
   
            case "Orango":
                userControlName = "~/Orango.ascx";
                break;
 
            case "OrangoTango":
                userControlName = "~/Orango.ascx";
                break;
 
            case "AnotherOrango":
                userControlName = "~/Orango.ascx";
                break;
 
            default:
                break;
        }
 
        if (!string.IsNullOrEmpty(userControlName))
        {
            Control userControl = Page.LoadControl(userControlName);
            userControl.ID = e.PageView.ID + "_userControl";
 
            e.PageView.Controls.Add(userControl);
        }
    }
}

My custom control with the splitter Orango.ascx look like:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Orango.ascx.cs" Inherits="Orango" %>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
    <script type="text/javascript">
        function MySplitloadedORANGO(sender, args) {
            alert("SplitterLoad ORANGO");
        }
 
 
    </script>
 
</telerik:RadCodeBlock>
 
<telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal" PanesBorderSize="0"
   OnClientLoad="MySplitloadedORANGO" BorderSize="0" Height="100%">
</telerik:RadSplitter>

The same problem occurs if I create 3 instances of Orango.ascx inside the RadPanel. What is wrong?
 
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal" PanesBorderSize="0"
        BorderSize="0">
        <telerik:RadPane ID="PanelTGDet" runat="server" Locked="true" Height="24" Scrolling="None">
            <telerik:RadTabStrip ID="tabStripTalkGroupDetails" OnTabClick="tabStripTalkGroupDetails_OnTabClick"
                runat="server" MultiPageID="mpageTalkGroupDetails">
  
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal" PanesBorderSize="0"
        BorderSize="0">
        <telerik:RadPane ID="PanelTGDet" runat="server" Locked="true" Height="24" Scrolling="None">
            <telerik:RadTabStrip ID="tabStripTalkGroupDetails" OnTabClick="tabStripTalkGroupDetails_OnTabClick"
                runat="server" MultiPageID="mpageTalkGroupDetails">
                <Tabs>
                </Tabs>
            </telerik:RadTabStrip>
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane3" runat="server" Scrolling="Y" Height="100%">
            <telerik:RadMultiPage ID="mpageTalkGroupDetails" OnPageViewCreated="mpageTalkGroupDetails_PageViewCreated"
                SelectedIndex="0" runat="server">
            </telerik:RadMultiPage>
        </telerik:RadPane>
    </telerik:RadSplitter>
</asp:Content>
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal" PanesBorderSize="0"
        BorderSize="0">
        <telerik:RadPane ID="PanelTGDet" runat="server" Locked="true" Height="24" Scrolling="None">
            <telerik:RadTabStrip ID="tabStripTalkGroupDetails" OnTabClick="tabStripTalkGroupDetails_OnTabClick"
                runat="server" MultiPageID="mpageTalkGroupDetails">
                <Tabs>
                </Tabs>
            </telerik:RadTabStrip>
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane3" runat="server" Scrolling="Y" Height="100%">
            <telerik:RadMultiPage ID="mpageTalkGroupDetails" OnPageViewCreated="mpageTalkGroupDetails_PageViewCreated"
                SelectedIndex="0" runat="server">
            </telerik:RadMultiPage>
        </telerik:RadPane>
    </telerik:RadSplitter>
</asp:Content>
             <Tabs>
                </Tabs>
            </telerik:RadTabStrip>
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane3" runat="server" Scrolling="Y" Height="100%">
            <telerik:RadMultiPage ID="mpageTalkGroupDetails" OnPageViewCreated="mpageTalkGroupDetails_PageViewCreated"
                SelectedIndex="0" runat="server">
            </telerik:RadMultiPage>
        </telerik:RadPane>
    </telerik:RadSplitter>
</asp:Content>

<telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal" PanesBorderSize="0"
        BorderSize="0">
        <telerik:RadPane ID="PanelTGDet" runat="server" Locked="true" Height="24" Scrolling="None">
            <telerik:RadTabStrip ID="tabStripTalkGroupDetails" OnTabClick="tabStripTalkGroupDetails_OnTabClick"
                runat="server" MultiPageID="mpageTalkGroupDetails">
                <Tabs>
                </Tabs>
            </telerik:RadTabStrip>
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane3" runat="server" Scrolling="Y" Height="100%">
            <telerik:RadMultiPage ID="mpageTalkGroupDetails" OnPageViewCreated="mpageTalkGroupDetails_PageViewCreated"
                SelectedIndex="0" runat="server">
            </telerik:RadMultiPage>
        </telerik:RadPane>
    </telerik:RadSplitter>
<telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal" PanesBorderSize="0"
        BorderSize="0">
        <telerik:RadPane ID="PanelTGDet" runat="server" Locked="true" Height="24" Scrolling="None">
            <telerik:RadTabStrip ID="tabStripTalkGroupDetails" OnTabClick="tabStripTalkGroupDetails_OnTabClick"
                runat="server" MultiPageID="mpageTalkGroupDetails">
                <Tabs>
                </Tabs>
            </telerik:RadTabStrip>
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane3" runat="server" Scrolling="Y" Height="100%">
            <telerik:RadMultiPage ID="mpageTalkGroupDetails" OnPageViewCreated="mpageTalkGroupDetails_PageViewCreated"
                SelectedIndex="0" runat="server">
            </telerik:RadMultiPage>
        </telerik:RadPane>
    </telerik:RadSplitter>
 
Igor
Top achievements
Rank 1
 answered on 21 Dec 2010
1 answer
92 views

           

Hello,
Please, I need help.
I am using treeview inside a combobox, I see the telerik demo about this issue but instead of using static nodes I am using my sql datasource.
The problem is that in the first open dropdown list everything is ok but when I want to open it again it gives me a javascript error in:
function OnClientDropDownOpenedHandler(sender, eventArgs) {
                var tree = sender.get_items().getItem(0).findControl("tvCategories");
                var selectedNode = tree.get_selectedNode(); ******* here******* null reference
                if (selectedNode) {
                    selectedNode.scrollIntoView();
                }
            }
that's mean that he don't have data source, I tried to use attribute Autopostback=true to go by ajax using also radajaxmanager to the server and get my data source but it didn't work anyway this is my code and I appreciate.

 

   function nodeClicking(sender, args) {
                var comboBox = $find("<%= cboAddRoot.ClientID %>");

                var node = args.get_node()

                comboBox.set_text(node.get_text());

                comboBox.trackChanges();
                comboBox.get_items().getItem(0).set_text(node.get_text());
                comboBox.commitChanges();

                comboBox.hideDropDown();

                // Call comboBox.attachDropDown if:
                // 1) The RadComboBox is inside an AJAX panel.
                // 2) The RadTreeView has a server-side event handler for the NodeClick event, i.e. it initiates a postback when clicking on a Node.
                // Otherwise the AJAX postback becomes a normal postback regardless of the outer AJAX panel.

                //comboBox.attachDropDown();
            }
            function OnClientDropDownOpenedHandler(sender, eventArgs) {
                var tree = sender.get_items().getItem(0).findControl("tvCategories");
                var selectedNode = tree.get_selectedNode();
                if (selectedNode) {
                    selectedNode.scrollIntoView();
                }
            }
            function StopPropagation(e) {
                if (!e) {
                    e = window.event;
                }

                e.cancelBubble = true;
            }

 

 

<tr>
                            <td>
                                Add Root Category:
                            </td>
                            <td>
                                 <telerik:RadComboBox ID="cboAddRoot" runat="server" Width="250px" AutoPostBack="true"
                                    ShowToggleImage="True" Style="vertical-align: middle;" OnClientDropDownOpened="OnClientDropDownOpenedHandler"
                                    EmptyMessage="Choose a Category" ExpandAnimation-Type="None" CollapseAnimation-Type="None">
                                    <ItemTemplate>
                                        <div id="div1">
                                            <telerik:RadTreeView runat="server" ID="tvCategories" DataFieldID="ID" DataSourceID="SqlDataSource1"
                                                DataFieldParentID="ParentID" DataTextField="Name"
                                                DataValueField="ID"
                                             OnClientNodeClicking="nodeClicking" Width="100%" Height="140px">
                                            </telerik:RadTreeView>
                                        </div>
                                     </ItemTemplate>
                                      <Items>
                                            <telerik:RadComboBoxItem Text="" />
                                      </Items>
                                    </telerik:RadComboBox>
                                    <script type="text/javascript">
                                        var div1 = document.getElementById("div1");
                                        div1.onclick = StopPropagation;
                                    </script>

                            </td>
                        </tr>

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server" EnableViewState="true" ConnectionString="<%$ ConnectionStrings:ERPCS %>"
        SelectCommand="SELECT * FROM [ProductCategories]"></asp:SqlDataSource>

                                  OnClientNodeClicking="nodeClicking" Width="100%" Height="140px">
                                            </telerik:RadTreeView>
                                        </div>
                                     </ItemTemplate>
                                      <Items>
                                            <telerik:RadComboBoxItem Text="" />
                                      </Items>
                                    </telerik:RadComboBox>
                                    <script type="text/javascript">
                                        var div1 = document.getElementById("div1");
                                        div1.onclick = StopPropagation;
                                    </script>

                            </td>
                        </tr>




<asp:SqlDataSource ID="SqlDataSource1" runat="server" EnableViewState="true" ConnectionString="<%$ ConnectionStrings:ERPCS %>"
        SelectCommand="SELECT * FROM [ProductCategories]"></asp:SqlDataSource>
Dimitar Terziev
Telerik team
 answered on 21 Dec 2010
3 answers
743 views
Hi,
 I am looking for Inline document viewer in Web applications.I have a requirement to show all the documents(doc,docx,.rtf,xls,ppt..etc) in the browser as inline document like (Scribd).Does Telrik has kind of viewer in your product line.

Thanks,
Rumen
Telerik team
 answered on 21 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?