Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
179 views
Hi.

I'm creating a custom control to handle complex relations between 3 resources.
I will consist of 2 Combos and a CheckBoxList.
At what point can I populate these controls with their selectable values in a clientside event?
I'm quite sure I know where to handle the loading, selection and saving of the chosen values to the appointment.

/Jesper
Peter
Telerik team
 answered on 09 Jul 2012
1 answer
120 views
Hi,

How would I go about using jquery to add a click event to an orgchart?  I want to be able to click on a person then display that person in a popup window so would need the ID.

Am I better adding a click event from teh code behind or is it easy to do with jquery - examples much appreciated!

Regards,

Jon
Plamen
Telerik team
 answered on 09 Jul 2012
1 answer
115 views
I have been given a design for a menu in CSS-HTML which I am attempting to develop using RadMenu.   The design includes border images for the submenu as well as two background images (upper left and lower right) to create a gradient.   To accomplish this, I need to add a number of DIV tags to the top and bottom of the <li> for the submenu.  I have been able to add controls to the individual menu items, but I can't find a way to them to the submenu as a whole.  Is this possible?  Is there some other approach that would work?  I have had a quick look at skins, but as far as I can tell that will only allow me to add a single background image to a submenu, which is not exactly what I need to do.

Thank you!
Peter
Telerik team
 answered on 09 Jul 2012
2 answers
202 views
Hi,

in the following test project I'm trying to set 2 filters one after the other. But as soon as one is set the other doesnt apply anymore!
Is there a way to have them both apply?

Thanks in advance.
Christian

Public Class MyCustomBoundColumn
    Inherits GridBoundColumn
 
    Public dsDataSource As DataTable
 
    Public Function GetDataTable(ByVal strColumnName As String) As DataTable
        Dim disctinctValues As DataTable = Nothing
        If TypeOf (dsDataSource) Is DataTable Then
            Dim View As New DataView(dsDataSource)
            disctinctValues = View.ToTable(True, strColumnName)
        End If
 
        Return disctinctValues
    End Function
 
    Protected Overrides Sub SetupFilterControls(ByVal cell As TableCell)
        Dim rcBox As New RadComboBox()
        rcBox.ID = "cboFilter" & Me.DataField
        rcBox.DataTextField = Me.DataField
        rcBox.DataValueField = Me.DataField
        rcBox.AutoPostBack = False
        AddHandler rcBox.SelectedIndexChanged, AddressOf rcBox_SelectedIndexChanged
        Dim table As DataTable = GetDataTable(Me.DataField)
        Dim row As DataRow = table.NewRow()
        row(Me.DataField) = ""
        table.Rows.InsertAt(row, 0)
        rcBox.DataSource = table
        cell.Controls.Add(rcBox)
    End Sub
 
    Protected Overrides Sub SetCurrentFilterValueToControl(ByVal cell As TableCell)
        If Not (Me.CurrentFilterValue = "") Then
            DirectCast(cell.Controls(0), RadComboBox).Items.FindItemByText(Me.CurrentFilterValue).Selected = True
        End If
    End Sub
 
    Protected Overrides Function GetCurrentFilterValueFromControl(ByVal cell As TableCell) As String
        Dim currentValue As String = DirectCast(cell.Controls(0), RadComboBox).SelectedItem.Value
        Me.CurrentFilterFunction = If((currentValue <> ""), GridKnownFunction.EqualTo, GridKnownFunction.NoFilter)
        Return currentValue
    End Function
 
    Private Sub rcBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)
        DirectCast(DirectCast(sender, RadComboBox).Parent.Parent, GridFilteringItem).FireCommandEvent("Filter", New Pair())
    End Sub
End Class

Imports Telerik.Web.UI
Imports System.Data
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Data.SqlClient
Imports System.Configuration
 
