Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
I have multiple ajax panels on my page. I tried to configure it to update an asp label and to also show a tool tip on an image button click within a repeater. However, when I click the image, nothing on the front end get's updated. My code does run, I have verfied because the database get's updated. Can anyone tell me what I'm doing wrong?

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="updateDate">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="headerOutput" />
                    <telerik:AjaxUpdatedControl ControlID="myOutput" />
                    <telerik:AjaxUpdatedControl ControlID="headRepeat" />
                    <telerik:AjaxUpdatedControl ControlID="userInfoOutput" />
                    <telerik:AjaxUpdatedControl ControlID="userBlockChart" />
                    <telerik:AjaxUpdatedControl ControlID="output" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
<telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
    <telerik:RadToolTip ID="headerOutput" Skin="Windows7" Position="Center" runat="server"
    CssClass="headerTooltip" Height="60" Width="220" AutoCloseDelay="4000"></telerik:RadToolTip>       
        <asp:Label ID="myOutput" runat="server"></asp:Label>
        <br />
        <asp:Repeater ID="headRepeat" runat="server">
            <ItemTemplate>
                <div class="headerImageRepeat" id="headerDiv" runat="server">
                    <table cellpadding="0" cellspacing="0" style="height: 70px;">
                        <tr>
                            <td style="padding-left: 10px; padding-top: 5px; padding-right: 10px;" valign="top">
                                <asp:ImageButton ID="headerImage" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "headerImageUrl") %>'
                                 CommandName="showUsers" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>' />
                            </td>
                            <td style="padding-bottom: 5px; padding-top: 5px;" valign="bottom">               
                                <asp:Label ID="memberName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "memberNameOutput") %>'></asp:Label><br />
                                 
                                <span class="headerGoal"><asp:Label ID="memberHours" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "memberHoursOutput") %>'></asp:Label> hours per day</span><br />
                                <table cellpadding="0" cellspacing="0" border="0"><tr><td valign="middle" class="headerGoal">
                                Goal: <asp:textbox CssClass="goalTextbox" ID="goalInput" runat="server"
                                Text='<%# DataBinder.Eval(Container.DataItem, "memberGoalOutput") %>' Width="40px"></asp:textbox
                                   
                                </td><td valign="top" class="headerGoal"><asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="../images/save.png" CommandName="updateHours" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>' />
                                </td></tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </div>
            </ItemTemplate>
        </asp:Repeater>
        </telerik:RadAjaxPanel>

And here is the code behind

'they clicked the save button in header for goal hours
    Private Sub headRepeat_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles headRepeat.ItemCommand
 
        If (e.CommandName.ToString = "showUser") Then
 
            '*************************************************************
            '*************************************************************
            '*************************************************************
            'this is not getting updated
            userInfoOutput.Text = "test"
        End If 'if e.commandNmae = showUser
 
        'if they clicked the save in the repeater
        If (e.CommandName.ToString = "updateHours") Then
 
            Dim memberId = e.CommandArgument.ToString
            Dim currentUser = Membership.GetUser.ProviderUserKey.ToString
 
            Dim hoursTextbox = TryCast(e.Item.FindControl("goalInput"), TextBox)
            Dim hoursInput = hoursTextbox.Text
 
            'check if we have a number otherwise we tell them we need a number
            If (IsNumeric(hoursInput)) Then
 
                Dim sql = "SELECT * FROM MemberGoal WHERE memberId = '" & memberId & "' AND webUserId = '" & currentUser & "'"
 
                'if this has a row then we update, otherwise we insert
                If (awesome.checkRecord(sql, dashConn)) Then
 
                    sql = "UPDATE MemberGoal SET hourGoal = " & hoursInput & " WHERE memberId = '" & memberId & "' AND webUserId = '" & currentUser & "'"
 
                Else 'we are inserting
 
                    sql = "INSERT INTO MemberGoal(hourGoal, memberId, webUserId) VALUES(" & hoursInput & ", '" & memberId & "', '" & currentUser & "')"
 
                End If 'if
 
                awesome.executeQuery(sql, dashConn)
 
                '*************************************************************
                '*************************************************************
                '*************************************************************
                'this is not getting updated
                headerOutput.Text = "<center style='padding-top: 20px;'>The hours were updated for the user</center>"
                headerOutput.Show()
 
            Else 'else we need to tell them we need a number
 
                headerOutput.Text = "<center style='padding-top: 20px;' class='errorText'>Please enter a number.</center>"
                headerOutput.Show()
 
            End If 'if isnumeric
 
        End If 'if e.commandname
    End Sub


