Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
97 views
I'm hoping that this is an easy question, and that I have just missed finding the answer.  Can you add other controls such as the RadTextBox to a RadRibbonBar?  I am using VS 2010 and each time I try to add between to the <Items> tags, it gives me an error:

Telerik.Web.UI.RibbonBarItemCollection must have items of type 'Telerik.Web.UI.RibbonBarItem'. 'telerik:RadTextBox' is of type 'Telerik.Web.UI.RadTextBox'

Any help is appreciated.

Thanks.

Nick
Nikolay Tsenkov
Telerik team
 answered on 19 May 2011
1 answer
126 views
Hello,
I have a radgrid with GridButtonColumn for deleteing row. On clicking the command image, appears radconfirm asking the user if he is sure of the deleting.
I am searching for event(js) BEFORE the confirmation appears on client, because the text of the confirmation depends on the type of the row - some types need text1 and some needs text2.
Witch event can i call?
I tried <clientEvents> of the grid such as: OnCommand, OnRowDeleted but it didnt help - first was shown the confirm and then get in the js function.

thanks,
gila
Tsvetina
Telerik team
 answered on 19 May 2011
2 answers
205 views
Hi,

I've got a RadListBox linked with a RequiredFieldValidator from ASP.NET and it's possible this RadListBox loads with preselected items. So, I open the corresponding page and reckon I haven't got to make a change in the selection of the RadListBox and just press my validation button. Unfortunately, I'm getting an error from the validator that I haven't selected a thing in my RadListBox, while there are some items preselected.

My RadListBox looks like:
<telerik:RadListBox ID="DepartmentsListBox" runat="server" CheckBoxes="true" SelectionMode="Multiple" Width="95%" DataSourceID="DepartmentsDataSource" DataTextField="Name" DataValueField="DepartmentID" OnDataBound="DepartmentsListBox_DataBound">
</telerik:RadListBox>
<asp:ObjectDataSource ID="DepartmentsDataSource" runat="server"
    SelectMethod="GetDepartments" TypeName="Datamex.Projects.Nebulus.BusinessLogics.Departments">
</asp:ObjectDataSource>

The RadListBox loads like:
protected void DepartmentsListBox_DataBound(object sender, EventArgs e)
{
    foreach (RadListBoxItem item in DepartmentsListBox.Items)
    {
        item.Checked = hc.DepartmentHourCategoryLinks.Any(l => l.DepartmentID == Guid.Parse(item.Value));
    }
}

And the validator:
<asp:RequiredFieldValidator ID="DepartmentsValidator" runat="server" ControlToValidate="DepartmentsListBox" ValidationGroup="Save" CssClass="Validator" Text="*" ErrorMessage="<%$ Resources:Resources, DepartmentsRequiredMessage %>" />

As you can see the DataBound event checks the preselected items as it should, but if I click my validation button I get the error from my validator that I haven't checked any items in the RadListBox.

What am I doing wrong?

Thanks in advance.

Regards,
Datamex
Shinu
Top achievements
Rank 2
 answered on 19 May 2011
5 answers
163 views
Hello all,

On my page I have a list of employees on the left side of the page, and as the user selects different employees I want to change the colors of the employee selected in the bar chart that I have.

In the attached you will see 2 bar charts, the chart I am talking about is the "Branch Sales Compparision" chart. The chart that shows multiple employees.

So in the attachment I have choosen Ian F. Jones so in the bar chart I want to make his bar colors a darker color.
Thanks,
KS
Evgenia
Telerik team
 answered on 19 May 2011
2 answers
81 views
Hi there,

I have to handel different Datatypes in one Templatecolumn. For this I have to load dynamic different controls to provide a proper interface for the user.
I attached a picture to this post.

As you can see, the column "typ" represents different kinds of datatypes. If the user presses the editbutton, the control in the colum "Wert" has to represent a proper control. For the date-type I need the "raddatepicker" and for the integer a RadNumericTextBox and so on.

Anybody an idea to solve this problem?

Best regards.
Vasil
Telerik team
 answered on 19 May 2011
0 answers
98 views
Hi All,

    i am getting an error "Microsoft JScript runtime error: Sys.ArgumentUndefinedException: Value cannot be undefined.
Parameter name: type"  in sharepoint development but its works fine in normal web page ..