Public Class _Default
    Inherits System.Web.UI.Page
 
    Public myDataTable As DataTable
 
    Private Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        GetDataTable()
 
        Dim myColumn As MyCustomBoundColumn
 
        myColumn = New MyCustomBoundColumn
        myColumn.DataField = "name"
        myColumn.HeaderText = "name"
        myColumn.dsDataSource = myDataTable
        gvDataTable.MasterTableView.Columns.Add(myColumn)
 
        myColumn = New MyCustomBoundColumn
        myColumn.DataField = "mandant_name"
        myColumn.HeaderText = "mandant_name"
        myColumn.dsDataSource = myDataTable
        gvDataTable.MasterTableView.Columns.Add(myColumn)
    End Sub
 
    Private Sub GetDataTable()
        Dim ConnString As String = ConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString
        Dim MySqlConnection As New SqlConnection(ConnString)
        Dim MySqlDataAdapter As New SqlDataAdapter()
        MySqlDataAdapter.SelectCommand = New SqlCommand("SELECT * FROM getUser", MySqlConnection)
        MySqlConnection.Open()
        Try
            myDataTable = New DataTable
            MySqlDataAdapter.Fill(myDataTable)
        Finally
            MySqlConnection.Close()
        End Try
 
    End Sub
 
    Private Sub gvDataTable_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles gvDataTable.NeedDataSource
            gvDataTable.DataSource = myDataTable
    End Sub
 
End Class

<form id="form1" runat="server" style="height:100%; width:100%;margin: 0px;padding: 0px;">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" ScriptMode="Release" EnableScriptLocalization="true" EnableScriptGlobalization="true"
     CombineScripts="false" runat="server" EnablePartialRendering="true">
    </asp:ToolkitScriptManager>
 
    <asp:UpdatePanel runat="server" ID="upaDT" UpdateMode="Conditional" ChildrenAsTriggers="true">
        <ContentTemplate>
            <telerik:RadButton ID="RadButton1" runat="server" Text="set filter" AutoPostBack="true">
            </telerik:RadButton>
        <telerik:RadGrid ID="gvDataTable" runat="server" AutoGenerateColumns="false" Height="600px" AllowSorting="true" AllowFilteringByColumn="true"
        EnableLinqExpressions="false">
        <MasterTableView DataKeyNames="guid" ClientDataKeyNames="guid" AllowFilteringByColumn="true" EnableColumnsViewState="false">
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="true" >
            <ClientEvents/>
            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        </ClientSettings>
        </telerik:RadGrid>
        </ContentTemplate>
    </asp:UpdatePanel>
</form>

Maria Ilieva
Telerik team
 answered on 09 Jul 2012
1 answer
142 views
How can I disable button automatically after  10 seconds?
Princy
Top achievements
Rank 2
 answered on 09 Jul 2012
7 answers
422 views
Hello,
I'm trying to move my first steps with RadScheduler, but probably I'm missing something obvious since I really can't get it to work as expected.
I have some questions, which should be easy to answer:

  • DayStartTime and DayEndTime should tell the control the first and last hour to display right?

I've tried setting it in designer, aspx code, code behind but none of them seems to work since it still displays from 00:00 to 24:00.
No problem with WorkDayStartTime and WorkDayEndTime they seems to work properly.
Am I doing something wrong? This is the latest configuration in code behind:

            RadScheduler1.DayStartTime = new TimeSpan(8, 0, 0);
            RadScheduler1.DayEndTime = new TimeSpan(20, 0, 0);

EDIT: Resolved, I had the showfulltime option conflicting with the above settings  

  • Works in IE8, not the same in Chrome

I'm trying to achieve some sort of full screen agenda, 100% width and everything runs fine in IE, but when in Chrome the scheduler doesn't want to stretch to 100% width even if it's div container does and radscheduler's width property is set to 100%. Furthermore the vertical scrollbar is disabled until I resize the Chrome window.

EDIT: Could you provide a working layout with fixed header on top of the page, fixed footer on bottom of the page, and the scheduler filling the central part adapting to any window resize? I've tried my best, but still can't find a way out.

  • Appointment background

