Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
154 views

Hi,
    OnClientLoad i am populating the Radcombobox with list of datas. Now  I am having a checkbox item template inside the RadCombobox, OnclientLoad how can i populate the checkbox with corresponding list of values.

<telerik:RadComboBox ID="RadComboBox1" OnClientLoad="loadComboBox" OnClientDropDownClosed="OnClientDropDownClosedHandler"  runat="server">
    <ItemTemplate>
        <div >
          <asp:CheckBox ID="CheckBox1" runat="server" Checked="true" onclick="onCheckBoxClick(this)"/>
            <asp:Label runat="server" ID="Label1" AssociatedControlID="CheckBox1">
            </asp:Label>
        </div>
  </ItemTemplate>

My function looks somewhat similar like this for binding only list of datas:
  function OnCompleteOne(result) {

                var combo = $find("<%= RadComboBox1.ClientID %>");
                for (var i = 0; i < result.length; i++) {

                    var comboItem = new Telerik.Web.UI.RadComboBoxItem();
                    comboItem.set_text(result[i]);
                    combo.trackChanges();
                    combo.get_items().add(comboItem);
                    var items = combo.get_items();
                     comboItem.select();
                    combo.commitChanges();
                }

                      }


My requriment is  i want to assign the result values to the checkbox.
Kindly provide sample code if possible.

Thanks and regards,
Karthikeyan.G

Karthi Keyan
Top achievements
Rank 1
 answered on 25 Nov 2009
2 answers
187 views

how to call aspx page instead of ascx page in tabstrip rad multipage.




protected
void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)

 

{

 

string userControlName = e.PageView.ID + ".ascx";

 

 

Control userControl = Page.LoadControl(userControlName);

 

userControl.ID = e.PageView.ID +

"_userControl";

 

e.PageView.Controls.Add(userControl);

 

 

 

 

//e.PageView.Controls.Add(f1);

 

}

priya nallaperumal
Top achievements
Rank 1
 answered on 25 Nov 2009
1 answer
143 views
Hi,
  we have a griddropdowncolumn in our grid, however I want to set the selected value of the dropdownlist to the selected value of an
drop down list of the form called ddl_dayDate. Any ideas how to do this?



        <telerik:GridDropDownColumn  FilterControlWidth="250px"
        DataField = "day_date_id" DataSourceID="sql_daydate_all"
            HeaderText="day date" ListTextField="day_date_ref" ListValueField="id"
            UniqueName="day_date_id" ColumnEditorID="DropDownColumnEditor1">
           
             <HeaderStyle Width="160px" />
              <FilterTemplate>
                            <telerik:RadComboBox ID="RadComboBoxTitle" DataSourceID="sql_daydate_all" DataTextField="day_date_ref"
                                DataValueField="id"  AppendDataBoundItems="true"
                              SelectedValue='<%#  ((GridItem)Container).OwnerTableView.GetColumn("day_date_id").CurrentFilterValue %>'
                              
                                runat="server" OnClientSelectedIndexChanged="DayDateIndexChanged">
                                <Items>
                                    <telerik:RadComboBoxItem Text="All" />
                                </Items>
                            </telerik:RadComboBox>
                            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                                <script type="text/javascript">
                                    function DayDateIndexChanged(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("day_date_id", args.get_item().get_value(), "EqualTo");
                                    }
                                </script>

                            </telerik:RadScriptBlock>
                        </FilterTemplate>
        </telerik:GridDropDownColumn>
Shinu
Top achievements
Rank 2
 answered on 25 Nov 2009
2 answers
90 views
Hi
  In RadComboBox OnClientDropDown event is worked in ie,chrome,firefox. But in opera its not working
    Here is the sample code I have worked out.
    In this sample I added OnClientDropdown in  RadCombo
    Its worked except Opera Browser.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="Test._Default" %> 
<%@ 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>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
        <div> 
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <telerik:RadComboBox ID="ddlTest" runat="server" > 
        </telerik:RadComboBox> 
        <telerik:RadComboBox ID="ddlTest1" runat="server" OnClientDropDownOpened ="test" > 
        </telerik:RadComboBox>      
        </div> 
    </form> 
</body> 
<script language="javascript" type="text/javascript" > 
function test()  
{  
alert("Test");  
}  
</script> 
</html> 
 
pasam Anna
Top achievements
Rank 1
 answered on 25 Nov 2009
2 answers
95 views
Hello there,

Yesterday, i'v downloaded the "RadControls_for_ASP.NET_AJAX_2009_3_1103_trial.msi" file.

When i open the "RadControls for ASP.NET AJAX Q3 2009 Live Examples" shorcut on my desktop it open the exemple web site
normally on http://localhost:1265/radcontrols_aspnetajax/Controls/Examples/Default/DefaultCS.aspx.

When i open the exemple web site in Visual Studio and run it, everythings goes fine, but when i stop run it and want to view an 
aspx file in design mode all controls ave errors telling "Could not load file or assembly "Telerik.Web.UI ....., The system cannot find the 
file specified".

The same thing happend when i want to create a new project.

Can someone help me ? please !


Degroot Axel
Top achievements
Rank 1
 answered on 24 Nov 2009
0 answers
118 views
What does this integer mean?
Minutes, days, months etc...


EDIT: The number of times to repeat the occurrence based on the recurrence settings.
towpse
Top achievements
Rank 2
 asked on 24 Nov 2009
