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

I have a LinkButton in a CommandItemTemplate in a RadGrid. I need to set the visibility of this button to false when the user is not authorized to use certain functionality. I do an authorization check in the Page_load method, and set the visibility to false. this works fine. However when the user clicks on one of the column headers(to sort) the button then shows back up. This doesn't happen to two other columns that I also set the visibility on to false. Is there some grid property I need to set to make this work?

ASP.NET:

<

 

CommandItemTemplate>

 

 

<div class="commandItemButtons">

 

 

<asp:LinkButton ID="addButton" runat="server" CommandName="InitInsert">

 

 

<img class="padding" alt="Add Acronym" src="../App_Themes/Default/TelerikControls/Grid/add.png" />Add Acronym</asp:LinkButton>

 

 

</div>

 

 

</CommandItemTemplate>

 

C#:

 

//Makes a reference to the addButton on the Page

 

 

LinkButton addButton = (WebUtilities.FindControl(acronymRadGrid, "addButton") as LinkButton) ;

 

 

//Administrators get to see all of the columns as well as the add button

 

 

if (WebUtilities.IsAdmin(User)) {

 

addButton.Visible =

true;

 

 

foreach (GridColumn column in acronymRadGrid.Columns) {

 

column.Visible =

true;

 

}

}

 

//Regular users only get to see the Acronym and Description columns

 

 

else {

 

addButton.Visible =

false;

 

 

foreach (GridColumn column in acronymRadGrid.Columns) {

 

 

if (column.HeaderText != "Acronym" && column.HeaderText != "Description") {

 

column.Visible =

false;

 

}

}

}

Thanks,

-Mike

Michael
Top achievements
Rank 1
 answered on 30 Oct 2008
4 answers
147 views
so how? :-)

Thank you very much. Tom
tomas
Top achievements
Rank 1
 answered on 30 Oct 2008
0 answers
127 views
I have a scheduler and a tooltipmanager like this :

<

div id="scheduler">

 

 

<telerik:RadScheduler ID="RadScheduler1" runat="server" Width="100%"

 

 

AllowDelete="False" SelectedView="WeekView" DayStartTime="07:00:00" DayEndTime="18:00:00"

 

 

CustomAttributeNames="aptType,Description,number,name,phone,adresse,city,visitType,EnvisagedDate,AllowedMovePast,AllowedMoveFuture,Priority,isFinished,siteId,siteDescription,unAvailabilityType,unAvailabilityDesc,isCanceled,FromOldPlanVersion,ManuelCreation"

 

 

EnableCustomAttributeEditing="True" StartInFullTime="False" AllowInsert="False"

 

 

EnableAdvancedForm="False" OnClientAppointmentEditing="AppointmentEditing"

 

 

OnClientAppointmentMoveEnd="OnClientAppointmentMovingEnd"

 

 

OnClientAppointmentMoving="OnClientAppointmentMoving"

 

 

OnClientAppointmentContextMenu="onAppointementContextMenu"

 

 

OnClientTimeSlotContextMenu="onTimeSlotContextMenu"

 

 

OnClientAppointmentResizeEnd="OnClientAppointmentResizeEnd"

 

 

OnClientAppointmentResizing="OnClientAppointmentResizing"

 

 

ShowAllDayRow="True" ShowFooter="True" Skin="Office2007"

 

 

EnableDatePicker="false"

 

 

 

meta:resourcekey="RadScheduler1Resource1" ShowFullTime="False" Height="503px" Culture="fr-CA">

 

 

 

</telerik:RadScheduler>

 

 

</div>

 

<

telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Width="140px" Height="100px" Position="BottomRight" Sticky="True" Text="Loading..."

 

 

ToolTipZoneID="scheduler" Skin="Office2007" ShowDelay="500"

 

 

meta:resourcekey="RadToolTipManager1Resource1" style="display: none; z-index:999">

 

 

 

 

</telerik:RadToolTipManager>

First time my calendar is displayed, this work good but when I navigate in sceduler, at bottom of this scheduler, It appears a div around Tooltipmanager. This div is visible and it is empty. This div is an TooltipmanagerPanel. I don't want to see this panel because display of my page is wrong

 

ericc34
Top achievements
Rank 1
 asked on 30 Oct 2008
4 answers
217 views
Hi, i need some help with the following scenario..

While prototyping we built the following RadPanel (with a dozen items, in this example there are just two items included), and this works perfect.

<telerik:RadPanelBar runat="server" ID="RadPanelBar1" Skin="Web20" Width="230px" 
        ExpandMode="SingleExpandedItem" ExpandAnimation-Type="InOutSine" ExpandAnimation-Duration="300"
        <Items> 
            <telerik:RadPanelItem Text="MYTITLE"
                <Items> 
                    <telerik:RadPanelItem> 
                        <ItemTemplate> 
                            <table border="0" cellpadding="0" cellspacing="0"
                                <tr> 
                                    <td> 
                                         
                                        <class="normal"
                                            MYTEXT BLABLA 
                                        </p> 
                                    </td> 
                                </tr> 
                            </table> 
                        </ItemTemplate> 
                    </telerik:RadPanelItem> 
                </Items> 
            </telerik:RadPanelItem> 
            <telerik:RadPanelItem Text="MYTITLE 2"
                <Items> 
                    <telerik:RadPanelItem> 
                        <ItemTemplate> 
                            <table border="0" cellpadding="0" cellspacing="0"
                                <tr> 
                                    <td> 
                                         
                                        <class="normal"
                                            MYTEXT 2 BLBABLABLA 
                                        </p> 
                                    </td> 
                                </tr> 
                            </table> 
                        </ItemTemplate> 
                    </telerik:RadPanelItem> 
                </Items> 
            </telerik:RadPanelItem> 
    </Items> 
    </telerik:RadPanelBar> 


