Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
199 views
i have a small issue with the way the CSS is affecting Child Menus.
here is my code
<div style="height:20%;padding-top:50px;">
         <telerik:RadMenu  ID="RadMenu1" Style="float:right;" Flow="Horizontal"  runat="server">
            
        <Items>
            <telerik:RadMenuItem  Text="Messages"></telerik:RadMenuItem>
            <telerik:RadMenuItem  Text="Stock"></telerik:RadMenuItem>
            <telerik:RadMenuItem Text="Cash"></telerik:RadMenuItem>
            <telerik:RadMenuItem Text="Staff"></telerik:RadMenuItem>
            <telerik:RadMenuItem Text="Reports"></telerik:RadMenuItem>
            <telerik:RadMenuItem  selected="true" Text="Admin" >
                
                <Items>
                    <telerik:RadMenuItem  Text="Admin"></telerik:RadMenuItem>
                    <telerik:RadMenuItem text="Stock Admin"></telerik:RadMenuItem>
                </Items>
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>
     </div>




<style type="text/css">
 
 
    .RadMenu_Default .rmGroup .rmLink { 
        padding-left0px ;        
    
   /*rmRootLink rmLink*/
    .RadMenu_Default .rmGroup .rmLink .rmText { 
        padding-left5px 
         
    }
 
 
 
    .RadMenu_Default  .rmRootGroup  .rmSelected
    {
        background:#f7931d/*what happens when the Tab is 'Selected'*/           
    }
 
    div.RadMenu .rmRootGroup
    {
        /*all the border tags here, remove the black border that went round the entire Menu Control*/
        border-width:0px;     
        border-bottom:5px solid #f7931d;        
    }
    div.RadMenu .rmRootGroup .rmItem .rmText
    {
        text-align:left;
        /*the Border tags help to seperate each Menu Tab to make it look like its a seperate entity*/
        border-left:solid;           
        border-right:solid
        border-left-color:white;
        border-right-color:white;                        
         
        width:70px/*width of each root tab*/
        height:35px;    /*height of each root tab*/
        color:#979797/*colour of the text on the tab*/
    }
 
    div.RadMenu  .rmItem:hover .rmText
    {
       color:white;  /*font colour when hovering over*/
    }
 
    .RadMenu_Default .rmGroup .rmText
    {
        /*the border and background properties will remove the block on the left side of the drop down menu where an icon would usually be placed.*/
         border1px solid #979797 
         background#f0f0f0 ;                       
         
    }
 
    .RadMenu_Default .rmText:hover
    {
        background:#f7931d/*background of tabs when moused over*/
         
    }
 
 
    .RadMenu_Default
    {
        width:598px/*width of the entire control*/          
    }
</style>



The issue is that when i hover the mouse cursor over the Parent 'Admin' tab, the Parent 'Admin'
tab correctly 
highlights as orange and the text changes to white, but the sub menus of 'Admin'
(Admin & StockAdmin) also turn white.

moving the cursor so that it no longer hovers over the entire menu shows that the Parent 'Admin'
tab and its 
child tabs all change back to gray.

i would like it so that when i hover over Parent 'Admin', only the Parent Admin tab has its text
change to gray.

if i was to hover over one of the child tabs, only that one child tab would have its text change
to gray.


is this possible?
David
Top achievements
Rank 1
 answered on 27 Aug 2013
7 answers
126 views
Hi! I have an page with Telerik that uses TreeView concept.
I use GroupByExpression to construct nodes. But I need construct in my C# an logic that transform an row in SQL with Folders Path in an line in my GridView.
Ex:
In my SQL I have an column FolderPath and value is "N:\Test\Drive\FolderTest".
I need transform this in nodes, or grouping this to ex:

- N:\
  - Test\
    - Drive\
      -FolderTest\

How I make it (Nodes or Grouping) in C#?

Below is my aspx actual.
<form id="form1" runat="server">
<Telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<Telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="false" />
<Telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All"
    EnableRoundedCorners="false" />
<Telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <Telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <Telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1">
                </Telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </Telerik:AjaxSetting>
    </AjaxSettings>
</Telerik:RadAjaxManager>
<Telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</Telerik:RadAjaxLoadingPanel>
<div align="center" style="width: auto; height: auto;">
    <img src="image/NdriveBanner.png" align="center" />
</div>
<br />
<br />
<Telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" AllowSorting="True"
    AllowPaging="True" AutoGenerateColumns="False" GridLines="None">
    <PagerStyle Mode="NumericPages"></PagerStyle>
    <MasterTableView Width="100%" GroupLoadMode="Client" TableLayout="Fixed" GroupsDefaultExpanded="false">
        <PagerStyle Visible="false" />
        <GroupByExpressions>
            <Telerik:GridGroupByExpression>
                <SelectFields>
                    <Telerik:GridGroupByField FieldAlias="REGION" FieldName="REGION"></Telerik:GridGroupByField>
                </SelectFields>
                <GroupByFields>
                    <Telerik:GridGroupByField FieldName="REGION"></Telerik:GridGroupByField>
                </GroupByFields>
            </Telerik:GridGroupByExpression>
            <Telerik:GridGroupByExpression>
                <SelectFields>
                    <Telerik:GridGroupByField FieldAlias="MARKET" FieldName="MARKET"></Telerik:GridGroupByField>
                </SelectFields>
                <GroupByFields>
                    <Telerik:GridGroupByField FieldName="MARKET"></Telerik:GridGroupByField>
                </GroupByFields>
            </Telerik:GridGroupByExpression>
            <Telerik:GridGroupByExpression>
                <SelectFields>
                    <Telerik:GridGroupByField FieldAlias="LOCATIONNAME" FieldName="LOCATIONNAME"></Telerik:GridGroupByField>
                </SelectFields>
                <GroupByFields>
                    <Telerik:GridGroupByField FieldAlias="LOCATIONNAME" FieldName="LOCATIONNAME"></Telerik:GridGroupByField>
                </GroupByFields>
            </Telerik:GridGroupByExpression>
        </GroupByExpressions>
        <Columns>
            <Telerik:GridBoundColumn SortExpression="REGION" HeaderText="REGION" HeaderButtonType="TextButton"
                DataField="REGION">
            </Telerik:GridBoundColumn>
            <Telerik:GridBoundColumn SortExpression="MARKET" HeaderText="MARKET" HeaderButtonType="TextButton"
                DataField="MARKET">
            </Telerik:GridBoundColumn>
            <Telerik:GridHyperLinkColumn DataNavigateUrlFields="IDSERVER" DataNavigateUrlFormatString="PathFolders.aspx?idServer={0}"
                DataTextField="LOCATIONNAME" FilterControlAltText="Filter column column" HeaderText="LOCATION NAME"
                UniqueName="column">
                <ItemStyle HorizontalAlign="Left" />
            </Telerik:GridHyperLinkColumn>
            <Telerik:GridBoundColumn SortExpression="SERVERNAME" HeaderText="SERVER NAME" HeaderButtonType="TextButton"
                DataField="SERVERNAME">
            </Telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">
        <ClientEvents OnGridCreated="demo.GridCreated" />
    </ClientSettings>
    <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
</Telerik:RadGrid>
<br />
<asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:dbNDriveSecurityConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT IDLOCATION,REGION,MARKET,LOCATIONNAME,SERVERNAME,IDSERVER FROM LOCATIONS L INNER JOIN [SERVERS] S ON l.LocationCode = s.LocationCode ORDER BY Region,Market,LocationName,ServerName"
    runat="server"></asp:SqlDataSource>
</form>
Boyan Dimitrov
Telerik team
 answered on 27 Aug 2013
3 answers
83 views
Hi

I am trying to display a context menu on a div using radcontextmenu.showAt(). The issue is initially the radmenu is displayed and suddenly the browser context menu appear over it. How to resolve this?
Shinu
Top achievements
Rank 2
 answered on 27 Aug 2013
2 answers
335 views
Hi i using a HtmlChart - Column Chart.

How can i had an horizontal passing line in my chart.
I would like to one put a passing line at 55

Please refer to this link a put an horontal line in photoshop to show you what i need.
Exemple

For now i use this code :
Tks
<telerik:RadHtmlChart runat="server" ChartTitle-Text="Courbe FR" ID="RadHtmlChart1" Width="800" Height="500">
          <PlotArea>
               <Series>
                    <telerik:ColumnSeries Name="District">
                         <TooltipsAppearance Color="White" />
                         <SeriesItems>
                              <telerik:CategorySeriesItem Y="95" />
                              <telerik:CategorySeriesItem Y="80" />
                              <telerik:CategorySeriesItem Y="80" />
                              <telerik:CategorySeriesItem Y="85" />
                         </SeriesItems>
                    </telerik:ColumnSeries>
 
                    <telerik:ColumnSeries AxisName="AdditionalAxis" Name="Ministère">
                         <Appearance>
                              <FillStyle BackgroundColor="Red" />
                         </Appearance>
 
                         <TooltipsAppearance Color="White" />
                         <SeriesItems>
                              <telerik:CategorySeriesItem Y="90" />
                              <telerik:CategorySeriesItem Y="80" />
                              <telerik:CategorySeriesItem Y="45" />
                              <telerik:CategorySeriesItem Y="66" />
                         </SeriesItems>
                    </telerik:ColumnSeries>
                    
               </Series>
 
               <YAxis MinValue="0">
                    <TitleAppearance Text="%" />
               </YAxis>
 
               <AdditionalYAxes>
                    <telerik:AxisY Name="AdditionalAxis" Visible="false" Color="Red" Width="3">
                         <TitleAppearance Text="%" Visible="false" />
                    </telerik:AxisY>
               </AdditionalYAxes>
               <Series>
                <telerik:BarSeries Name="Seuil">
                       <Appearance>
                            <FillStyle BackgroundColor="Red"></FillStyle>
                       </Appearance>
 
                       <LabelsAppearance Position="Center">
                       </LabelsAppearance>
 
                       <TooltipsAppearance BackgroundColor="Red"></TooltipsAppearance>
                       <SeriesItems>
                            <telerik:CategorySeriesItem Y="55"></telerik:CategorySeriesItem>
                       </SeriesItems>
                  </telerik:BarSeries>
               </Series>
               <XAxis>
                    <LabelsAppearance />
                    <Items>
                         <telerik:AxisItem LabelText="L2" />
                         <telerik:AxisItem LabelText="L4" />
                         <telerik:AxisItem LabelText="F5" />
                         <telerik:AxisItem LabelText="F8" />
                    </Items>
               </XAxis>
          </PlotArea>
 
          <Legend>
               <Appearance Position="Bottom" />
          </Legend>
 
     </telerik:RadHtmlChart>



Danail Vasilev
Telerik team
 answered on 27 Aug 2013
7 answers
167 views
Team

I am having issue on grid exapand button click.

In my example I am hiding some buttons on Grid Item Data bound event. It works fiine all case but In case of Expand click it displaying all button on screen.

I don't want to display button on certain status

If "Success"
   The Button Hide
Else If "Pending"
   Display button

Jayesh Goyani
Top achievements
Rank 2
 answered on 27 Aug 2013
1 answer
112 views

I've been working with the RadFilter, and have added a RadFilterTextFieldEditor to the RadFilter which is set to a DataType of System.Guid.  When I pass the expression into a LinqDynamic query, it throws an exception:

ParseException:
Operator '==' incompatible with operand types 'Guid' and 'Object'

The RadFilter expression:
"(iif(it.UniqueId==null,\"\",it.UniqueId).ToString().ToUpper() = \"12345678-926F-44A9-936B-CDBB03DA888A\".ToUpper())"

Declarative code:
<telerik:RadFilterTextFieldEditor DataType="System.Guid" FieldName="UniqueId" DisplayName="Package Unique ID" />

Linq Query:

if (!string.IsNullOrEmpty(packageFilterExpression))

{

query = query

   .Where(packageFilterExpression);

}


Note:  I have researched this some and arrived at the following suggested workaround, however the suggestion to modify the LinqDynamic class in this case still doesn't work with the expression syntax generated by the RadFilter.

https://connect.microsoft.com/VisualStudio/feedback/details/333262/system-linq-dynamic-throws-an-error-when-using-guid-equality-in-where-clause

Additionally, when I add filtering to a RadGrid, to see how it generates a filter expression, I see that the expression is different, and consequently works.

The RadGrid expression:

"(UniqueId = Guid(\"12345678-926F-44A9-936B-CDBB03DA888A\"))"

Any assistance or verification the RadFilter actually works with a System.Guid would be appreciated!

Thanks!
Maria Ilieva
Telerik team
 answered on 27 Aug 2013
1 answer
149 views
Hi, 

I have a user control which has several RadComboBoxes with CheckBoxes set to True.

Some of these combo boxes have cascading datasources and have TextChanged events so when the user changes what items are checked it will re-bind the relevant controls that use this selection.

On the page I have a standard ASP.NET button which gets the values from these combo boxes and updates a chart and table etc.  When this button is clicked it is triggering the TextChanged events of the combo boxes which is making the combo boxes think nothing is selected when you can physically see items checked.

I have four combo boxes, ddlProject, ddlUnit, ddlDiscipline and ddlDocType.  ddlProject binds unit, discipline and doc type and unit/discipline update doc type.  Values don't need to be selected for these for the datasource as if there are no selected items then the SQL statements ignores this in the where clause.

If I don't select anything in unit or discipline there ddlDocType still binds and I can select items but when I click my button the TextChanged events fire and the CheckedItems for ddlDocType is 0.  If I have items selected in unit and discipline CheckItems for ddlDocType gives the correct number.

This is the structure of the combo boxes

<telerik:RadComboBox ID="ddlUnit" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true"
   MaxHeight="450px" Width="300px" DataTextField="Value" DataValueField="Key" Label="Unit:"
   LabelCssClass="HeaderLabel" DropDownWidth="600px" Height="400px"
   AutoPostBack="true" OnTextChanged="ddlUnit_TextChanged">
</telerik:RadComboBox>

This is an example of the OnTextChanged event

protected void ddlDiscipline_TextChanged(object sender, EventArgs e)
{
    CTRmDataService ctrmDS = new CTRmDataService();
 
    this.ddlDocType.DataSource = ctrmDS.GetDocumentTypesForProjectsDisciplineAndUnit(GetSelectedProjects(),
                                                                                GetSelectedDisciplines(),
                                                                                GetSelectedUnits(),
                                                                                LoggedOnUser.Id);
    this.ddlDocType.DataBind();
}

My user control has methods to make the selected items accessible such as :

public string[] GetSelectedDocTypes()
{
    return ddlDocType.CheckItems.Where(x => x.Value != "PSP")
                       .Select(v => v.Value).ToArray<string>();
}

I've been looking at this for quite a while now trying to figure out why the Telerik control events are being fired when I click the button and why the ddlDocType CheckedItems is bringing back nothing when nothing is selected in Unit/Discipline.

Can anyone help?

Nencho
Telerik team
 answered on 27 Aug 2013
1 answer
169 views
Need help if gird is empty then hide filter icon of grid.
Princy
Top achievements
Rank 2
 answered on 27 Aug 2013
1 answer
112 views
Hi

I having trouble on missing Rad editor icons (we are using the custom simpletools.xml to populate the list and fiddler shows no missing images)on only one website on the server, other websites that use the editor are working just fine.

Can you please help me with this issue?

Thanks
Marin Bratanov
Telerik team
 answered on 27 Aug 2013
1 answer
354 views
Based on some business rules on my form, I'd like to be able to disable/enable the RadAsyncUpload control on the client side.  Essentially, based on values entered by the user, the RadAsyncUpload control should either allow or disallow further uploads.  The one caveat is that if a user uploads files before the RadAsyncUpload control is disabled, those files SHOULD be uploaded when the page posts back.

I have tried using the set_enabled method, which does in fact disable/enable the control, however, if the control is disabled when the user submits the page, it seems like the FileUploaded server side event doesn't happen (the files are transported to the temporary folder, but the UploadedFiles parameter will be 0 and the FileUploaded event will not fire).

I've also tried disabling the "select" button of the control but "click" events in the telerik upload area still allow for browsing so disabling the button didn't really do anything for me. 

Any suggestions? 
Shinu
Top achievements
Rank 2
 answered on 27 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?