Iana Tsolova
Telerik team
 answered on 06 Oct 2011
2 answers
76 views
Hi,

We are using VS 2010 and telerik version 2008. We are using Radgrid in user control. And we are referring Jquery.js script file in the master page. Then we are using the user control in the aspx page. Master page also is referred in the aspx page. In this case, the functionality of radgrid like sorting,edit & paging are not working. That means the complete events of the radgrid is not firing.

If we are removing the jquery.js file from master page, it is working fine. But we need to use jquery.js file since it is used for some UI related functionalities.

Can you please provide solution for this?

Thanks in advance.
Brian
Top achievements
Rank 1
 answered on 06 Oct 2011
7 answers
63 views
Hi,

I am using Telerik RAD controls in asp.net application and As a process of RAD control migration, Insatlled RadControls_Q3_2008_dev  application on my machine and replaced all the old RAD dlls  references with 2008 Q3 version dlls but while trying to build the application, Its throwing method not supporting errors.

RadCalendar control is giving the major errors(no extension method available issue)

dtRADCalender.SelectedDate.ToUniversalTime();


Example:

Error 48 'System.Nullable<System.DateTime>' does not contain a definition for 'ToUniversalTime' and no extension method 'ToUniversalTime' accepting a first argument of type 'System.Nullable<System.DateTime>' could be found (are you missing a using directive or an assembly reference?) 

Please suggest the solution ASAP.

Thanks,
Ashok
Andrey
Telerik team
 answered on 06 Oct 2011
5 answers
144 views
Rad Editor is  great tool, but there are some important defincincies that I believe Telerik really needs to address before it can be used as true content editor.

1) The content the user creates and "sees" on the screen does not necessarily match the html markup generated by rad Editor and therefore does not match the appearance of the content in other environments. If a user specifies some content should be styled with a particular class.. and that class is not defined anywhere on the partiuclar page the content gets displayed in, then obviously the style will not appear as it does when the use saved the content. This behavior is totally expected. On the other hand, if the user creates some content and on screen it shows "verdana" as the font, it may not actually be set to verdana in the markup, and the content will therefore not look like it does in the editor. For example, when the editor first loads, the FontNames dropdown accepts the default font from the browser and the realFontSize dropdown does the same. So, as the user creates content, this is the font name/size which is used in the editor content area by default. The user assumes that their content will look like this when they save it. However, the Verdana font name and size are not actually applied to the content. They are only what is used in the content display area of the editor. and so you have users creating content that they think will look one way, when it actually looks like something else. This can be a nightmare when creating content which can be used in multiple environments.. (web, print, email, phone, etc.). Ideally, when rad editor loads, we should be able to specify the default font name/size (as well as other parameters, like color, styling, etc.). This is the default font which appears in the rad editor content area AND, when the user types in some content, these font styles will also be applied in the markup generated by Rad Editor. Since the user assumes what they see on screen is what the content will look like, there must always be a font name/size selected and applied in the generated markup. Only in this way can users be sure what they see in rad Editor is what they'll get when the content is saved.

2) It has been mentioned in other threads and I assume Telerik is working on this, but the xhtml markup which rad editor generates does not conform to the styling requirements of some email clients... most notably Outlook. This is particularly true when it comes to image declarations. As someone who need to build email content editors, this is an important feature that should be implemented.
Rumen
Telerik team
 answered on 06 Oct 2011
1 answer
63 views
I have a RadGrid with 1 detail table which is defined declaratively and I'm using 2 SqlDataSources; one for the master table and the second for the detail table.

My detail table has a GridCalculatedColumn:

 <telerik:GridCalculatedColumn HeaderText="Duration (calculated)" DataType="System.String"
                            DataFields="Duration" UniqueName="Duration-custom" Expression="1">
                        </telerik:GridCalculatedColumn>

How would that be possible to set the Expression value at runtime?

I'd like to set this value to the expression:

TimeSpan.FromSeconds({0})

which returns data in this format in C#: d.hh:mm:ss e.g. 1.10:10:10

Thanks,
Tsvetina
Telerik team
 answered on 06 Oct 2011
1 answer
60 views

I have added a search function to my grid, essentially a stored procedure to refine the grid display for a term entered by the user that occurs in any of 2 columns.

This works fine initially, but isnt maintained for any actions such as paging, edit or cancel, the grid then returns to the initial default databinding of all records.

I added a Clear button to allow the user to load all records again, but would like to be able to make any search done persist and only show these records until the user clicks clear or page reloads.

Mark
Top achievements
Rank 1
 answered on 06 Oct 2011
0 answers
176 views
Hello,

