Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
135 views
I am having the hardest time accomplishing what should be a simple task.

I have a series of contracts with start and end dates, a contract number and a customer's name. I would like to Group By the contract number and display the contract number, end date and customer's name. I would like each field to be displayed in the same column as the sub table. How do I do this?

I would also like sorting to be applied to the Group By items. Any ideas?
Marin
Telerik team
 answered on 26 Jan 2011
3 answers
175 views

Hi,
I found a problem on the radcombobox on my radgrid. If I selected couple of values from the combobox by using autocomplete separator & click update, it didn't work at all. If I selected only one value from the combobox, it could be updated properly on the table on my sql database.
Can any of you tell me what is wrong ?

<%@ Page Language="VB" %>
<%@ 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">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
       
       
   
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                 <telerik:AjaxSetting AjaxControlID="RadCombobox1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
          </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
            Transparency="50">
            <div style="background-color: #FFFFFF; height: 100%;">
            <asp:Image ID="Image1" runat="server" ImageUrl="loading1.gif"
                    AlternateText="loading" ImageAlign="AbsMiddle" />
        </div>

         </telerik:RadAjaxLoadingPanel>
        
       
        <br />
        <br />
        <telerik:RadComboBox ID="RadComboBox1" Runat="server"
            DataSourceID="SqlDataSource3" DataTextField="F5" DataValueField="F5"
            Height="20px" MaxHeight="500px" Width="412px" AutoPostBack="True"
            Skin="WebBlue" AppendDataBoundItems="True">
            <Items>
            <telerik:RadComboBoxItem value="0", Text="Please select your name..." />
            </Items>
        </telerik:RadComboBox>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server"
            ConnectionString="<%$ ConnectionStrings:usagelogConnectionString %>"
            SelectCommand="SELECT DISTINCT F5 FROM OriginalReport"></asp:SqlDataSource>
        <br />
        <br />
       
              
       
       
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
                    GridLines="None" Skin="WebBlue" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" >
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_WebBlue"></HeaderContextMenu>

                    <MasterTableView  DataKeyNames="F1"
                        DataSourceID="SqlDataSource1" CommandItemDisplay="TopAndBottom">

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                        <Columns>
                         <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit" >
                              <HeaderStyle Width="10px" />
                            </telerik:GridEditCommandColumn>
                            <telerik:GridBoundColumn DataField="F1" DataType="System.Int32" HeaderText="ID#"
                                ReadOnly="True" SortExpression="F1" UniqueName="F1"
                                FilterControlAltText="Filter F1 column">
                            </telerik:GridBoundColumn>
                            <telerik:GridDateTimeColumn DataField="F2"
                                FilterControlAltText="Filter F2 column" HeaderText="Publication Date"
                                UniqueName="F2">
                            </telerik:GridDateTimeColumn>
                            <telerik:GridBoundColumn DataField="F3" HeaderText="DocID" SortExpression="F3"
                                UniqueName="F3" FilterControlAltText="Filter F3 column">
                            </telerik:GridBoundColumn>
                            <telerik:GridHTMLEditorColumn DataField="F4"
                                FilterControlAltText="Filter F4 column" HeaderText="Report Title"
                                UniqueName="F4">
                            </telerik:GridHTMLEditorColumn>
                            <telerik:GridBoundColumn DataField="F5" FilterControlAltText="Filter F5 column"
                                HeaderText="Written by..." SortExpression="F5" UniqueName="F5">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="F6" FilterControlAltText="Filter F6 column"
                                HeaderText="Written by..." SortExpression="F6" UniqueName="F6">
                            </telerik:GridBoundColumn>
                            <telerik:GridDropDownColumn DataField="F7" DataSourceID="SqlDataSource5"
                                FilterControlAltText="Filter F7 column" HeaderText="Content Type"
                                ListTextField="F1" ListValueField="F1" UniqueName="F7">
                            </telerik:GridDropDownColumn>
                            <telerik:GridDropDownColumn DataField="F8" DataSourceID="SqlDataSource4"
                                FilterControlAltText="Filter F8 column" HeaderText="Industry"
                                ListTextField="F1" ListValueField="F1" UniqueName="F8">
                            </telerik:GridDropDownColumn>
                            <telerik:GridTemplateColumn DataField="F9"
                                FilterControlAltText="Filter F9 column" HeaderText="Global Vendor"
                                UniqueName="F9">
                                <EditItemTemplate>
                                    <telerik:RadComboBox ID="F9RadComboBox" runat="server" AllowCustomText="True"
                                        AutoCompleteSeparator=";" DataSourceID="SqlDataSource2" DataTextField="F1"
                                        DataValueField="F1" Height="19px" MarkFirstMatch="True"
                                        SelectedValue='<%# Bind("F9") %>' Width="504px"  MaxHeight="500px" >
                                    </telerik:RadComboBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="F9Label" runat="server" Text='<%# Eval("F9") %>'></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="F10" FilterControlAltText="Filter F10 column"
                                HeaderText="Vendor manual input" SortExpression="F10" UniqueName="F10">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <EditFormSettings>
                            <EditColumn UniqueName="EditCommandColumn1" >
                            </EditColumn>
                        </EditFormSettings>
                        <CommandItemSettings ShowExportToCsvButton="True" ShowExportToExcelButton="True"
                            ShowExportToPdfButton="True" ShowExportToWordButton="True" />
                    </MasterTableView>