Coding :
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="radGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl LoadingPanelID="RadAjaxLoadingPanel1" ControlID="radGrid"/>
                    <telerik:AjaxUpdatedControl ControlID="divMsg" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

Can anyone solve this , thanks in advance.
Guna
Top achievements
Rank 1
 asked on 19 May 2011
1 answer
351 views

Hi Telerik Team,

i hav attached my application template design.In Master Page i will be having

 

 

RadAjaxLoadingPanel

but my requirement is that whatever i do in virtual scrolling grid in content page,that grid portion alone should get postback rather getting the whole page postback.In Content Page there may be some other controls that should be controlled by master page loading panel.

Can anyone help me in this?
Maria Ilieva
Telerik team
 answered on 19 May 2011
1 answer
129 views

How to trigger the RadCombo ItemRequest and page Default button on "Enter" Key press
Actual case:

1. Two combo Boxes   are there -- Issue & Pool

2. Pools are loaded depending upon the issue selection only

3. Having the coding in Item request Event for Issue combo box

4. While I set the enter key as default button to achive the Ok button functionality Item request Event is trigged   -- How can I overcome this problem

 

Expecting

1. Two combo Boxes   are there -- Issue & Pool

2.  Pools are loaded depending upon the issue selection only

3. Having the coding in Item request Event for Issue combo box

4. If I place the cursor in issue combo and enter the Enter Key OK button functionality has to carried out.

Following is the code which I tried for the solution.

 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_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">
  
<head runat="server">
    <title>Untitled Page</title>
    <script language="javascript" type="text/javascript">
  
    var isPost=false;
    var issueDropDownClickStatus=false;
            function onDropDownOpening(sender, args) 
            
                var ev = args.get_domEvent();  
                if (ev) 
                {  
                    var target = ev.target || ev.srcElement;  
                    if (target.id == sender.get_id() + "_Arrow")
                    
                      
                        issueDropDownClickStatus = true;             
                    }  
                }         
            
                            
            function OnClientItemsRequesting(sender,e)
            {           
              
                    if(sender.get_appendItems())
                    {
                        e.get_context().CustomText="";                       
                    }
                    else
                    {
                        e.get_context().CustomText=sender.get_text();                        
                    }
                    if(issueDropDownClickStatus == true)
                    {
                        e.get_context().CustomText="";
                         
                    }
                   issueDropDownClickStatus = false;
            }
              
         
         
       function KeyHandler()
       {debugger;
            if(event.keyCode=='27')
            {
              
            }
       }
          
          
             document.onkeydown = KeyHandler;
              
            </script>
</head>
<body>    
     
    <form id="form1" runat="server">
    <div>
     <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
        <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td style="white-space: nowrap">
                    <asp:Label ID="lblIssueTitle" runat="server">Issue:</asp:Label>
                </td>
                <td>
                    <telerik:RadComboBox TabIndex="2" ID="drpIssues" runat="server" Height="80px" EnableScreenBoundaryDetection="false"
                        AllowCustomText="false" MarkFirstMatch="true" EnableVirtualScrolling="true" EnableLoadOnDemand="True" ItemsPerRequest="5"
                        ShowMoreResultsBox="true" AutoPostBack="true" HighlightTemplatedItems="true" OnClientItemsRequesting="OnClientItemsRequesting" >
                    </telerik:RadComboBox>
                </td>
            </tr>
             <tr>
                <td style="white-space: nowrap">
                    <asp:Label ID="Label1" runat="server">Pool:</asp:Label>
                </td>
                <td>
                    <telerik:RadComboBox TabIndex="2" ID="drpPool" runat="server" Height="80px" EnableScreenBoundaryDetection="false"
                          EnableVirtualScrolling="true" EnableLoadOnDemand="True" ItemsPerRequest="5" AutoPostBack="true">
                    </telerik:RadComboBox>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="left">
                    <asp:Button ID="ibtnAdd" runat="server" Text="OK" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <telerik:RadGrid id="dgdloan" pagesize="10" runat="server" autogeneratecolumns="False"
                        allowpaging="true" gridlines="None" allowsorting="true">
                                            <ClientSettings>
                                                <Scrolling UseStaticHeaders="true" AllowScroll="true" />
                                            </ClientSettings>
                                            <MasterTableView DataKeyNames="internal_id" AllowMultiColumnSorting="true" AllowSorting="true">
                                                <Columns>
                                                    <telerik:GridBoundColumn  HeaderText="Loan Number" ItemStyle-Wrap="false"
                                                        HeaderStyle-Wrap="false">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn HeaderText="Loan Status" ItemStyle-Wrap="false"
                                                        HeaderStyle-Wrap="false" AllowSorting="true">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn  HeaderText="Loan State" ItemStyle-Wrap="false"
                                                        HeaderStyle-Wrap="false" >
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn HeaderText="Loan Type" ItemStyle-Wrap="false"
                                                        HeaderStyle-Wrap="false" >
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn HeaderText="Product Type" ItemStyle-Wrap="false"
                                                        HeaderStyle-Wrap="false" >
                                                    </telerik:GridBoundColumn>
                                                </Columns>
                                            </MasterTableView>
                                        </telerik:RadGrid>
                </td>
            </tr>
        </table>
  
      
    </div>
    </form>
