Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
341 views
Hello,

I have a RadEditor that is supposed to use the Image Manager that allows them to upload and insert pictures. Here is my code for formatting it from the C# side. The imgPath created is a virtual path.

string imgPath = GenerateOutputDirectory(false);
CreateDirectoryIfNotExist(imgPath);
RadEditor1.ImageManager.ViewPaths = new string [] {imgPath};
RadEditor1.ImageManager.UploadPaths = new string[] { imgPath };
RadEditor1.ImageManager.EnableAsyncUpload = true;
RadEditor1.ImageManager.SearchPatterns = new string[] { "*.jpeg", "*.jpg", "*.bmp", "*.gif", "*.png" };


I create a string that creates the virtual path in imgPath, then if the directory does not exist, I create it so the imgPath exists for sure. Then I attempt to set the View and Upload path of the image manager to have those folders. However, when I open the image manager, this is what I see: (attached .png image)

The way it looks it seems that my paths are not being set. Why is this? The imgPath is the correct virtualPath. 

  
Jason
Top achievements
Rank 1
 answered on 15 Aug 2014
2 answers
130 views
my raddropdowntree appears always at the top of html DOM , before the form , with absolute position

How can keep it in the same place I put in the aspx page with absolute positioning .

Magdalena
Telerik team
 answered on 15 Aug 2014
2 answers
437 views
Hello Team,

I want Rad Menu to behave responsive for my asp.net application.

Please find code below :
    <div class="container">
        <button class="toggle" type="button">Toggle menu</button>
        <div  class="popup">
    <telerik:RadMenu runat="server" RenderMode="Lightweight">
                <Items>
                    <telerik:RadMenuItem Text="File">
                        <Items>
                            <telerik:RadMenuItem Text="New" />
                            <telerik:RadMenuItem Text="Open" />
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadMenuItem Text="Save" />
                            <telerik:RadMenuItem Text="Save As" />
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadMenuItem Text="Print Preview" />
                            <telerik:RadMenuItem Text="Print" />
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadMenuItem Text="Close" />
                        </Items>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="Edit">
                        <Items>
                            <telerik:RadMenuItem Text="Undo" />
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadMenuItem Text="Cut" />
                            <telerik:RadMenuItem Text="Copy" />
                            <telerik:RadMenuItem Text="Paste" />
                            <telerik:RadMenuItem Text="Clipboard..." />
                            <telerik:RadMenuItem IsSeparator="True" />
                        </Items>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="Insert">
                        <Items>
                            <telerik:RadMenuItem Text="Break..." />
                            <telerik:RadMenuItem Text="Page Numbers..." />
                            <telerik:RadMenuItem Text="Date and Time..." />
                            <telerik:RadMenuItem Text="Field..." />
                            <telerik:RadMenuItem Text="Symbol..." />
                            <telerik:RadMenuItem Text="Comment" />
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadMenuItem Text="Picture" />
                            <telerik:RadMenuItem Text="Diagram" />
                            <telerik:RadMenuItem Text="Text Box" />
                            <telerik:RadMenuItem Text="Hyperlink" />
                        </Items>
                    </telerik:RadMenuItem>
</Items>
            </telerik:RadMenu>
    </div>
    </div>

Script:

 <script type="text/javascript">
            Sys.Application.add_load(function () {

                var $ = $telerik.$,
                    mqTest = document.getElementById("mqTest");

                $("link.append").appendTo("head");

                $(".toggle").bind("click", function () {
                    $(".popup").toggle();
                });

                var mq = window.matchMedia("(max-width: 980px)");
                mq.addListener(handleWidthChange);

                function handleWidthChange(mq) {
                    if (mq.matches) {
                        $(".popup").hide();
                    }
                    else {
                        $(".popup").show();
                    }
                }
                handleWidthChange(mq);
            });
        </script>

