Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
117 views

I have reviewed several resources while trying to programmatically control whether a user should be allowed to rename an item in RadFileExplorer. Here are a couple of the resources that I have reviewed:

 

 

The FileExplorer on my web page has a root folder. Under the root folder, I populate the explorer with “home folders”; this is done during the Page_Load event. You can think of the home folders like Windows Profiles. When a user logs into Windows, they have access to the folders that are associated with their profile. I am doing a similar thing with file explorer. When a user logs into my website, they have access to their home folder, its files, and its subdirectories. They do not have access to home folders that belong to other users and file explorer is configured so that it will not let a user see the home folders of other users.

 

As you know, FileExplorer allows you to right-click on a file or folder, and click Rename. That is cool and it saves a lot of development time. In my web page, I allow users to rename anything they want. But I do not want them to be able to rename their home folder.

 

My RadFileExplorer contains the following setting (among others): OnClientMove="fncMoveOrRename". My intent is to use this function that you see referenced here as a way to check whether the currently selected item in FileExplorer is a home folder vs. any other file or folder. If it’s a home folder, then cancel is set to true. But even when cancel is set to true, the rename still occurs. Is the documentation that I referenced above correct? I should be able to prevent a rename by canceling the OnClientMove, right?

 

To determine if the problem had anything to do with my logic, I stripped everything out of fncMoveOrRename, and I am left with the following:

 

function fncMoveOrRename(objExplorer, eventArgs) {

    alert("Click OK to cancel.");

    eventArgs.set_cancel(true);

}

When I rename a folder, the alert message appears, and I click OK. But cancel is never triggered. I still have the undesirable effect of having the folder renamed even though cancel is set to true. What am I missing here?

 

Thank you,

Steven

Brian
Top achievements
Rank 1
 answered on 04 Sep 2012
2 answers
79 views
Hi All - I have an <asp:Menu> with 6 or so items.  below the <asp:Menu> there is a <telerik:RadTabStrip>.  when I drop the menu down, a part of it is occluded by the tabstrip.  I tried this with a RadMenu and there does not seem to be an issue however I cant seem to style radmenu the way i want.  any way to tell TabStrip not to be such a be-firster? pic attached. 

Thanks.
Helen
Telerik team
 answered on 04 Sep 2012
3 answers
184 views
I see the default color of all provided skin is gray. Whether telerik consider to add more color for choice such as attached image?
Bozhidar
Telerik team
 answered on 04 Sep 2012
3 answers
336 views
Hey Peeps,

I have a question about the RadComboBox. I'm busy working on a page where we have multiple RadComboBoxes with Checkboxes as its template (we're using Telerik ASP.NET Q1 2009 controls). The combobox is databound using the asp:SqlDataSource component. The reason for this is that I am unable to programmatically load the data as it depends on the selection of the user. Once the user has made his/her selection, I programmatically build up the SQL query and set the SqlDataSource's SelectCommand equal to the new generated query. We also need to have a 'Select All' option at the top of the combobox. I'm adding the item in the code-behind like so:

cboCategories.Items.Clear();
cboCategories.Items.Add(new RadComboBoxItem("Select All", "-2"));
cboCategories.DataBind();

When I open the drop down list, the first entry is there but is not showing the text value (see screenshot).

The aspx code looks like:

<telerik:RadComboBox ID="cboCategories" runat="server" Skin="Hay" EmptyMessage="Select" AutoPostBack="true" AppendDataBoundItems="true" AllowCustomText="true" Enabled="false" DataSourceID="sqlCategories" DataValueField="sigma$ID" DataTextField="category$Name" HighlightTemplatedItems="true" OnClientDropDownClosing="OnClientDropDownClosingHandler" OnClientDropDownClosed="onDropDownClosing" Width="324px">
                        <ItemTemplate>
                            <div onclick="StopPropagation(event)">
                                <asp:CheckBox ID="chkCategories" runat="server" onclick="onCheckBoxClick('ctl00_ContentPlaceHolderMain_cboCategories',this,'chkCategories')" />
                                <asp:Label ID="Label1" runat="server" AssociatedControlID="chkCategories">
                                    <%# Container.DataItem != null ? DataBinder.Eval(Container.DataItem, "category$Name") : DataBinder.Eval(Container, "Text") %>
                                </asp:Label>
                            </div>
                        </ItemTemplate>
                    </telerik:RadComboBox>
                    <asp:SqlDataSource ID="sqlCategories" runat="server" ConnectionString="<%$ ConnectionStrings:SparSQLConnectionString %>" SelectCommand=""></asp:SqlDataSource>