</body>
</html>
Imports System.Data
Imports Telerik.Web.UI
  
Partial Class _Default
    Inherits System.Web.UI.Page
  
    Private mIssueDT As DataTable
  
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            'mIssuePool = AddEmptyRowToIssueMultiple()
        Else
            mIssueDT = DirectCast(ViewState("IssuePoolTable"), DataTable)
        End If
  
        mIssueDT = IssueItem()
        drpIssues.DataTextField = "issue_id"
        drpIssues.DataSource = mIssueDT
        drpIssues.DataBind()
  
    End Sub
  
   
    Private Function IssueItem() As DataTable
  
        Dim setData As New DataTable()
        Dim myDataColumn As DataColumn
  
        setData = New DataTable()
        myDataColumn = New DataColumn()
        myDataColumn.DataType = Type.GetType("System.String")
        myDataColumn.ColumnName = "issue_id"
        setData.Columns.Add(myDataColumn)
  
        Dim newRow1 As DataRow
        newRow1 = setData.NewRow()
        newRow1("issue_id") = "Item1"
        setData.Rows.Add(newRow1)
  
        Dim newRow2 As DataRow
        newRow2 = setData.NewRow()
        newRow2("issue_id") = "Item2"
        setData.Rows.Add(newRow2)
  
        Dim newRow3 As DataRow
        newRow3 = setData.NewRow()
        newRow3("issue_id") = "Item3"
        setData.Rows.Add(newRow3)
  
        Dim newRow4 As DataRow
        newRow4 = setData.NewRow()
        newRow4("issue_id") = "Item4"
        setData.Rows.Add(newRow4)
  
        Dim newRow5 As DataRow
        newRow5 = setData.NewRow()
        newRow5("issue_id") = "Item5"
        setData.Rows.Add(newRow5)
  
        Dim newRow6 As DataRow
        newRow6 = setData.NewRow()
        newRow6("issue_id") = "Item6"
        setData.Rows.Add(newRow6)
  
        Dim newRow7 As DataRow
        newRow7 = setData.NewRow()
        newRow7("issue_id") = "Item7"
        setData.Rows.Add(newRow7)
  
        Dim newRow8 As DataRow
        newRow8 = setData.NewRow()
        newRow8("issue_id") = "Item8"
        setData.Rows.Add(newRow8)
  
        Dim newRow9 As DataRow
        newRow9 = setData.NewRow()
        newRow9("issue_id") = "Item9"
        setData.Rows.Add(newRow9)
  
        Dim newRow10 As DataRow
        newRow10 = setData.NewRow()
        newRow10("issue_id") = "Item10"
        setData.Rows.Add(newRow10)
  
        Dim newRow11 As DataRow
        newRow11 = setData.NewRow()
        newRow11("issue_id") = "Item11"
        setData.Rows.Add(newRow11)
  
        Dim newRow12 As DataRow
        newRow12 = setData.NewRow()
        newRow12("issue_id") = "Item12"
        setData.Rows.Add(newRow12)
  
        Dim newRow13 As DataRow
        newRow13 = setData.NewRow()
        newRow13("issue_id") = "Item13"
        setData.Rows.Add(newRow13)
  
        Return setData
    End Function
     
  
    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        ViewState("IssuePoolTable") = mIssueDT
    End Sub
  
  
    Protected Sub drpIssues_ItemsRequested(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles drpIssues.ItemsRequested
        Dim myRow As DataRow
        Dim setData As New DataTable()
        Dim getData As New DataTable()
        Dim itemOffset As Integer
        Dim endOffset As Integer
        Dim drpIssues As RadComboBox
        drpIssues = DirectCast(o, RadComboBox)
        'getData = GetIssuesByName(e.Context("CustomText").ToString().Trim().ToUpper())
        itemOffset = e.NumberOfItems
        endOffset = Math.Min(itemOffset + 25, getData.Rows.Count)
        e.EndOfItems = endOffset = getData.Rows.Count
        setData.Columns.Add("issue_id")
        setData.Columns.Add("issue_name")
        setData.Columns.Add("issue_status")
        setData.Columns.Add("issue_type")
        setData.Columns.Add("composite_name")
  
        For index As Integer = itemOffset To endOffset - 1
            myRow = setData.NewRow()
            myRow("issue_id") = getData.Rows(index)("issue_id").ToString().Trim()
            myRow("issue_name") = getData.Rows(index)("issue_name").ToString().Trim()
            myRow("issue_status") = getData.Rows(index)("issue_status").ToString().Trim()
            myRow("issue_type") = getData.Rows(index)("issue_type").ToString().Trim()
            myRow("composite_name") = getData.Rows(index)("composite_name").ToString().Trim()
            setData.Rows.Add(myRow)
        Next
  
        drpIssues.DataSource = setData
        drpIssues.DataTextField = "composite_name"
        drpIssues.DataValueField = "issue_id"
        drpIssues.DataBind()
        If getData.Rows.Count = 0 Then
            e.Message = "No Matches"
        Else
            e.Message = [String].Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset, getData.Rows.Count)
        End If
    End Sub
  
    Protected Sub drpIssues_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles drpIssues.SelectedIndexChanged
        Dim PoolData As New DataTable()
        Dim myDataColumn As DataColumn
  
        PoolData = New DataTable()
        myDataColumn = New DataColumn()
        myDataColumn.DataType = Type.GetType("System.String")
        myDataColumn.ColumnName = "Pool_id"
        PoolData.Columns.Add(myDataColumn)
  
        Select Case drpIssues.SelectedItem.Text.Trim()
            Case "Item1"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value1"
                PoolData.Rows.Add(newRow1)
  
            Case "Item2"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value2"
                PoolData.Rows.Add(newRow1)
  
            Case "Item3"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value3"
                PoolData.Rows.Add(newRow1)
            Case "Item4"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value4"
                PoolData.Rows.Add(newRow1)
            Case "Item5"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value5"
                PoolData.Rows.Add(newRow1)
            Case "Item6"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value6"
                PoolData.Rows.Add(newRow1)
            Case "Item7"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value7"
                PoolData.Rows.Add(newRow1)
            Case "Item8"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value8"
                PoolData.Rows.Add(newRow1)
  
            Case "Item9"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value9"
                PoolData.Rows.Add(newRow1)
  
            Case "Item10"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value10"
                PoolData.Rows.Add(newRow1)
            Case "Item11"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value11"
                PoolData.Rows.Add(newRow1)
            Case "Item12"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value12"
                PoolData.Rows.Add(newRow1)
            Case "Item13"
                Dim newRow1 As DataRow
                newRow1 = PoolData.NewRow()
                newRow1("Pool_id") = "Value13"
                PoolData.Rows.Add(newRow1)
        End Select
  
  
        drpPool.DataTextField = "Pool_id"
        drpPool.DataSource = PoolData
        drpPool.DataBind()
  
    End Sub
End Class

Dimitar Terziev
Telerik team
 answered on 19 May 2011
1 answer
95 views
Hi is there any way in which I can access the AsyncUpload control used in the FileExplorer control? I need to use some client side functions related to the AsyncUpload from the FileExplorer such as OnClientFilesSelected(). 

Thanks
Rumen
Telerik team
 answered on 19 May 2011
3 answers
145 views
Row Indicator :
Expected:
RadGird  "arrow indicator" to be appear on the first Column. 
I need a solution for : "Whenever  I click a cell in a Grid Row, the arrow indicator should moves to the corresponding Row in a Radgrid."

Pavlina
Telerik team
 answered on 19 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?