I'm using the very appreciated metro skin, but when changing the colors by means of:

<telerik:ResourceStyleMapping Type="User" Key="1" Text="Resource 1" ApplyCssClass="rsCategoryBlue" />

it only applies to top border, while in the example screenshots I see the full appoinment box with a nice green backround. Should I go with some more complicated setting for the background?

EDIT: Resolved, I modified the appointment template to reflect my background color needs  


  • I tried starting from scratch with the Scheduler / Binding to Generic List example

Everything works as expected after copying the example code except the refresh that on my side keeps giving a postback instead of the cute busy indicator. What am I missing? Could you isolate the example so that I can reproduce it?


Best regards
Peter
Telerik team
 answered on 09 Jul 2012
1 answer
198 views
Hi,

I have a page designed with Rad Tree View. I need to acheive the following scenario.
In the expand node image click of rad tree view,I need to show a Tool Tip based on certain condition( See the Attached Image)

I have specified Rad Tool Tip control ,but I am not sure which control I will give for "TargetControlID".

I have used Javascript OnClientNodeExpaned event.
When I tried to display RadToolTip with out Target Control Id using Show() method.I am getting "Object expected Error".

How will I acheive the scenario.

Princy
Top achievements
Rank 2
 answered on 09 Jul 2012
2 answers
82 views
Hi,

I used the SPTelerik:SPRadEditor for a custom edit form of a custom sharepoint 2010 list.
This works fine when I use chrome, however when I use IE8, I am getting a problem.

Attached are 2 screenshots.
  1. custom form with telerik spradeditor.png - shows that there is this white box that is covering the rad editor.
  2. ie8 developer tool.png - shows that the white box is caused by the html node <body contentEditable="true" /> which is, for some reason, on top of the rad editor. This screenshot also shows that the html node is generated by the radeditor itself.

Note that I am using RadControls for SharePoint Q1 2012.


Thanks in advance.

Rafferty
Rafferty
Top achievements
Rank 1
 answered on 09 Jul 2012
5 answers
475 views
Hy,
I would like to move between tabs by clicking a button, but without sync-postback.
(I would like to use Async-postback)
is it possible?


thanks
Dimitar Terziev
Telerik team
 answered on 09 Jul 2012
1 answer
158 views
Good morning,

I'm using an ODataDataSource to bind data to a RadComboBox. Currently the data source is retrieving all of the fields for each record whereas I'd like to only retrieve the fields I need for binding. I specified the fields (see code below) in the model declaration, which I would've expected to be passed on to the service call but that doesn't seem to be the case. 

Can you please let me know if this is a bug or if there is a way I can inject a $select clause to the service call?

Thanks, Jason

Markup:
<telerik:RadODataDataSource ID="dsComboBoxes" runat="server"
    ClientIDMode="Static">
</telerik:RadODataDataSource>               
 
<telerik:RadComboBox ID="cbxQuickAdd" runat="server"
    Width="100%" Height="190px" Skin="Simple"
    EnableLoadOnDemand="true"
    EmptyMessage="Type to Filter"
    EnableItemCaching="true"
    ODataDataSourceID="dsComboBoxes"
    DataModelID="Resource"
    DataTextField="Description"
    DataValueField="ID">
</telerik:RadComboBox>

Codebehind:
dsComboBoxes.Transport.Read.Url = ConfigurationManager.AppSettings.GetURL("BindingServiceURL");
dsComboBoxes.Transport.Read.DataType = ODataSourceResponseType.JSONP;
     
DataModel quickAdd = new DataModel()
{
    ModelID = groupType.Singularize(),
    Set = groupType
};
 
quickAdd.Fields.Add(new DataModelField() { FieldName = "ID" });
quickAdd.Fields.Add(new DataModelField() { FieldName = "Description" });
dsComboBoxes.Schema.Add(quickAdd);
Dimitar Terziev
Telerik team
 answered on 09 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?