3 answers
162 views
I have made my own rightclick menu for selecting which headers has to be shown and which doesn't. I have done this by code above:

<telerik:RadContextMenu ID="RadGrid1ContextMenu" runat="server" 
    OnClientItemClicked="RadGrid1ContextMenu_ClientItemClicked"
    <Targets> 
        <telerik:ContextMenuControlTarget ControlID="RadGrid1" /> 
    </Targets> 
    <Items> 
        <telerik:RadMenuItem Text="Status" Value="Status" 
            ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" 
            SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" Selected="true" /> 
        <telerik:RadMenuItem Text="Username" Value="UserName" 
            ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" 
            SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" Selected="true" /> 
        <telerik:RadMenuItem Text="Firstname" Value="FirstName"
            ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" 
            SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" /> 
        <telerik:RadMenuItem Text="Lastname" Value="LastName" 
            ImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box-uncheck.png" 
            SelectedImageUrl="App_Themes/Default/Graphics/Icons/ui-check-box.png" /> 
    </Items> 
</telerik:RadContextMenu> 

I get my menu as expected but my problem is then that it not is possible to select more than one item. When I select an item, all other items are getting deselected.

I'm aware that the exist an EnableHeaderContextMenu for the grid, but I'm not interested in the sorting and grouping functionality in this menu (sorting should only be done by click at the header), and I want to execute some serverside code, when select and deselecting columns - and not letting the grid do the column-hiding.

Best regards,
Kenneth


Ahrensberg
Top achievements
Rank 1
 answered on 24 Nov 2009
1 answer
97 views
I am trying to install the Q3 2009 package for ASP AJAX Controls and everything seems to install fine.  I can even view the 'welcome page' at http://localhost:3445/radcontrols_aspnetajax/Controls/Examples/Default/Default.CS.aspx (which I think can be found at: c:\Program Files\Telerik\RadControls for ASPNET AJAX Q1 2009\Live Demos) but get an error when clicking on about half of the example demos:

Here are the demos that break:
Ajax - first look
ComboBox - first look
RadGrid - SuperbPerformance, Hierarchy with Templates, Client-side Data Binding (works but with no data)

The error that I do get is this:
A network-related or instance-specific error occured while establishing a connection to SQL Server. The server was not found or was not accessible.

On thing to note is that I am inside a virtual that does not have a connection to the internet.  I do have SQL Server 2005 installed but after checking the web.config found in the Live Demos directory, I cant seem to locate a database of Telerik.mdf or event Northwind.mdf.  Also, I dont have a server called SQLEXPRESS but I do have localhost.  I changed the web.config from .\SQLEXPRESS to .\localhost, but same error.

J
J
Top achievements
Rank 1
 answered on 24 Nov 2009
0 answers
124 views

Hi,

I am Using RADScheduler, I would like tocustomize the in-line edit and create window. How to close the Edit or Create window in server side event (RadScheduler1_AppointmentCommand)

Thanks

Sabarish

sabarishbabu
Top achievements
Rank 1
 asked on 24 Nov 2009
2 answers
187 views
Dear Experts,

I have a issue with performing custom filtering using RadDatePicker on RadGrid.

I have a datetime column on the grid and I am using template column to assign the values on the grid.

The RadDatePicker control works perfect on one date column which contains DateTimeValues values on all the rows.

But it is not working on a column where there are very few values and also contains DBNULL values. Thanks in advance.

Here is the code
-------------------------------------

<FilterTemplate>
                                            <telerik:RadDatePicker ID="PickupDatePicker" runat="server" Width="90px" ClientEvents-OnDateSelected="PickupDateSelected"
                                                DbSelectedDate='<%# SetPickupDate(Container) %>' />
                                            <telerik:RadScriptBlock ID="RadScriptPickupDate" runat="server">

                                                <script type="text/javascript">
                                                    function PickupDateSelected(sender, args) {
                                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                        var date = FormatPickupSelectedDate(sender);                                                       
                                                        tableView.filter("Pickup_Dt", date, "EqualTo");
                                                    }
                                                    function FormatPickupSelectedDate(picker) {
                                                        var date = picker.get_selectedDate();
                                                        var dateInput = picker.get_dateInput();
                                                        var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());
                                                        return formattedDate;
                                                    }
                                                </script>

                                            </telerik:RadScriptBlock>
                                        </FilterTemplate>
-------------------------------------
protected DateTime? SetPickupDate(Telerik.Web.UI.GridItem item)
    {
        if (item.OwnerTableView.GetColumn("Pickup_Dt").CurrentFilterValue == string.Empty)
        {
            return new DateTime?();
        }
        else
        {
            return DateTime.Parse(item.OwnerTableView.GetColumn("Pickup_Dt").CurrentFilterValue);
        }
    }   

 protected void uxRGrid_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridFilteringItem)
            {
             Telerik.Web.UI.RadDatePicker dtpickerPickupDate = (Telerik.Web.UI.RadDatePicker)(e.Item as Telerik.Web.UI.GridFilteringItem)["Pickup_Dt"].Controls[1];
                dtpickerPickupDate.Culture = Thread.CurrentThread.CurrentUICulture; 
            }
}
-------------------------------------

Deva Kumar
Top achievements
Rank 1
 answered on 24 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?