I have also tried adding the item in the aspx file using:
<Items>
    <telerik:RadComboBoxItem Text="Select All" Value="-2" />
</Items>

But using the aspx method, the item is not even shown. It only shows when it's added in the code behind BUT the text property displays blank. Any ideas?
Nencho
Telerik team
 answered on 04 Sep 2012
5 answers
162 views
I have a project when one of the pages has several separate RadGrids.  Each grid is bound to a generis list of custom objects, has AutoGeneratedColumns set to false, and uses GridBoundColumns to show the data.

This worked great... until we upgraded from Telerik ASP.NET 2011.1 to 2012.1.

Now this page is showing the Expand column on all grids on the page (the Expand arrows don't do anything), and for the life of me I cannot get these columns to go away.  I've seen some hacks, attaching to events to remove the column or using CSS to hide the column... but the question is, why is RadGrid creating this column at all?

We've looked for properties on the RadGrid to force this off and there doesn't appear to be any.  (AutoGenerateHierarchy=false doesn't do anything to help either!)

Note that there are other pages on the same site that have similar setup... multiple separate RadGrids, same settings, and so forth, and they don't exhibit the problem.  I've tried to see what the difference is, and am having no luck.

Can anybody please shed some light on this question: What triggers the RadGrid to show the Expand column?

Any help is appreciated.
Daniel
Telerik team
 answered on 04 Sep 2012
2 answers
72 views

 

hi 
   I am using telerik 2012.2.724.35 and grid is not ajaxified. 

1)    I have a problem with exportToPDF and exportToCSV.  i have template column with checkboxes and when I export to PDF . it display no data but only headers.
2) When I export to CSV the hidden label also display and CSV looks like TrueTrue or FalseFalse ( one for label and one for checkbox) depending if column ticked or not. Please note that label in column is visible false and style to display none.

The grid html and 2 columns are pasted below.

Thanks
Best Regards
Rizwan Bashir

<telerik:RadGrid ID="radGridPermission" runat="server" Skin="Office2007" AutoGenerateColumns="false" AllowPaging="false" AllowSorting="true" Width="99%">
<GroupingSettings CaseSensitive="false" />
<ExportSettings OpenInNewWindow="true" >
<Pdf FontType="Link" PaperSize="A4" />
<Excel Format="Html" />
<Csv ColumnDelimiter="Comma" RowDelimiter="NewLine" />
</ExportSettings>
<ClientSettings>
  <Scrolling AllowScroll="true" FrozenColumnsCount="2" UseStaticHeaders="true"/>
</ClientSettings>
  
<MasterTableView ShowHeader="true" AllowFilteringByColumn="false"
  
<PagerTemplate>
  
<uc1:gridFooter ID="gridFooter" runat="server" />
  
</PagerTemplate>
  
two sample colums are
  
<telerik:GridTemplateColumn HeaderStyle-Width="60px" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" DataField="IsActivator" SortExpression="IsActivator" FilterControlWidth="95%">
<ItemTemplate>
  <asp:CheckBox runat="server" ID="chkActivator" Checked="<%# ((SecurityTO)Container.DataItem).IsActivator %>" />
</ItemTemplate>
</telerik:GridTemplateColumn>
  
<telerik:GridTemplateColumn HeaderStyle-Width="60px" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left" FilterControlWidth="95%" SortExpression="IsQuestionnaireManager" >
<ItemTemplate>
  <asp:CheckBox runat="server" ID="chkQuestionnaireManager" Checked="<%# ((SecurityTO)Container.DataItem).IsQuestionnaireManager %>" >
  <asp:Label runat="server" ID="lblQuestionnaireManager" Text="<%# ((SecurityTO)Container.DataItem).IsQuestionnaireManager %>" style='display:none' Visible="false" />
</ItemTemplate>
</telerik:GridTemplateColumn>
Daniel
Telerik team
 answered on 04 Sep 2012
7 answers
955 views
Hi Telerik team,

I have a Hierarchical grid implemented as follows
<telerik:RadGrid ID="radGridMaster" runat="server" AutoGenerateColumns="false" OnDetailTableDataBind="radGridMaster_OnDetailTableDataBind">
    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
    <ClientSettings>
        <Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true"/>
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="false" DataKeyNames="Name1" Name="Master">
        <DetailTables>
            <telerik:GridTableView Name="Detail">
                <Columns>
                    <telerik:GridBoundColumn DataField="SubName1"  SortExpression="SubName1" UniqueName="SubName1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SubName2" SortExpression="SubName2" UniqueName="SubName2">
                    </telerik:GridBoundColumn>
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
            <telerik:GridBoundColumn DataField="Name1"  SortExpression="Name1" UniqueName="Name1">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Name2" SortExpression="Name2" UniqueName="Name2">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
