Telerik Forums
UI for ASP.NET AJAX Forum
18 answers
231 views
Hi!
I have a issue in Safari; it adds <div>'s and <span>'s instead of <br />'s!
Sometimes it also add some el weirdo styling, like color(rgb...)
This must be a bug, or??
Any ideas? Safari users is wrecking my site layout :(
Rumen
Telerik team
 answered on 11 May 2011
2 answers
216 views
Hi.
How can i fill a combobox with values in insert-/editmode when i have a hierarchical grid for the detailtable?

Ceci
Cecilie Nordbø
Top achievements
Rank 1
 answered on 11 May 2011
10 answers
208 views
I have two issues with current release of the RibbonBar.

Is there a way to set the selected tab programmatically?  For instance, say the ribbonbar has 3 tabs, Home, Issues, and Setup.  A button on the setup ribbon, has a button that causes a postback.  Upon postback, there doesn't appear to be a way to programmatically set a tab as selected.  It would be nice if there was a .Selected property that was accessible.

The second issue is with the image urls.  It appears that the current property doesn't observe the virtual path ("~/"). I can workaround this with the following, but it is pretty ugly:

For Each t As RibbonBarTab In Me.RibbonBar.Tabs
    If t.Text = "Issue Tracker" Then
        For Each g As RibbonBarGroup In t.Groups
            If g.ID = "rbgIssueTracker" Then
                For Each b As RibbonBarButton In g.Items
                    Select Case b.ID
                        Case "btnIssueTracker_MyIssues"
                            Me.btnIssueTracker_MyIssues.ImageUrlLarge = ResolveUrl("~/img/toolbar/myissues.png")
                        Case "btnIssueTracker_AddIssue"
                            Me.btnIssueTracker_AddIssue.ImageUrlLarge = ResolveUrl("~/img/toolbar/addnew.png")
                        Case "btnIssueTracker_ProjectSummary"
                            Me.btnIssueTracker_ProjectSummary.ImageUrlLarge = ResolveUrl("~/img/toolbar/projectsummary.png")
                        Case "btnIssueTracker_Roadmap"
                            Me.btnIssueTracker_Roadmap.ImageUrlLarge = ResolveUrl("~/img/toolbar/roadmap.png")
                        Case "btnIssueTracker_ChangeLog"
                            Me.btnIssueTracker_ChangeLog.ImageUrlLarge = ResolveUrl("~/img/toolbar/changelog.png")
                    End Select
                Next
            ElseIf g.ID = "rbgIssueTrackerAdministration" Then
                For Each b As RibbonBarButton In g.Items
                    Select Case b.ID
                        Case "btnIssueTracker_Administration"
                            Me.btnIssueTracker_Administration.ImageUrlLarge = ResolveUrl("~/img/toolbar/administration.png")
                    End Select
                Next
            End If
        Next
    End If
Next

This works, but as you can see, it isn't very straightforward because there doesn't appear to be any FindButtonById/FindButtonByText property.

I am missing something in the current release?  Or are these feature planned for the future?
Arnaud
Top achievements
Rank 1
 answered on 11 May 2011
1 answer
77 views
Hi there,

I'm encounter a problem with selecting entire list (bullet-list or number-list) if there's only one item in the list.

If I have the following list:

<ul>
    <li>Item 1 
    <ul>
        <li>Second Level</li>
    </ul>
    </li>
    <li>Item 2</li>
    <li>Item 3</li>
</ul>

If I cursor to "second level" in Design view, the Html structure shown at the bottom is the following:
UL > UL > LI > RemoveElement

If I click on the second UL as I want to apply a style to the UL, the LI is selected and not the UL so I can't apply the style to the UL element.

But this works if there are more then one item in the 2nd UL:

<ul>
    <li>Item 1 
    <ul>
        <li>Second Level</li>
        <li>Second Level 2</li>
    </ul>
    </li>
    <li>Item 2</li>
    <li>Item 3</li>
</ul>


Please let me know how I can do this in design view without manual HTML editing.

Thanks
Rumen
Telerik team
 answered on 11 May 2011
1 answer
171 views
Hi there,

I've tried to integrate RadGrid into an application page of SP2010. After following the article http://www.telerik.com/help/aspnet-ajax/moss-deploying-radcontrols.html, I got error when loading the default site page (without RadGrid). If I remove the two <safecontrol> entries from web.config, the home page (without RadControl) can be displayed. But the page with RadGrid cannot be shown. It shows "An unexpected error has occurred". So far I don't find out what the unexpected error is.

In the application page, the RadGrid is a very simple one by binding to a static datatable using needdatasource method without any button. The version is 2011 Q1.

Any suggestion?

Thanks!
Maria Ilieva
Telerik team
 answered on 11 May 2011
4 answers
98 views
Is there a way to get the buttons generated by the upload control to use the new RadButtons with the images?

Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 11 May 2011
3 answers
118 views
Is there a way to indent a bullet list?  If I use the indent function on the bullet list it will indent the list by creating another <ul> </ul> to wrap around my existing bullet list and I don't want that.  

Thanks
Rumen
Telerik team
 answered on 11 May 2011
1 answer
131 views
Hi,  
  
I'm using a single RadSchedulerRecurrenceEditor that I use to generate a recurrence rule. The user can also select time zone, start and end time on the page. How can the recurrence editor adjust to the selected time zone?  
  
Example if the user picks a start time of 10pm and an end time of 11pm in GMT-12, that means it is 10am in GMT the next day. So if the user have picked that his meeting.



Thanks,
Anders
Veronica
Telerik team
 answered on 11 May 2011
2 answers
158 views
Hello

I need to Dynamically load the usercontrols and bind the data in usercontrols dynamically
Here is my coad
1st user control : AvailableUsers.ascx
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Timer">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="Timer" />
                <telerik:AjaxUpdatedControl ControlID="pnlChat" LoadingPanelID="RadAjaxLoadingPanel1" />
               
            </UpdatedControls>
        </telerik:AjaxSetting>
        
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<table>
<tr>
<td>
      <telerik:RadDockLayout runat="server" EnableViewState="false" ID="RadDockLayout1"
    StoreLayoutInViewState="false">
    <telerik:RadDockZone runat="server" ID="RadDockZone2" Orientation="vertical" Style="width: 300px;
        min-height: 100px; float: right; margin-right: 20px;">
        <telerik:RadDock runat="server" ID="RadDock3" Title="Messenger" Width="300px">
            <ContentTemplate>
<asp:Timer ID="Timer" runat="server" Interval="10000" ></asp:Timer> 
<asp:Panel runat="server" ID="pnlChat" align="center" DefaultButton="btn_send" >  
                   
                   
           <table style="width:15%" border="1" align="center"><tr><td>
 
   
         
                   
              <telerik:RadListBox ID="radLBChat" runat="server" width="300" Height="100"></telerik:RadListBox>
                   
</td></tr>
<tr>
    <td style="width:85%">
  
    <telerik:RadTextBox ID="radtextbox1" runat="server" TextMode="MultiLine" width="100%"></telerik:RadTextBox>
    </td><td>
   <asp:Button ID="btn_send" Text="Send" runat="server" />
    </td></tr>
</table></asp:Panel>
 
</ContentTemplate>
        </telerik:RadDock>
    </telerik:RadDockZone>
        
</telerik:RadDockLayout>
 
    </td></tr>
    <tr>
     <td>
        
     </td>
    </tr>
    </table>
Based on selection Done in 1st usercontrol i need to populate 2nd user control data
Fallowing code i am using in 1st usercontrol 
 on cick of radpane item in 1st usercontrol i am binding 2nd usercontrol to panel in master page

 protected void ShowMessanger_Click(object sender, RadPanelBarEventArgs e)
        {
            _onLineChat.UserID = (int)Session["UserID"];
            _onLineChat.Status = 2;
            _onLineChat.SetCoachStatus();
            e.Item.SelectedCssClass = "RadPanelBar_Green";
            ucMessanger.Visible = true;
           Panel pnlMessanger =   ((Panel)Page.Master.FindControl("pnlWidget"));
           pnlMessanger.Controls.Add(ucMessanger);
        }

Second USerControl : Chat.ascx
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Timer">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radlist1" LoadingPanelID="RadAjaxLoadingPanel1">
                    </telerik:AjaxUpdatedControl>
                 
                </UpdatedControls>
            </telerik:AjaxSetting>
            </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
 
            <telerik:RadDockLayout runat="server" EnableViewState="false" ID="RadDockLayout1"
     StoreLayoutInViewState="false">
        <telerik:RadDockZone runat="server" ID="RadDockZone2" Orientation="vertical" Style="width: 300px;
            min-height: 100px; float: left; margin-right: 20px;">
            <telerik:RadDock runat="server" ID="RadDock3" Title="Chat" Width="300px">
                <ContentTemplate>
                     
                         
                    <asp:Timer ID="Timer" runat="server" Interval="10000" OnTick="OnlineCoaches"></asp:Timer>
                    <telerik:RadPanelBar ID="radlist1" runat="server" Width="200" Height="100"
                             
                          AutoPostBack="True" OnItemClick="ShowMessanger_Click"></telerik:RadPanelBar>
              
                </ContentTemplate>
            </telerik:RadDock>
        </telerik:RadDockZone>
        
    </telerik:RadDockLayout>
Data in availableUsers.ascx will get changed based on timer value

Maria Ilieva
Telerik team
 answered on 11 May 2011
2 answers
247 views
Hello,

I have a problem with all my customizations in the RadGrid1_ItemDataBound to the Total and Subtotal rows as well as to LinkButton.
The custom data in the columns in the rows (like custom calculations) are erased/removed when I for instance collapse a group or click on the LinkButton.

So any time there is a postback in the grid the customizations are erased....

Should I also initialize the customizations on some other event or am I missing something?

Please advise.

Thanks,
-Arek

the code below:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
     
    <div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" DataSourceID="SqlDataSource1"
            GridLines="None" EnableAJAX="true" EnableAJAXLoadingTemplate="true" LoadingTemplateTransparency="25"
            ShowGroupPanel="True" AllowPaging="True" AllowSorting="True"
            Skin="Vista" OnItemDataBound="RadGrid1_ItemDataBound" ShowFooter="true"
            OnItemCreated="RadGrid1_ItemCreated" >
            <ClientSettings AllowDragToGroup="True">
            </ClientSettings>
            <MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1" ShowGroupFooter="true"
                AllowMultiColumnSorting="true">
                 
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="Market" FilterControlAltText="Filter Market column"
                        HeaderText="Market" SortExpression="Market" UniqueName="Market">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Station" FilterControlAltText="Filter Station column"
                        HeaderText="Station" SortExpression="Station" UniqueName="Station">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Spots" DataType="System.Int32" FilterControlAltText="Filter Spots column"
                        HeaderText="Spots" ReadOnly="True" SortExpression="Spots" UniqueName="Spots"
                        Aggregate="Sum" FooterText=" ">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Spend" DataType="System.Decimal" FilterControlAltText="Filter Spend column"
                        HeaderText="Spend" SortExpression="Spend" UniqueName="Spend" Aggregate="Sum"
                        FooterText=" " DataFormatString="{0:F2}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CALL" DataType="System.Int32" FilterControlAltText="Filter CALL column"
                        HeaderText="CALL" ReadOnly="True" SortExpression="CALL" UniqueName="CALL" Aggregate="Sum"
                        FooterText=" ">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ORDR" DataType="System.Int32" FilterControlAltText="Filter ORDR column"
                        HeaderText="ORDR" ReadOnly="True" SortExpression="ORDR" UniqueName="ORDR" Aggregate="Sum"
                        FooterText=" ">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CPC" DataType="System.Decimal" FilterControlAltText="Filter CPC column"
                        HeaderText="CPC" ReadOnly="True" SortExpression="CPC" UniqueName="CPC" DataFormatString="{0:F2}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CPM" DataType="System.Decimal" FilterControlAltText="Filter CPM column"
                        HeaderText="CPM" ReadOnly="True" SortExpression="CPM" UniqueName="CPM" DataFormatString="{0:F2}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CPO" DataType="System.Decimal" FilterControlAltText="Filter CPO column"
                        HeaderText="CPO" ReadOnly="True" SortExpression="CPO" UniqueName="CPO" DataFormatString="{0:F2}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CTO" DataType="System.Double" FilterControlAltText="Filter CTO column"
                        HeaderText="CTO" ReadOnly="True" SortExpression="CTO" UniqueName="CTO" DataFormatString="{0:F2}">
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="Market" />
                        </GroupByFields>
                        <SelectFields>
                            <telerik:GridGroupByField FieldName="Market" HeaderText="Market" />
                        </SelectFields>
                    </telerik:GridGroupByExpression>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldName="Station" FieldAlias="Station" FormatString=""
                                HeaderText="Station"></telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="Station" FieldAlias="Station" FormatString=""
                                HeaderText=""></telerik:GridGroupByField>
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
            </MasterTableView>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            </HeaderContextMenu>
        </telerik:RadGrid>
    </ContentTemplate>
    </asp:UpdatePanel>
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            try
            {
                if (e.Item is GridFooterItem)
                {
                    GridFooterItem footer = (GridFooterItem)e.Item;
                    footer["Market"].Controls.Add(new LiteralControl("<span>Grand Total :</span>"));
                    footer["Market"].Style.Add("Text-align", "right");
 
                    float cpc = Convert.ToSingle(footer["Spend"].Text)/Convert.ToSingle(footer["CALL"].Text);
                    string txtCpc = string.Format("<span>{0:F2}</span>", cpc);
                    footer["CPC"].Controls.Add(new LiteralControl(txtCpc));
 
                    float cpm = Convert.ToSingle(footer["CALL"].Text) / (Convert.ToSingle(footer["Spend"].Text) / 1000.00F);
                    string txtCpm = string.Format("<span>{0:F2}</span>", cpm);
                    footer["CPM"].Controls.Add(new LiteralControl(txtCpm));
 
                    float cpo = Convert.ToSingle(footer["Spend"].Text) / Convert.ToSingle(footer["ORDR"].Text);
                    string txtCpo = string.Format("<span>{0:F2}</span>", cpo);
                    footer["CPO"].Controls.Add(new LiteralControl(txtCpo));
 
                    float cto = Convert.ToSingle(footer["ORDR"].Text) / Convert.ToSingle(footer["CALL"].Text);
                    string txtCto = string.Format("<span>{0:F2}</span>", cto);
                    footer["CTO"].Controls.Add(new LiteralControl(txtCto));
                }
                else if (e.Item is GridGroupFooterItem)
                {
                    GridGroupFooterItem groupFooter = (GridGroupFooterItem)e.Item;
                    groupFooter["Market"].Controls.Add(new LiteralControl("<span>SubTotal :</span>"));
                    groupFooter["Market"].Style.Add("Text-align", "right");
 
 
                    float cpc = Convert.ToSingle(groupFooter["Spend"].Text) / Convert.ToSingle(groupFooter["CALL"].Text);
                    string txtCpc = string.Format("<span>{0:F2}</span>", cpc);
                    groupFooter["CPC"].Controls.Add(new LiteralControl(txtCpc));
 
                    float cpm = Convert.ToSingle(groupFooter["CALL"].Text) / (Convert.ToSingle(groupFooter["Spend"].Text) / 1000.00F);
                    string txtCpm = string.Format("<span>{0:F2}</span>", cpm);
                    groupFooter["CPM"].Controls.Add(new LiteralControl(txtCpm));
 
                    float cpo = Convert.ToSingle(groupFooter["Spend"].Text) / Convert.ToSingle(groupFooter["ORDR"].Text);
                    string txtCpo = string.Format("<span>{0:F2}</span>", cpo);
                    groupFooter["CPO"].Controls.Add(new LiteralControl(txtCpo));
 
                    float cto = Convert.ToSingle(groupFooter["ORDR"].Text) / Convert.ToSingle(groupFooter["CALL"].Text);
                    string txtCto = string.Format("<span>{0:F2}</span>", cto);
                    groupFooter["CTO"].Controls.Add(new LiteralControl(txtCto));
                }
                //else if (e.Item is GridDataItem2)
                //{
                //    GridDataItem item = (GridDataItem)e.Item;
                //    HyperLink hyplink = new HyperLink();
                //    hyplink.ID = "HyperLink1";
                //    hyplink.Text = item["Station"].Text;
                //    hyplink.NavigateUrl = "#";
                //    item["Station"].Controls.Add(hyplink);
                //}
                else if (e.Item is GridDataItem)
                {
                    GridDataItem item = (GridDataItem)e.Item;
                    LinkButton lnkButton = new LinkButton();
                    lnkButton.ID = "LinkButton1";
                    lnkButton.Text = item["Station"].Text;
                    lnkButton.Click += lnkButton_Click;
                    item["Station"].Controls.Add(lnkButton);
                }
 
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(base.GetType(), "Alert", ex.Message.ToString());
            }
        }

Tsvetina
Telerik team
 answered on 11 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?