Css:
.toggle {
    display: none;
}
@media only screen and (max-width: 360px) {

    .container {
        position: relative;
    }

    .toggle {
        display: inline-block;
    }

    .popup {
        position: relative;
        left: 0;
        top: 100%;
        display: none;
    }

    .RadMenu {
        font-size: 16px;
        min-width: 40vw;
    }

    .RadMenu .rmRootGroup {
    }
        .RadMenu .rmRootGroup > .rmItem {
            float: none;
            border: 0;
            border-bottom: 1px solid #cccccc;
        }
        .RadMenu .rmRootGroup > .rmLast {
            border: 0;
        }

        .RadMenu .rmRootGroup .rmRootLink {
            padding: .5em 1em;
        }

    .rmSlide {
        display: inline-block !important;
        padding-left : 154px;
    }
}


It behaves too bad on hover effect and Sub Menu item always comes on top instead of inline with its parent item.

Can any one help me out?

Thanks and Regards,
Ruchi Patel
Ivan Zhekov
Telerik team
 answered on 15 Aug 2014
1 answer
165 views
I am having a problem with clearing filter value. I need to set ListOfFilterValues = Nothing for a GridBoundColumn. My code is as follows:

If TypeOf column Is GridBoundColumn Then
     Dim boundColumn As GridBoundColumn = TryCast(column, GridBoundColumn)
     boundColumn.FilterListOptions = GridFilterListOptions.AllowAllFilters
     DirectCast(column, Telerik.Web.UI.GridBoundColumn).ListOfFilterValues = Nothing

End If

However I am getting the error

Error 1 'Telerik.Web.UI.GridColumn.Protected Friend Property ListOfFilterValues As String()' is not accessible in this context because it is 'Protected Friend'. 

Any solution?

Thanks
Konstantin Dikov
Telerik team
 answered on 15 Aug 2014
4 answers
724 views
I am working on a program where I want to search for certain criteria in my database and display results in RadGrid.  I have created a WebMethod function that will query my database to get me my results.  My question is how to build result to pass back to Javascript to rebind the datasource?  I am currently storing info into DataTable, but I was reading that you need to have it in JSON format (is this accurate?).  So, once I have created my data in JSON format, how do I pass that over to a Javascript function as a parameter to then set datasource and rebind?

A side question: my boss is wanting this to occur on keypress.  How logical will this be?  Meaning will this be fast enough to continually fire and update on keypress?  So as person types each character of a person's last name in last name text box it continually fires the event and you see the results in the grid continually change as you type.  Thoughts???

Thank You,

Brad
Konstantin Dikov
Telerik team
 answered on 15 Aug 2014
1 answer
166 views
Using Silk skin, if I enable repeatcolumns :         <DefaultGroupSettings RepeatColumns="2" RepeatDirection="Vertical" />

the menu becomes transparent to the background

but if I remove it  the transparency disappears (the desired effect)  :      <DefaultGroupSettings  RepeatDirection="Vertical" /> 

whats is going on?

(see the attached screenshot of the two cases)

thank you

Magdalena
Telerik team
 answered on 15 Aug 2014
4 answers
347 views
I'm trying to get my RadGrid grouping working like the telerik demos. I can turn groups on and they perform column drag&drop grouping just fine, so far so good, however:

My collapse group buttons are not working. When I click on the arrow to collapse a group, it posts back to the server, but doesn't actually collapse the group. I was assuming it works by default, I didn't notice any handling in the server code in the demo.

Am I doing something wrong, or maybe I missed a step? What should I try next?

I also notice the styling is slightly different than in the demo - my group headers are flat but the demo's are shaded "3D" looking. That may be irrelevant, or might point in the right direction.


The telerik grid demo I'm talking about: http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/grouping/grouping/defaultcs.aspx

I'm using Telerik aspnet-ajax R 2014 Q1

My grid code:
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" GridLines="None" PageSize="25" AutoGenerateColumns = "false" ShowFooter="true" ShowGroupPanel="True" >
 
 
<ClientSettings AllowDragToGroup="true">
    <Resizing ResizeGridOnColumnResize="True"></Resizing>
</ClientSettings>
 
<GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
  