<FilterMenu EnableImageSprites="False"></FilterMenu>
                </telerik:RadGrid>
               
               
               
                
                <br />
                <br />
       

       
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:usagelogConnectionString %>"
                    DeleteCommand="DELETE FROM [OriginalReport] WHERE [F1] = @F1"
                    InsertCommand="INSERT INTO [OriginalReport] ([F2], [F3], [F4], [F5], [F6], [F7], [F8], [F9], [F10]) VALUES (@F2, @F3, @F4, @F5, @F6, @F7, @F8, @F9, @F10)"
                    SelectCommand="SELECT [F1], [F2], [F3], [F4], [F5], [F6], [F7], [F8], [F9], [F10] FROM [OriginalReport] WHERE ([F5] = @F5)"
                   
           
            UpdateCommand="UPDATE [OriginalReport] SET [F2] = @F2, [F3] = @F3, [F4] = @F4, [F5] = @F5, [F6] = @F6, [F7] = @F7, [F8] = @F8, [F9] = @F9, [F10] = @F10 WHERE [F1] = @F1">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="RadComboBox1" Name="F5"
                            PropertyName="SelectedValue" Type="String" />
                    </SelectParameters>
                    <DeleteParameters>
                        <asp:Parameter Name="F1" Type="Int32" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="F2" Type="DateTime" />
                        <asp:Parameter Name="F3" Type="String" />
                        <asp:Parameter Name="F4" Type="String" />
                        <asp:Parameter Name="F5" Type="String" />
                        <asp:Parameter Name="F6" Type="String" />
                        <asp:Parameter Name="F7" Type="String" />
                        <asp:Parameter Name="F8" Type="String" />
                        <asp:Parameter Name="F9" Type="String" />
                        <asp:Parameter Name="F10" Type="String" />
                        <asp:Parameter Name="F1" Type="Int32" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="F2" Type="DateTime" />
                        <asp:Parameter Name="F3" Type="String" />
                        <asp:Parameter Name="F4" Type="String" />
                        <asp:Parameter Name="F5" Type="String" />
                        <asp:Parameter Name="F6" Type="String" />
                        <asp:Parameter Name="F7" Type="String" />
                        <asp:Parameter Name="F8" Type="String" />
                        <asp:Parameter Name="F9" Type="String" />
                        <asp:Parameter Name="F10" Type="String" />
                    </InsertParameters>
                </asp:SqlDataSource>
              
    </div>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConnectionString="<%$ ConnectionStrings:usagelogConnectionString %>"
        SelectCommand="SELECT * FROM [Vendors] ORDER BY [F1]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server"
        ConnectionString="<%$ ConnectionStrings:usagelogConnectionString %>"
        SelectCommand="SELECT * FROM [Industry] ORDER BY [F1]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource5" runat="server"
        ConnectionString="<%$ ConnectionStrings:usagelogConnectionString %>"
        SelectCommand="SELECT * FROM [contenttype] ORDER BY [F1]">
    </asp:SqlDataSource>
    </form>
</body>
</html>

Marin
Telerik team
 answered on 26 Jan 2011
1 answer
244 views

Posted on Jan 20, 2011 (permalink)

Hi Peter,

Version am using is: <image:telerikversion.jpg>
Based on this version, Please help me to solve and achieve the following:
1. My maste page holds the asp.menu bound to sitemap. After creating the page holding the radscheduler which will the first page which some users see, I found that the menu items are not shown to top of the radscheduler. <Attached the image file: OnTopOfAspMenu.jpg>
2. Related to resources in timeline view - will be showing only that view:
2.1. any way to align the resources to left which is vertically shown. <image file:ResourceAndRowAlignment.jpg>
2.2. want to highlight first one or two resources (based on a business logic). how to achieve it?
2.3. is there a way to show day commonly as a row on top of am and pm row or any work around to achieve it (may group by resources horizontally or something like that?), this will be needed if i need to show user 2 weeks slots. then while my current setting to show the date and weekday looks a bit difficult for the eyes. <image file:2WeeksSlotsView.jpg>
2.4. currently timeline view is showing an appt as one line for the resource and row is having some space after that which looks quite odd. Is there any way to achieve auto adjustment of row height 
 - first will be based on resource lenght and wrapping if no appts
 - if any appts then just resource and then appt
<image:AutoRowHeight.jpg>

Thanks in advance
Suja
Peter
Telerik team
 answered on 26 Jan 2011
1 answer
62 views
Hi all. I am new at Telerik and i used a control called telerik rad editor in my app. also the same problem is here:
http://www.telerik.com/community/forums/aspnet-ajax/editor/how-to-prevent-character-replacement-on-save-event.aspx

but i only use asp.net and telerik. so i think maybe you can answer this question.