I have two buttons above the grid two move items up and down. I was able to move up and down the rows inside the Master Grid. I need to achieve the same behavior in the Details Grid.
I need to know how to access:
- The selected element from the detail grid. In Master grid I got as follow: radGridMaster.SelectedItems[0]
- The parent row of the Detail grid in the Master grid.
- The DataSource of the Detail grid. In the Master grid is radGridMaster.DataSource

Thanks in advance,

L

L
Top achievements
Rank 1
 answered on 04 Sep 2012
4 answers
284 views
     Hello Please Help, i want to change colors of legend marker i mean the color of  rectangle, currently they are auto-generated.  
   Below is my code (6-series).

       rcScorecard.Series.Clear();
        rcScorecard.PlotArea.XAxis.Items.Clear();
        rcScorecard.PlotArea.YAxis.Items.Clear();

        rcScorecard.Skin = "Vista";
        rcScorecard.Series.Clear();
        rcScorecard.AutoLayout = true;

        rcScorecard.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font("Verdana", 12, System.Drawing.FontStyle.Bold);
        rcScorecard.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font("Verdana", 12, System.Drawing.FontStyle.Bold);

        //rcScorecard.PlotArea.YAxis.AutoScale = false;
        rcScorecard.PlotArea.YAxis.Step = 1;
        rcScorecard.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font("Verdana", 12, System.Drawing.FontStyle.Bold);
        rcScorecard.PlotArea.YAxis.AxisLabel.Visible = true;
        rcScorecard.PlotArea.YAxis.AxisLabel.TextBlock.Text = "Percentage (%)";

        rcScorecard.PlotArea.XAxis.AutoScale = false;
        rcScorecard.PlotArea.XAxis.AddItem(reportDate.AddMonths(-2).ToString("MMMM").Substring(0, 3) + reportDate.AddMonths(-2).Year.ToString());
        rcScorecard.PlotArea.XAxis.AddItem(reportDate.AddMonths(-1).ToString("MMMM").Substring(0, 3) + reportDate.AddMonths(-1).Year.ToString());
        rcScorecard.PlotArea.XAxis.AddItem(reportDate.ToString("MMMM").Substring(0, 3) + reportDate.Year.ToString());

        for (int count = 0; count < tblReport.Rows.Count; count++)
        {
            ChartSeries series = new ChartSeries();
            series.Name = tblReport.Rows[count][0].ToString();
            series.Type = ChartSeriesType.Line;
            rcScorecard.Series.Add(series);
            series.Items.Clear();
            for (int columnCount = 2; columnCount <= 4; columnCount++)
            {
                ChartSeriesItem item = new ChartSeriesItem();
                item.YValue = Convert.ToDouble(tblReport.Rows[count][columnCount]);
                series.Items.Add(item);
            }
        }
Sia
Telerik team
 answered on 04 Sep 2012
1 answer
59 views
Hi , 
how can i  enable / disable  RadAsyncUpload control  in client side ? 

with my way that disable / enable control but when enabled you can not select file to upload , the button not work . 

<telerik:RadAsyncUpload            Width="220px"
 EnableViewState="true"
 runat="server"
 ID="AUJustificatifEnfant"
 MaxFileInputsCount="1"
  Enabled="false"
 >
    <script type="text/javascript">
               function GetValue(sender, eventArgs) {
var AUJustificatifEnfant = document.getElementById('AUJustificatifEnfant');
  
 AUJustificatifEnfant.disabled = ! (chkAutreMotivation.checked || chkEnfantBasAge.checked);
    }
        </script>



Helen
Telerik team
 answered on 04 Sep 2012
1 answer
87 views
My client has complained about the small target area for the "next page" button.

We are currently using the Office2010 skin.

We do not have budget to create custom skins, rather we would like to know if it is possible to make the "next page" and "previous page" buttons wider.

These are used frequently, and we have plenty of horizontal space.

Another aspect of this issue is that the buttons shift around, depending on the values of the page buttons. 1-9 is narrower than 10-19, for example, and it is not possible to click through multiple pages without moving the mouse to compensate. A wider button would provide more "wibble room".
Kostadin
Telerik team
 answered on 04 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?