<MasterTableView TableLayout="Auto"  Width="100%" > <%-- AllowGroupCollapse="true" --%>
 
 
    <Columns>
        <telerik:GridBoundColumn UniqueName="trvAccountGroup" DataField="t_rv_account_group" HeaderText="trvAccountGroup"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="trvSysAccount" DataField="t_rv_sys_account" HeaderText="trvSysAccount"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="trvAccount" DataField="t_rv_account" HeaderText="trvAccount"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="trvGlObject1" DataField="t_rv_gl_object_1" HeaderText="trvGlObject1"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="trvGlObject2" DataField="t_rv_gl_object_2" HeaderText="trvGlObject2"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="trGl" DataField="t_r_gl" HeaderText="trGl"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="trcId" DataField="t_rc_id" HeaderText="trcId"></telerik:GridBoundColumn>
 
        <telerik:GridBoundColumn UniqueName="mAmt0" DataField="m_amt_0" HeaderText="mAmt0" DataFormatString="{0:F0}" Aggregate="Avg"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="mAmt1" DataField="m_amt_1" HeaderText="mAmt1" DataFormatString="{0:F0}" Aggregate="Avg"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="mAmt2" DataField="m_amt_2" HeaderText="mAmt2" DataFormatString="{0:F0}" Aggregate="Avg"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="mAmt3" DataField="m_amt_3" HeaderText="mAmt3" DataFormatString="{0:F0}" Aggregate="Avg"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="mAmt4" DataField="m_amt_4" HeaderText="mAmt4" DataFormatString="{0:F0}" Aggregate="Avg"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="mAmt5" DataField="m_amt_5" HeaderText="mAmt5" DataFormatString="{0:F0}" Aggregate="Avg"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="mAmt6" DataField="m_amt_6" HeaderText="mAmt6" DataFormatString="{0:F0}" Aggregate="Avg"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="mAmt7" DataField="m_amt_7" HeaderText="mAmt7" DataFormatString="{0:F0}" Aggregate="Avg"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="mAmt8" DataField="m_amt_8" HeaderText="mAmt8" DataFormatString="{0:F0}" Aggregate="Avg"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="mAmt9" DataField="m_amt_9" HeaderText="mAmt9" DataFormatString="{0:F0}" Aggregate="Avg"></telerik:GridBoundColumn>
                             
        <telerik:GridBoundColumn UniqueName="mAmtOther" DataField="m_amt_other" HeaderText="mAmtOther" DataFormatString="{0:F0}" Aggregate="Avg"></telerik:GridBoundColumn>
        <telerik:GridBoundColumn UniqueName="mTotalAmt" DataField="m_total_amt" HeaderText="mTotalAmt" DataFormatString="{0:F0}" Aggregate="Avg"></telerik:GridBoundColumn>
 
    </Columns>
</MasterTableView>
 
</telerik:RadGrid>

Viktor Tachev
Telerik team
 answered on 15 Aug 2014
9 answers
541 views

Hi,

I am trying to create a Leave chart for the employees in the company. I am having some problems in grouping data in Telerik Gantt chart. The datasource that is fed to the chart is shown below.

MemberID            MemberName            StartDate            EndDate
----------------------------------------------------------------------------------------
1                          Name1                       30987                 31723
2                          Name1                       31908                 31999
3                          Name2                       35678                 36321
4                          Name3                       34245                 34909
etc...

I want to display the member names on one axis, and the dates on the other axis. If you notice, Name1 has two records, so this should be reflected in the chart by showing two bars for one name (name1). I am getting the correct chart without grouping (however if a member has two leave periods, his name will be shown twice). Unfortunately with grouping, I am not being able to get the results printed on the chart as required. The code I am using is shown below. I am creating two series (assuming that a user has a maximum of two leave periods, so that the group column will divide each leave period on a separate series).

I am using version 2.0.0 of Telerik Controls.

//*********************************************************************************************************

 

 

// YAxis Properties 

 

radChart.YAxis.ValueFormat =

ChartValueFormat.ShortDate;

 

radChart.YAxis.LabelRotationAngle = 90;

radChart.YAxis.Label.Visible =

true;

 

radChart.YAxis.AutoScale =

false;

 

