Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
109 views
I am simply trying to read the selected value of an item that is selected in RadComboBox but I am unable to do so.  The SelectedValue value is always empty.  This is a pretty simple usage case so I don't understand why this should be difficult.  Does anyone know what is going on?

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim cmd As New SqlCommand
    Dim con As New SqlConnection
    Dim da As New SqlDataAdapter
    Dim ds As New DataSet
 
    cmd.Connection = con
    con.ConnectionString = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
 
    con.Open()
    cmd.CommandText = "select top 100 CustomerID, isnull(Title, '') as Title, FirstName, LastName, FirstName + LastName as FullName from saleslt.customer"
 
    da.SelectCommand = cmd
    da.Fill(ds)
 
    RadComboBox1.DataValueField = "CustomerID"
    RadComboBox1.DataTextField = "FullName"
 
    RadComboBox1.DataSource = ds
    RadComboBox1.DataBind()
End Sub
 
Protected Sub RadComboBox1_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles RadComboBox1.SelectedIndexChanged
    Dim s As String
 
    s = e.Value
    s = RadComboBox1.SelectedValue
 
End Sub


<
telerik:RadComboBox ID="RadComboBox1" runat="server" Width="420"
    AllowCustomText="True" MaxHeight="300px" Filter="Contains" AutoPostBack="True">
    <HeaderTemplate>
        <ul>
            <li class="col1">Title</li>
            <li class="col2">First Name</li>
            <li class="col3">Last Name</li>
        </ul>
    </HeaderTemplate>
    <ItemTemplate>
        <ul>
            <li class="col1"><%#DataBinder.Eval(Container.DataItem, "Title").ToString()%></li>
            <li class="col2"><%#DataBinder.Eval(Container.DataItem, "FirstName").ToString()%></li>
            <li class="col3"><%#DataBinder.Eval(Container.DataItem, "LastName").ToString()%></li>
        </ul>
    </ItemTemplate>
</telerik:RadComboBox>
Helen
Telerik team
 answered on 16 Jul 2010
3 answers
445 views
For some reason, I cannot use DatePicker control.  I can use a regular textbox, plus a caledar icon.  I want to achieve the same thing as DatePicker, by clicking that icon, it shows a calendar, when a date is slected, the date is entered into the textbox.

Is that a easy way to do this?
Thomas
Top achievements
Rank 1
 answered on 16 Jul 2010
