Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
161 views
Does the listbox support client-side databinding?  I would like to create a list of items from the server-side and populate the listbox in the callback function of a page method call.  Is this possible?  I could not find anything in the documentation or demos for doing something like this.

David
Vesko
Top achievements
Rank 2
 answered on 07 Oct 2009
1 answer
412 views
hi,

i want to get the lable inside a panelbar
i have tried the following but the value is null.

var

 

lblEmail = document.getElementById('pnlbarRegn.FindItemByValue("AccountHolderInformation").FindControl("lblEmail").ClientID >');

 


the client code looks like the follwoing

my panel bar name is pnlbarRegn

<

 

telerik:RadPanelItem Enabled="false" Text="Step 3: Account Holder Information" runat="server"

 

 

Font-Underline="false" FocusedCssClass="">

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server" Value="AccountHolderInformation">

 

 

<ItemTemplate>

 

 

<table width="100%" border="0" cellspacing="0" cellpadding="2">

 

 

 

<tr>

 

 

<td align="right">

 

Email

 

</td>

 

 

<td align="left">

 

 

<telerik:RadTextBox ID="txtEmail" runat="server" Skin="" CssClass="text" MaxLength="255"

 

 

AutoPostBack="false" onfocus="Text1_focus()">

 

 

</telerik:RadTextBox><asp:RequiredFieldValidator ID="rfvEmail" runat="server" Display="Dynamic"

 

 

ControlToValidate="txtEmail" ErrorMessage="E-mail is required" Text="E-mail Required" ValidationGroup="accountHolderInfo" />

 

 

<asp:RegularExpressionValidator ID="regEmail" runat="server" ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="Enter Valid Email"

 

 

ValidationGroup="accountHolderInfo" ValidationExpression ="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$"></asp:RegularExpressionValidator>

 

 

<asp:Label ID="lblEmail" runat="server" Visible="false" ForeColor = "Red" ></asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

could any one help me in this regard?

Thanks,
Bharath
Paul
Telerik team
 answered on 07 Oct 2009
3 answers
190 views
Have a grid whit following column:
<telerik:GridBoundColumn DataField="ArticleCode" UniqueName="ArticleCode" HeaderText="ArtikelID" ReadOnly="true" DataType="System.String"></telerik:GridBoundColumn> 

In this column I insert values tha look like "001", "002" etc

But when I export it to Excel it formats the column to Integer values so it only displays 1,2 etc

How do I make the Excel sheet accept the value as a string and not an Integer?

protected void ButtonExportToExcel_Click(object sender, EventArgs e)  
{  
   RadGridMembers.ExportSettings.ExportOnlyData = false;  
   RadGridMembers.ExportSettings.IgnorePaging = true;  
   RadGridMembers.ExportSettings.OpenInNewWindow = true;  
 
   RadGridMembers.Page.Response.ClearHeaders();  
   RadGridMembers.Page.Response.Cache.SetCacheability(HttpCacheability.Private);  
 
   RadGridMembers.MasterTableView.ExportToExcel();  
Daniel
Telerik team
 answered on 07 Oct 2009
1 answer
108 views
I've a web form. In this I have TimeTicker in update panel.. if i scroll   down it. the scroll position is not same. It's at the begining of the page. My requirement is I want to set the scroll position to the same position where it was before.

Princy
Top achievements
Rank 2
 answered on 07 Oct 2009
1 answer
97 views
 Hi , 
 In CreatUserWizard . when we want using a asp control  
 using this metod:

string Firstname = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("txtfirstname")).Text.ToString();
 
 but if in form using a radcontrol got a control casting error  , 
 
 what Can i Do ?
 

 

Princy
Top achievements
Rank 2
 answered on 07 Oct 2009
2 answers
123 views
Hi there.

I'm trying to change backgroundcolor for a certain day in a timeline. Is that in any way possible? (Look at the attached image for a clearer view of what i'm trying to do).

i want to make the background color gray for that day.


Very grateful for all kind of help.

Regards / Magnus.
Magnus
Top achievements
Rank 1
 answered on 07 Oct 2009
3 answers
155 views
hi i use for test your
ComboBox / Related ComboBoxes exemple
all work perfectly but now i tri tu put in session the value off the 3 combobox
the 1 work perfectly but the other do this message :
System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.

my code :

 

Protected Sub Loadvoiture()

 

Dim connection As SqlConnection = CreateConnection()

 

 

 

Dim adapter As New SqlDataAdapter("SELECT * FROM MAKE ORDER By Make", connection)

 

 

 

Dim dt As New DataTable()

 

 

adapter.Fill(dt)

RadComboBox1.DataTextField =

 

"Make"

 

RadComboBox1.DataValueField =

 

 

"Makecode"

 

 

RadComboBox1.DataSource = dt

RadComboBox1.DataBind()

 

'insert the first item

 

 

RadComboBox1.Items.Insert(0,

New RadComboBoxItem("- Slectionnez une marquent -"))

 

 

End Sub

 

 

Protected Sub LoadModele(ByVal MakecodeID As String)

 

 

 

Dim connection As SqlConnection = CreateConnection()

 

 

 

Dim adapter As New SqlDataAdapter("SELECT * FROM MODEL WHERE Makecode=@Makecode ORDER By Model asc", connection)

 

 

adapter.SelectCommand.Parameters.AddWithValue(

 

"@Makecode", MakecodeID)

 

 

 

Dim dt As New DataTable()

 adapter.Fill(dt)

 

For Each row As DataRow In dt.Rows

 

 

 

Dim item As New RadComboBoxItem()

 

 

 tem.Text = row(

 

"Model").ToString() & " ( " & row("Model_Year_From").ToString() & " - " & row("Model_Year_Till").ToString() & " ) "

 