radChart.YAxis.IsZeroBased =

false;

 

radChart.YAxis.AddRange(_from.ToOADate(), _maxDate.Value.ToOADate(), 1);

 


// YAxis2 Properties
 

 

radChart.YAxis2.ValueFormat =

ChartValueFormat.ShortDate;

 

radChart.YAxis2.LabelRotationAngle = 90;

radChart.YAxis2.Label.Visible =

true;

 

radChart.YAxis2.AutoScale =

false;

 

radChart.YAxis2.IsZeroBased =

false;

 

radChart.YAxis2.Visible =

AxisVisibility.True;

 

radChart.YAxis2.AddRange(_from.ToOADate(), _maxDate.Value.ToOADate(), 1);

 


// General Properties

 

radChart.DefaultType =

ChartSeriesType.Gantt;

 

radChart.Legend.Visible =

false;

 

radChart.Titles.Add(

new ChartTitle("NBK WDG Leave Chart"));

 

 


// add data to table
 

 

 

DataTable _table = new DataTable("Leave");

 

_table.Columns.Add(

"MemberId", typeof(Int32));

 

_table.Columns.Add(

"MemberName", typeof(String));

 

_table.Columns.Add(

"StartDate", typeof(Double));

 

_table.Columns.Add(

"EndDate", typeof(Double));

 

 


foreach
(Member _member in Members)

 

{

_table.Rows.Add(_member.MemberId, _member.MemberName, _member.StartDate < _from ? _from.ToOADate() : _member.StartDate.ToOADate(), _member.EndDate.ToOADate());

}

 


// sort by member name

 

 

DataView _view = new DataView();

 

_view.Table = _table;

_view.Sort =

"MemberName";

 

 


// bind data to chart
 

 

radChart.DataSource = _view;

 


// instantiate new series

 

 

ChartSeries _series = new ChartSeries();

 

 


// define series Properties

 

_series.Type =

ChartSeriesType.Gantt;

 

_series.Name =

"Leave Periods";

 

_series.LabelAppearance.Visible =

false;

 

_series.DataYColumn =

"StartDate";

 

_series.DataYColumn2 =

"EndDate";

 

radChart.Series.Add(_series);

 


ChartSeries
_series2 = new ChartSeries();

 

_series2.Type =

ChartSeriesType.Gantt;

 

_series2.Name =

"Leave Periods 2";

 

_series2.LabelAppearance.Visible =

false;

 

_series2.DataYColumn =

"StartDate";

 

_series2.DataYColumn2 =

"EndDate";

 

radChart.Series.Add(_series2);

radChart.SeriesOrientation =

ChartSeriesOrientation.Horizontal;

 

 


 

radChart.DataGroupColumn =

"MemberId";

 

 

 

 

 

// XAxis Properties

 

radChart.XAxis.DataLabelsColumn =

"MemberName";

 

radChart.XAxis.Label.Visible =

true;

 

 


// bind data

 

radChart.DataBind();

 


// show only weekly marks

 

 

int i = 1;

 

 

foreach (ChartAxisItem _item in radChart.YAxis.Items)

 

{

 

if ((i % 7) != 0)

 

{

_item.Visible =

false;

 

}

i++;

}

i = 1;

 

foreach (ChartAxisItem _item in radChart.YAxis2.Items)

 

{

 

if ((i % 7) != 0)

 

{

_item.Visible =

false;

 

}

i++;

}

 

Please help.

Regards,
Ehab

 

Danail Vasilev
Telerik team
 answered on 15 Aug 2014
1 answer
70 views
Rename Default_aspx.jpg to Default.aspx
Pavlina
Telerik team
 answered on 15 Aug 2014
4 answers
82 views
Hi

We use visual studio 2008 with Telerik 2014 Q2. We are facing few minor issues with Masked Text Box in Grid. This happens only in IE 11

Masked Text Box-  when we enter first letter in the masked text box id disappears. when we enter second letter in the masked text box. it appears again.

How to fix this issue? 

Advance Thanks.
Viktor Tachev
Telerik team
 answered on 15 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?