8 answers
216 views
If I wanted to navigate the right pane to an Anchor bookmark (#MySection) from a link in the left pane, would I want to use getExtContentElement and then location.hash in javascript?  Or is there a "built-in" Tererik method to do that? I definitely do not want to reload the contents of the page in the process.

I'm thinking about using a RadTree on the left side, in case that makes any difference.

Rob
Svetlina Anati
Telerik team
 answered on 16 Jul 2010
1 answer
98 views
Hello,

Please see my attached GRID where I amrked the issue in RED color. Please advise.
Princy
Top achievements
Rank 2
 answered on 16 Jul 2010
7 answers
223 views
Hello,

I am working with the 2008 Q2 version of the Rad Controls and try to fix the problem, that only one special button starting the progress manager and therefore the update.
I have different other buttons on my page, doing a full postback. When I press any of them the progressmanager starts. I tried your solution at http://www.telerik.com/community/forums/aspnet-ajax/upload/create-a-dedicated-submit-button-for-rad-upload.aspx
but it does not work. So I checked the __EVENTARGUMENT so that only the link button is allowed. But even with setting the input boxes to cleared, It does not work. The progressmanager still starts.

function startUploadSubmit(sender, args, uploadID, labelID) { 
            var upload = $find(uploadID); 
             
             
            //make sure, that there will be no problem 
            var eventTarget = document.getElementById('__EVENTTARGET'); 
            if (eventTarget.value == '<%= btnUploadFile.UniqueID %>') { }  
            else { 
                var fileInputs = upload.getFileInputs(); 
                for (var i = 0; i < fileInputs.length; i++) { 
                    upload.clearFileInputAt(i); 
                } 
                return; 
            }  
                                 
            var lblMessageElement = $get(labelID); 
            //is a file selected 
            var files = upload.getFileInputs(); 
            if (files[0].files.length == 0) { 
                args.set_cancel(true); 
                lblMessageElement.innerHTML = '<%= Encoda.Web.Settings.GetLocalizedString("Dialog#NoFileSelected") %>'; 
                return; 
            } 
            var valid = upload.validateExtensions(); 
            if (!valid) { 
                args.set_cancel(true); 
                lblMessageElement.innerHTML = '<%= Encoda.Web.Settings.GetLocalizedString("Dialog#WrongFileExtension") %>'; 
                return; WrongFileExtension 
            }            
        } 



I even tried to set the ProgressManager to RegisterForSubmit and then calling for the onclick event of the upload button the StartProgressPolling. Trying this the progressmanager does not start at all.

<telerik:RadScriptBlock runat="server">
       
    <script language="javascript" type="text/javascript">


function startFileUpload() {             
            var progManager = getRadProgressManager(); 
            RadProgressManager.StartProgressPolling(); 
        }
     </script>
</telerik:RadScriptBlock>
<telerik:RadProgressManager ID="progressManager" runat="server" OnClientSubmitting="startUploadSubmit" RegisterForSubmit="false" />      
 
<ucc:EncodaLinkButton Runat="server" ID="btnUploadFile" Caption="Dialog#StartUpload" OnClick="btnUploadFile_OnClick" OnClientClick="startFileUpload();" /> 


Any ideas, how to solve the problem, that the ProgressManager (and the upload) start only pn the specified button?

Genady Sergeev
Telerik team
 answered on 16 Jul 2010
1 answer
195 views

How to change the color of a raddock titlebar. I tried using

<style type="text/css">  
    .rdTitlebar,.rdTitle  
    {  
        background:green !important;  
    }     
</style> 


It doesnt work!
Bozhidar
Telerik team
 answered on 16 Jul 2010
3 answers
123 views
hi,

I need to disable the functionality to edit html elements in desing modus. Is there a way to do that.
for example.

I have added a textarea to the editor, users can now enter text into the textarea by double clicking it and edit the value.
other example.

I have added a radio button to the editor. Users can now alter the selected state.

I want to disable this behaviour.

thx

gerco
Rumen
Telerik team
 answered on 16 Jul 2010
2 answers
186 views
Hi,

I have a Radwindow which contains a radiobuttronlist controls having 2 listitems.
I wanted that on index change of the radio buttons, a text in a label would be displayed.
However the server side code doesn't fire.

Is it because it is a Radwindow?
Below is the code that I am using.

[ASPX CODE]

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12%">&nbsp;</td>
<td width="70%" class="body_header2">
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:RadioButtonList ID="RadBtnConf" runat="server" AutoPostBack="true"
onselectedindexchanged="RadBtnConf_SelectedIndexChanged">
<asp:ListItem Value="0" Text="Conformance"></asp:ListItem>
<asp:ListItem Value="1" Text="Non Conformance"></asp:ListItem>
</asp:RadioButtonList>
</td>                                               
</tr>
</table>

[C# CODE]

protected

 

void RadBtnConf_SelectedIndexChanged(object sender, EventArgs e)

 

{

Label1.Text =

"You selected " + RadBtnConf.SelectedItem.Text;

 

}


Please suggest.
Thanks
Debashis Pyne
Top achievements
Rank 1
 answered on 16 Jul 2010
1 answer
79 views
Whenever I drag and drop a radchart control onto a page in my project I get a box in the designer that says "Error Creating Control - RadChart1 Object reference not set to an instance of an object.

What are the steps I can take to resolve this? It seems to happen on any page I put the control on in my project.
Ves
Telerik team
 answered on 16 Jul 2010
3 answers
93 views
I have RadGrid on a page the is not ajaxified (for a reason).  The page Mode is set to "NextPrevAndNumeric".  Clicking on the Numeric page buttons work, but the Next and Previous buttons do not.  When I click on them, they throw the error "Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> ..."  I set enableEventValidation="false" (just to test), and the error goes away, but the buttons do nothing.

I created a simple version to demonstrate. (remember, there is no RadAjaxManager or RadUpdatePanel on the page)

<head runat="server">
      
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server"></asp:ScriptManager>
        <telerik:RadGrid ID="theGrid" runat="server" AutoGenerateColumns="false" 
            OnNeedDataSource="theGrid_NeedDataSource"
            EnableViewState="false" AllowPaging="true">
            <MasterTableView PageSize="25">
                <PagerStyle AlwaysVisible="true" Position="Top" 
                    Mode="NextPrevAndNumeric" />
                <Columns>
                    <telerik:GridBoundColumn HeaderText="Col1" DataField="Col1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn HeaderText="Col2" DataField="Col2">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
          
        </telerik:RadGrid>
      
    </form>
</body>
</html>

Code Behind:
protected void theGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            DataTable tbl = new DataTable();
            tbl.Columns.Add("Col1", typeof(string));
            tbl.Columns.Add("Col2", typeof(string));
  
  
            for (int i = 0; i < 50; i++)
            {
                tbl.Rows.Add(i.ToString(), i.ToString());
            }
            theGrid.DataSource = tbl;
        }
Pavlina
Telerik team
 answered on 16 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?