Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
198 views
I am using RadTreeView with an ObjectDataSource containing objects that require different user controls that will fire change events be added to the RadTreeNode.Controls on OnDataBound.  The node controls collection does not appear to be included in the viewstate, and if not re-added on every postback the viewstate matching error occurs.  If the controls are recreated on a change postback, the originating control event does not fire.  Is there a set way to preserve the node controls to keep the viewstate happy and guarantee the firing of change events?  These user controls contain simple labels, dropdowns and text boxes etc.
Thanks.
Nikolay Tsenkov
Telerik team
 answered on 12 Jul 2010
0 answers
69 views
Hellow,

can someone explain to me how I can use this control to upload and then send the file as an attachment to an email address?
I also would like to check first if the user as uploaded a file and else show an error.

I hope you can help me with this.

Thanks in advance
J.
Joris
Top achievements
Rank 1
 asked on 12 Jul 2010
3 answers
205 views
Hi guys,
I'm making a simple page where a user has a radtextbox which is initially disabled. When a user clicks 'edit', the textbox is enabled, and can change the values. They can then hit 'save' to ideally change the value, but it doesn't seem to persist when clicked. It always remembers the old value. Say I had something to edit and the text said 'Here is the default text'. I would click edit, then when the radtextbox became enabled, I would add to it to have it say 'Here is the default text, plus more!'. Whenever I click 'save' though, the ajax panel that they are all in reloads, but has the same old text. I try to take the .text value from the radtextbox and it is always the old value. I realize that the server only knows the old value but I am completely unsure of how to get the text from the client side. Any help?
Thanks,
Cody
Maria Ilieva
Telerik team
 answered on 12 Jul 2010
1 answer
136 views
Hi all,

I have a Radgrid with some values and an aggregate function that calculates the average.
The values in the grid are editable clientside; at the end of the operation there is a button to confirm the data and save them to the server.
I would like to know whether there is the possibility to calculate the values of the aggregate function (Average) before saving the data to the server.

Thanks in advance for the answer.

Kind regards,

Dario Zanelli
Tsvetoslav
Telerik team
 answered on 12 Jul 2010
2 answers
176 views
I want to disable the edit command for rows that have a specific value in say the third column.  The code below seems to disable the whole edit column if the "if statement" is met jsut once.

Thanks
Doug

protected void teamGrid_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = e.Item as GridDataItem;
  
                string firstName = dataItem["Firstname"].Text;
                string lastName = dataItem["Lastname"].Text;
  
                LinkButton button = dataItem["DeleteColumn"].Controls[0] as LinkButton;
                button.Attributes["onclick"] = "return confirm('Are you sure you want to deactivate " + firstName + " " + lastName + "?')";
  
  
                if (dataItem["EndDate"].Text != "")
                {
                    LinkButton linkButton = (LinkButton)dataItem["EditCommandColumn"].Controls[0];
                    linkButton.Enabled = false;
  
                    dataItem["EndDate"].Font.Strikeout = true;
                }
            }
        }
 
Douglas Hale
Top achievements
Rank 1
 answered on 12 Jul 2010
1 answer
215 views
I'd like to assign a unique id to each tab within the tabstrip but it appears this is a read only attribute.  I'm using my own css and I'd like to assign a dynamic css class to each tab depending on a number of variables.

Utilizing the FindTabByValue doesn't won't work for what I'm trying to do since I need to assign a new css background based on the id of the entire tab, not just the anchor or span tag within that tab. 

Has anyone been able to do this?
Peter
Telerik team
 answered on 12 Jul 2010
6 answers
323 views

I am unable to find the answer to this problem which have been bugging me for a long time.
When I try to insert into sql table, I use this insert method:

Dim datDOB as date
datDOB = RadDatePickerDOB.DbSelectedDate ---- since it is not a required field so it can be nothing

Dim cmdAddNewRecord as new sqlCommand("INSERT INTO [Table1] ([DOB]) " & _
"VALUES ('"& datDOB & "')", SqlConnection)

Dim daAddNewRecord As New SqlDataAdapter(cmdAddNewRecord)

Dim dsAddNewRecord As New DataSet

Try

If SqlConnection.State <> ConnectionState.Open Then

SqlConnection.Open()

End If

daAddNewRecord.Fill(dsAddNewRecord)

lblError.Visible = True

lblError.Text = "Data has been submitted successfully."

Catch ex As Exception

lblError.Text = ex.Message.ToString

Finally

If SqlConnection.State <> ConnectionState.Closed Then

SqlConnection.Close()

End If

End Try

It inserted successfully but it insert this date: 1/1/1900 12:00:00 AM which I do not want! I would like to insert nothing or null into the table.
Anybody has any idea?

Thank you.

Dimo
Telerik team
 answered on 12 Jul 2010
1 answer
355 views
Hello,
I have a Hyperlink inside a radgird. And on its ItemCreated event, I have this:

Attributes["onclick"] = // some javascript.

My question is : when I click this hyperlink, everything is fine just it did not trigger ajaxloading panel.

     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"  DefaultLoadingPanelID="ralpLoadingImage">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="testGrid" >
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="testGrid" />
                    </UpdatedControls>
            </AjaxSettings>
        </telerik:RadAjaxManager>

Is this possible that when I click that link, loading panel is showing on the grid?
Radoslav
Telerik team
 answered on 12 Jul 2010
3 answers
144 views
Hey,
       I am using a multiple file  upload control in a rad window .
I have provided the server side validation using the allowedfileextensions property and it working well .
but my client side validation gives me problem and the ValidateExtensions() function is not working .


Error that i am getting is upload.ValidateExtensions is not a function.  the js code i used is below


function ValidateRadUpload1(source, arguments) {
    var upload= $find('<%= FileUpload.ClientID %>');

    arguments.IsValid = upload.ValidateExtensions();
}

Ascx.
 <telerik:radupload ID="FileUpload" runat="server" MaxFileInputsCount="5"
                MaxFileSize="102400000"  ToolTip="Select your File"
                AllowedFileExtensions=".doc,.xls,.txt,.docx,.xlsx,.rtf,.pdf,.jpg,.bmp"
                ControlObjectsVisibility="Default"   
                 EnableFileInputSkinning="True"
                 EnableViewState="False">
            </telerik:radupload>
<asp:customvalidator runat="server" id="CustomValidator1" display="Dynamic"
            clientvalidationfunction="ValidateRadUpload1"
                onservervalidate="CustomValidator1_ServerValidate" ValidationGroup="upload">
        Invalid extensions.
</asp:customvalidator>

Need help.


Sankardeep V
sankardeep v
Top achievements
Rank 1
 answered on 12 Jul 2010
1 answer
144 views
The date 31/12/2099 si greyed out in the calendar? Why is that? is a valid date...31/12/2010 is available though.

Is this a bug?

Regards

Luis
Dimo
Telerik team
 answered on 12 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?