the error is:

For example on my portal i can see Türkçe as Türkçe when browsing. However when viewing page source or database table called htmlText i see that all Turkish chars displayed as friendly codes. [t&uuml;rk&ccedil;e]


thanks.
Rumen
Telerik team
 answered on 26 Jan 2011
1 answer
129 views
Currently I have to click the Spell check button on RadEditor's toolbar to see the word suggestions. Is there any way for that? I did find a way to run Spell Checker on Submit Button click but how do I get what I want? I have gone through forums but in vain. Need help please. Thanks
Rumen
Telerik team
 answered on 26 Jan 2011
2 answers
273 views
Summary
I want a way to change the text of a RadToolTip using JavaScript.

In Detail
I have an ASP.NET page that contains a "DataGrid" (actually, it's one of our own controls, but that's largely irrelevant).

In the ItemTemplate, we define the "row".  One of the elements in the Row is a RadToolTip.

However, what we need displayed here (simple text) takes too long to work out when the page is initially loading.

The User has to click on a button to say they want the data and this button causes an Ajax callback.

This callback "panel" does not contain the datagrid.

The result of the callback lets me know the text for every single RadToolTip Control on the page - each one has its own unique text.

So, within a JavaScript function, I then have (for each RadToolTip on the page):
  • The clientID for the RadToolTip (which is a div, the inner input has the same clientId, suffixed with "_ClientState"
  • The text for the RadToolTip to display
So...the question is how can I change the text from my JavaScript function?

I do note that the text is actually controlled by the following:

Sys.Application.add_init(function() {
239 $create(Telerik.Web.UI.RadToolTip, {"_cssClass":"","_manualCloseButtonText":"Close","clientStateFieldID":"ctl00_cph1_browser_products_products_products_Repeater_ctl02_itemIconTooltip_ClientState","formID":"aspnetForm","relativeTo":1,"skin":"Default","targetControlID":"ctl00_cph1_browser_products_products_products_Repeater_ctl02_itemIcon","text":"Text to display"}, null, null, $get("ctl00_cph1_browser_products_products_products_Repeater_ctl02_itemIconTooltip"));
240});

Thanks in advance

Griff

Jonathan
Top achievements
Rank 1
 answered on 26 Jan 2011
2 answers
313 views
it is a very simple scenario. I have a RadTextBox in Password mode which is nested in RadMultiPage.
When i click a checkbox with enabled AutoPostback AJAX loading panel appears and the password field is empty.
As you see i have a RadAjaxManager. Otherwise i would simply say:

If IsPostBack Then
     If Not String.IsNullOrEmpty(Password.Text.Trim()) Then
         Password.Attributes.Add("value", Password.Text)
     End If
     If Not String.IsNullOrEmpty(ConfirmPassword.Text.Trim()) Then
         ConfirmPassword.Attributes.Add("value", ConfirmPassword.Text)
     End If
 End If


Thank you 
El
Top achievements
Rank 1
 answered on 26 Jan 2011
6 answers
313 views
hi
i cant get column value ,i save in label then i pass to other page
my code:

 <script type="text/javascript">
        function open1() {

            var obj_target = window.opener.document.forms[0];
            if (obj_target != null)
             {
                obj_target['ctl00$ContentPlaceHolder1$txtCustomerID'].value = document.getElementById("ID").value;
                obj_target['ctl00$ContentPlaceHolder1$txtLastname'].value = document.getElementById("lblName").value
;
            }
            self.close();
        }
    </script>
**********************************************************************************************
    <telerik:RadGrid ID="grdCustomersInfo" runat="server" AutoGenerateColumns="False"
            GridLines="None" Skin="Office2007" OnItemCommand="grdCustomersInfo_ItemCommand">
            <MasterTableView DataKeyNames="CustomerID">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridTemplateColumn>
                        <ItemTemplate>
                            <asp:Label runat="server" ID="CustomerID" Text='<%# Eval("CustomerID") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn UniqueName="column" DataField="CustomerID" HeaderText="??">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="???">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblFirstName" Text='<%# Eval("FirstName") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="??? ????????">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblLastName" Text='<%# Eval("LastName") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn UniqueName="column3" DataField="" HeaderText="">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="column4" DataField="" HeaderText="">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="??????">
                        <ItemTemplate>
                            <asp:LinkButton runat="server" ID="lbSelect" CommandName="Select" Text="??????"></asp:LinkButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
            <HeaderContextMenu EnableAutoScroll="True">
            </HeaderContextMenu>
        </telerik:RadGrid>
i want when i click 'lbSelect' transfer customerid,FirstName,LastName to other page
thanks

Vasil
Telerik team
 answered on 26 Jan 2011
1 answer
123 views
Hi,

we use the following version: 2008.1.515.20
we want to upgrade to the newer version, so we downloaded the trial version for testing it.
after we replaced the files, we saw that we get strange behavior with the style, please look at the attached image
the left side is the new version
right side is the old version

please see the differences which are highlighted in red

what can cause it?

Yana
Telerik team
 answered on 26 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?