But we have to create all the items dynamically.

Now this is my .aspx code:
    <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Skin="Web20" Width="230px" 
        ExpandMode="SingleExpandedItem" ExpandAnimation-Type="InOutSine" ExpandAnimation-Duration="300"
       <Items> 
        
       <telerik:RadPanelItem> 
         
        <ItemTemplate> 
                            <table border="0" cellpadding="0" cellspacing="0" width="230"
                                <tr> 
                                    <td> 
                                       
                                        <class="normal"
                                            <%# Container.DataItem("Text") %> 
                                        </p> 
                                    </td> 
                                </tr> 
                            </table> 
      </ItemTemplate> 
       </telerik:RadPanelItem> 
       </Items> 
 
    </telerik:RadPanelBar> 

and this the code-behind (dt contains all the needed fields):

 For Each row As DataRow In dt.Rows 
 
                Dim topItem As New RadPanelItem 
                topItem.Text = row.Item("Title").ToString.Substring(0, 10) 
                topItem.Expanded = False 
                RadPanelBar1.Items.Add(topItem) 
 
                Dim subItem As New RadPanelItem 
                subItem.Text = row.Item("Text").ToString 
                subItem.Expanded = False 
 
                topItem.Items.Add(subItem) 
 
            Next 

The result looks quite different. I would be very happy if you could help me with this one. I suppose i'm doing something wrong with the itemtemplate (?) ..

All the best
Tom


Simon
Telerik team
 answered on 30 Oct 2008
0 answers
150 views
Hi,
I have read the RadMenu sharepoint intergration guide, where the main menu controls are placed into the RadMenu, but is there a way of getting the radmenu to display a list of all the pages on the sharepoint site? Please could someone get back to me, as i am new to sharepoint and would really love some help.

Thanks

Simon
SimonAllport
Top achievements
Rank 1
 asked on 30 Oct 2008
1 answer
200 views
I have a file-upload page where I currently only allow image uploads. It's set up to allow the user to upload multiple images at once and includes a couple of text box fields for each image being uploaded.

I'd like to change it so that one of these extra fields is a drop-down list that describes the type of file being uploaded (image, movie, document) and then that file will be validated against a different set of extensions.

So for example the user could upload multiple files on one page. The first might be an image, the second a movie and the third a document and they would each need to be validated as a .jpg/.gif a .mov/.mpg and a .pdf/.doc respectively.

Is this doable?
Veselin Vasilev
Telerik team
 answered on 30 Oct 2008
2 answers
172 views
Hi folks ;
Iam facing a problem in saving files used to uplaod by RadUpload
everytime while saving alwayes get 0 files count although I attached files to it
can you help me discover where is the problem ...?

attached radUploader tags

<
telerik:RadUpload ID="RUAttach" runat="server" Skin="Web20" TargetFolder="Attachment"

 

 

Width="100%" />

 

 

 

&nbsp;<telerik:RadProgressManager ID="RadProgressManager1" runat="server" />

 

 

<telerik:RadProgressArea ID="RadProgressArea1" runat="server" DisplayCancelButton="True"

 

 

ProgressIndicators="TotalProgressBar, TotalProgress, RequestSize, FilesCountBar, FilesCount, SelectedFilesCount, CurrentFileName, TimeElapsed, TimeEstimated, TransferSpeed"

 

 

Skin="Web20">

 

 

</telerik:RadProgressArea>

and this is the method used to save attachments :

 

 

RadUploadContext uploadContext = RadUploadContext.Current;

 

 

foreach (UploadedFile file in RUAttach.UploadedFiles)

 

{

 

if (file != null)

 

{

file.SaveAs(Server.MapPath(

"~/MyFiles/" + file.GetName()));

 

}

}


the count files =0 in ( RUAttach.UploadedFiles)

thanks in advance
Mona

Veselin Vasilev
Telerik team
 answered on 30 Oct 2008
1 answer
108 views
Hi

When im scrolling to the right with Chrome or Safari (on Windows) it scrolls "too far" and can't scoll back. http://img395.imageshack.us/img395/6817/chromecb5.gif
In Safari on Mac OS X i can't scroll at all to the right... 
Is this a know problem and when is this issue to be fixed? Because it would be a nice feature to implement.

Thank you
Rosen
Telerik team
 answered on 30 Oct 2008
1 answer
71 views
HI,

I am converting a project to the latest Q2 version and have referenced the DLL correctly in my project.

I am hitting a problem wherein we are dynamically creating a RadEditor and then assigning it various properties. In this situation, certain properties are not available. Example -

        Dim EditorObj As New Telerik.Web.UI.RadEditor

In the asp.net AJAX documentation, you indicate that the editor can be assigned various image upload, etc. paths as shown below.

 RadEditor1.UploadImagesPaths = imagepath
 RadEditor1.ImagesPaths = imagepath
 RadEditor1.DeleteImagesPaths = imagepath

However, when I try this

 EditorObj.UploadImagePaths

that property is not available according to Intellisense. Is this a problem with Intellisense or am I not correctly traversing the object properties. Please let me know.
Rumen
Telerik team
 answered on 30 Oct 2008
2 answers
144 views
Hi,

Is it possible to update a label that is wrapped in a RadAjaxPanel with code behind?  I.e.:

ASP.NET:

<

telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="200px" width="300px"> <asp:Label ID="Connections" runat="server" Text="0"></asp:Label> </telerik:RadAjaxPanel>

C# code :

Connections.text = "100";

I can't get this to work unless I do a postback which is obviously not what I want.
I know this will probably work if I have a timer event and do it in that, but don't want to use one.

Any help is much appreciated.

Regards,
Steve


 

 

 

 

steve
Top achievements
Rank 1
 answered on 30 Oct 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?