item.Value = row(

 

 

"ModelCode").ToString()

 

RadComboBox2.Items.Add(item)

 

Next

 

 

 

End Sub

 

 

 

 

 

Protected Sub LoadType(ByVal ModelCodeID As String)

 

Dim connection As SqlConnection = CreateConnection()

 

 

 

Dim adapter As New SqlDataAdapter("SELECT * FROM TYPE WHERE ModelCode=@ModelCode ORDER By ModelCode", connection)

 

 

 adapter.SelectCommand.Parameters.AddWithValue(

 

"@Modelcode", ModelCodeID)

 

 

Dim dt As New DataTable()

 

 

adapter.Fill(dt)

RadComboBox3.DataTextField =

 

"Type"

 

 

RadComboBox3.DataValueField =

"TypeCode"

 

RadComboBox3.DataSource = dt

 

RadComboBox3.DataBind()

 

End Sub

 

 

 

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

'------------------------after this WORK
Session(

"marque") = RadComboBox1.SelectedItem.Text

 

Session(

"marqueID") = RadComboBox1.SelectedItem.Value 


'------------------------after this NOT WORK

 

Session(

"modelev") = RadComboBox2.SelectedItem.Text     

 

Session(

"modelevID") = RadComboBox2.SelectedItem.Value

 

Session(

"typev") = RadComboBox3.SelectedItem.Text

 

Session(

"typevID") = RadComboBox3.SelectedItem.Value

 

  

 

End Sub


this code not work impossible to put the selected value of RadComboBox2 and RadComboBox3 in session
why ? the first RadComboBox1 session work perfectly !

Thanks for you help
casa51
Top achievements
Rank 2
 answered on 07 Oct 2009
1 answer
78 views
Hello,

I am trying to use the panel bar together with the DotNetNuke 4.9, having module caching enabled for the module that contains the PanelBar.

DotNetNuke caches the content of the module (html generated by the module) in a file system, however the PanelBar also adds javascript like 

Sys.Application.add_init(function() { ... }

to the bottom of the page.

Since the javascript is outside of the module content, it does not get cached in a DotNetNuke file and when DNN renders the module from the cache, Javascript is omitted, breaking the functionality.

Is there a way to include the javascript inside of the moduel instead of having it in the end of the page?

Thanks
Peter
Telerik team
 answered on 07 Oct 2009
1 answer
181 views
I want to use a fileupload control in an editable WebUserControl in conjunction with a RadGrid.

I have put everything together, but when I try to upload the file it says.

Index was out of range. Must be non-negative and less than the size of the collection.

This is strange because when copy and paste the code in non-user control (regular aspx page), it works fine.  I have tried the code in the WebUserControl which is called by the RadGrid Parent page, and I have also tried referencing the WebUserControl from within the Parent page, yet the message is the same either way.

Here is the code on my Parent RadGrid page which calls the UserControl with the FileUpload control in it:

protected void RadGrid1_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
        GridEditableItem editedItem = e.Item as GridEditableItem; 
        UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID); 
 
        RadUpload RadUpload1 = userControl.FindControl("RadUpload1"as RadUpload; 
        Repeater repeaterResults = userControl.FindControl("repeaterResults"as Repeater; 
        Label labelNoResults = userControl.FindControl("labelNoResults"as Label; 
 
        string targetFolder = Server.MapPath(RadUpload1.TargetFolder); 
 
        UploadedFile file = RadUpload1.UploadedFiles[0]; 
        string uniqueFileName = System.Guid.NewGuid().ToString(); 
        string targetFileName = Path.Combine(Server.MapPath("~/shared/videos/members"), uniqueFileName + file.GetExtension()); 
        file.SaveAs(targetFileName); 
        //delete unique filename if database insert fails         
 
        if (RadUpload1.UploadedFiles.Count > 0) 
        { 
            repeaterResults.DataSource = RadUpload1.UploadedFiles; 
            repeaterResults.DataBind(); 
            labelNoResults.Visible = false
            repeaterResults.Visible = true
        } 
        else 
        { 
            labelNoResults.Visible = true
            repeaterResults.Visible = false
        } 

Iana Tsolova
Telerik team
 answered on 07 Oct 2009
1 answer
69 views
I downloaded and am trying to install the controls but it says "This installation package could not be opened".  I have the latest version of windows installer already.  The log file for the installation is below.  I am running windows XP professional.  I have already read the other forum posts on this topic but nothing was really posted as a solution so can someone help out here?

LOG FILE CONTENTS:

=== Verbose logging started: 10/6/2009  18:25:34  Build type: SHIP UNICODE 4.05.6001.00  Calling process: C:\WINDOWS\System32\msiexec.exe ===
MSI (c) (10:DC) [18:25:34:109]: Resetting cached policy values
MSI (c) (10:DC) [18:25:34:109]: Machine policy value 'Debug' is 0
MSI (c) (10:DC) [18:25:34:109]: ******* RunEngine:
           ******* Product: C:\Documents and Settings\Adam\My Documents\RadControls_for_ASP.NET_AJAX_2009_2_826_trial.msi
           ******* Action:
           ******* CommandLine: **********
MSI (c) (10:DC) [18:25:34:140]: Note: 1: 2203 2: C:\Documents and Settings\Adam\My Documents\RadControls_for_ASP.NET_AJAX_2009_2_826_trial.msi 3: -2147287010
MSI (c) (10:DC) [18:25:34:140]: MainEngineThread is returning 1620
=== Verbose logging stopped: 10/6/2009  18:25:34 ===

 



Thanks.
Missing User
 answered on 07 Oct 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?