I am trying to change the RadEditor Spell Check Dictionary Path on the server (Page Load), but I am unable to get it to work. Here is what I have:

RadEditor1.SpellCheckSettings.DictionaryPath = "/include/RadControls/Spell/TDF"
If Threading.Thread.CurrentThread.CurrentCulture.Name.ToLower() = "es-pr" Then
    RadEditor1.SpellCheckSettings.DictionaryLanguage = "es-ES"
    RadEditor1.SpellCheckSettings.SpellCheckProvider = Telerik.Web.UI.SpellCheckProvider.EditDistanceProvider
Else
    RadEditor1.SpellCheckSettings.DictionaryLanguage = "es-US"
    RadEditor1.SpellCheckSettings.SpellCheckProvider = Telerik.Web.UI.SpellCheckProvider.PhoneticProvider
End If

I have to set those values on the server because we have spanish users, so we need to change the dictionary language and provider for those users. When I click on the spell check button on the RadEditor, i just get a server error 500 - Dictionary Path is not set. I have attached a picture of the error.

However, I do not get this error when I add the dictionary path to the client:

<telerik:RadEditor ID="RadEditor1" runat="server" SpellCheckSettings-DictionaryPath="/include/RadControls/Spell/TDF">
    <Content>
    </Content>
</telerik:RadEditor>

This would work fine, but I'm afraid the provider and dictionary language still would not be set.

Is there anyway for these values to be set on the server side? Thanks for your help!



EDIT:

I have found that the DictionaryPath works correctly if I take out the DictionaryLanguage.  For some reason RadEditor1.SpellCheckSettings.DictionaryLanguage = "es-US" is causing the DictionaryPath to be blank when running the spell check.


EDIT 2:

OK. Disregard my stupidity. I actually noticed my error while reading the last edit. The "es-US" should be "en-US". After changing that, it works as it should.
George
Top achievements
Rank 1
 asked on 06 Oct 2011
1 answer
64 views
Hello,

I have a hierarchical grid. At the client side, i have the following OnRowContextMenu event    

function RowContextMenu(sender, eventArgs) {
        document.getElementById(lblRowIndex").value = eventArgs.get_itemIndexHierarchical();
        document.getElementById(rdMethodClickedTableId").value = this.UID; 
    } 
this function allow to save the index of the grid item associated to the context menu.
On other hand, I have a server side  event RdDocumentMenu_ItemClick fired by  the  RadcontextMenu click.
<ItemTemplate>
 <telerik:RadContextMenu runat="server" ID="MenuDocument" Skin="WebBlue" EnableRoundedCorners="true" EnableShadows="true" EnableViewState="true" OnItemClick="RdDocumentMenu_ItemClick" OnClientItemClicking="OnDocumentMenuClicking">
        <Items>
               <telerik:RadMenuItem Text="ManageDesignProcess.editstep.lblMnuItemDocumentEdit" Value="Edit" ImageUrl='~/Images   
                /menu/menu_sub.gif' ImageOverUrl='~/Images/menu/over/menu_sub.gif'/>
         </Items>
 </telerik:RadContextMenu>
</ItemTemplate>
And In this function,i want to retrieve the GridDataItem by giving its index that it was saved in the lblRowIndex text field.

    protected void RdDocumentMenu_ItemClick(object sender, RadMenuEventArgs e)
    {
        string sDocumentClickedRowIndex;
        string sUId;
        sDocumentClickedRowIndex = lblRowIndex.Text;
        sUId = rdMethodClickedTableId.Text;
 
        GridTableView tableView = this.Page.FindControl(sUId) as GridTableView;
        GridDataItem dataItem = tableView.Items[sDocumentClickedRowIndex]; (??)
}

How can I do it?

Thank You,
Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Oct 2011
12 answers
1.1K+ views
I've a radgrid for ajax (Q1 2008) with client setting AllowRowSelect="True" and client event OnRowClick="RowClick".

the grid has a template column containing a link which opens a radwindow. when this link is clicked, rowclick event is not fired. however, explicitly clicking on the other part of same cell does fires the event.
what am i doing wrong here??

this works just fine in my other project which is using radgrid for asp.net.

what i'm trying to accomplish is when a link is clicked, that row should be selected at client side.
any help is appreciated...
Tsvetina
Telerik team
 answered on 06 Oct 2011
5 answers
139 views
Hi guys,
Can any one help me out , in adding a group field  to Rad grid group panel .
Ex: i Want to add a field "Name" to Radgrid group panel when you click on "Name" node from rad tree view.

Kevin
Top achievements
Rank 2
 answered on 06 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?