Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
3.5K+ views
I am trying to figure out the best way to do replicate with the RadButton something I do with regular ASP.NET buttons. Basically I have a client script in my master page like this where a function takes a parameter to do some validation dynamically based on conditions. Its in the master page so I can have it centralized to one location for all my pages.

function Master_PerformFullPostBackWaitScreen(ValidationGroup) {
    var valid = true;
      
    if (Master_ByPassPostBackWaitScreen) {
        Master_ByPassPostBackWaitScreen = false;
        return;
    }
    var rwMasterPage_FullScreenWaitWindow = $find('<%=rwMasterPage_FullScreenWaitWindow.ClientID %>');
    if (ValidationGroup != null) {
        Page_ClientValidate(ValidationGroup);
        valid = Page_IsValid;
    }
      
    if ((rwMasterPage_FullScreenWaitWindow != null) && (valid)) rwMasterPage_FullScreenWaitWindow.show();
}

Here is my normal button code.

<telerik:Button ID="btnCustomerProfile_AccountInformationSave" runat="server" 
    Text="Save" 
    onclick="btnCustomerProfile_AccountInformationSave_Click"
    ValidationGroup="vgAccountInformation"  Visible="false"
    OnClientClick="Master_PerformFullPostBackWaitScreen('vgAccountInformation')" />

So the button passes to my function the validation group it should run before it tries to show a Rad Window that covers the entire screen modally to prevent users from clicking anything while the page process. The problem I have with the RadButton is that the OnClientClicked does not allow me to put the call in with parameters. So I thought well my solution might be that on the client side I read the source button's validation group. However, there is not clientside function for this. This best I have is to use the command argument like this.

<telerik:RadButton ID="btnCustomerProfile_AccountInformationSave" runat="server" 
    Text="Save" 
    onclick="btnCustomerProfile_AccountInformationSave_Click"
    ValidationGroup="vgAccountInformation"  
    Visible="false"
    OnClientClicked="Master_PerformFullPostBackWaitScreen_RadButton"
    CommandName="Save"
    CommandArgument="vgAccountInformation"
    Icon-PrimaryIconUrl="../images/icons/save16x16.gif"  />

Then to do a client side script like this.

function Master_PerformFullPostBackWaitScreen_RadButton(sender, eventArgs) {
    Master_PerformFullPostBackWaitScreen(sender.get_commandArgument())
}

Of course now if I run into a situation where I actually need to use the command argument on the server side I am in trouble. I ran into a similar problem where I needed a rad button to pass several parameters to a script, but again I had to use the command argument with a delimited string. It seems either the OnClientClicked needs to work more like the normal button OnClick or there needs to be some property to read parameters for the script or even expose things like the validation group property or so on.






Keith
Top achievements
Rank 1
 answered on 16 Dec 2016
5 answers
167 views

In the RadFileExplorer I am trying to figure out how to hide the subfolders.

currently I have this which is filter and only showing the file types I want to show.

I have tried to send an empty Array into the Directories but it is still shwing all the sub folders.

public class ExtendedFileProvider : FileSystemContentProvider
        {
            //constructor must be present when overriding a base content provider class
            //you can leave it empty
            public ExtendedFileProvider(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl, string selectedItemTag)
                : base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)
            {
            }
            public override DirectoryItem ResolveDirectory(string path)
            {
                //get the directory information
                DirectoryItem baseDirectory = base.ResolveDirectory(path);
                //remove files that we do not want to see
                List<FileItem> files = new List<FileItem>();
                foreach (FileItem file in baseDirectory.Files)
                {
                    if (file.Name.Contains(".pdf") || file.Name.Contains(".doc") || file.Name.Contains(".docx") || file.Name.Contains(".zip"))
                    {
                        files.Add(file);
                    }
                }
                List<DirectoryItem> dirs = new List<DirectoryItem>();
                dirs.Clear();       
 
                DirectoryItem newDirectory = new DirectoryItem(baseDirectory.Name, baseDirectory.Location, baseDirectory.FullPath, baseDirectory.Tag, baseDirectory.Permissions, files.ToArray(),dirs.ToArray());
                //return the updated directory information
                return newDirectory;
            }
        }
Vessy
Telerik team
 answered on 16 Dec 2016
2 answers
182 views

I need to disable highlight of menu on mouseover. Enable="false" works, but make my image pale

<telerik:RadMenuItem ImageUrl="graphics/Users.png" enabled="false"
                                          tooltip="User Resources"
                                          style="margin-left:318px;"
                                          onmouseover="showMenu(event)"/>

Any recommendation?
David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 16 Dec 2016
3 answers
121 views

Hi Folks,

is it possible to allow only specific shape types to be resizable, i.e. rectangles can be resized, but circles not?

Best regards,
Hans

Vessy
Telerik team
 answered on 16 Dec 2016
2 answers
182 views

hi, we are facing the following issue because of using a RAD SPLITTER.

Check the attachment for the screen shot. you can see a highlighted green border with yellow shade. That part is placed as a rad-splitter like below in a master page.

telerik:RadSplitter ID="RadSplitter1" runat="server" BorderSize="0" CssClass="radsp">
<telerik:RadPane ID="RadPane1" Scrolling="Y" runat="server" ContentUrl="Dashboard.aspx" Height="100%" </telerik:RadPane>
</telerik:RadSplitter>

Using java script we are changing the contentUrl.

The purpose of using radsplitter is :
- To Avoid whole page refresh. the left pane and the top pane will stay and will not refresh every time.
- To hide the each page url.

Here is the issues that we are facing,
- Since telerik splitter renders as a iframe in run time, we are not able to make the UI responsive.
- When we zoom in or out we need to give a whole page refresh to see the whole page ( the bottom part is getting hidden.)
- And Many more...

Is there any other option to achieve this 2 points, without splitter?
- To Avoid whole page refresh. the left pane and the top pane will stay and will not refresh every time.
- To hide the each page url.

How can we have a call with telerik team about this issue and some more to be discussed. How to have a call over phone/Skype with telerik team?

 

Thanks

 

Vessy
Telerik team
 answered on 16 Dec 2016
0 answers
191 views

The column width on the Telerik Grid have plagued me for some time now. I could never set the width of the column inline for some reason.

This evening I have finally figured out what is causing my issue, and I wanted to share just in case anyone else was having this problem.

Let us take the following Grid for example;

<telerik:RadGrid ID="PersonListingRadGrid" runat="server" Height="500px" Width="500px" DataSourceID="ThisDataSource">
    <ClientSettings>                                               
        <Scrolling AllowScroll="true" ScrollHeight="552px" UseStaticHeaders="true"/>                                           
    </ClientSettings>
    <MasterTableView DataKeyNames="ID" DataSourceID="ThisDataSource" AutoGenerateColumns="False">
        <Columns>
            <telerik:GridBoundColumn DataField="ID" ReadOnly="True" HeaderText="ID" SortExpression="ID" UniqueName="ID" DataType="System.Guid" FilterControlAltText="Filter ID column" Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="DisplayName" HeaderText="DisplayName" SortExpression="DisplayName" UniqueName="DisplayName" FilterControlAltText="Filter ID column">
                <HeaderStyle Width="75%" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="BirthDate" HeaderText="BirthDate" SortExpression="BirthDate" UniqueName="BirthDate" DataType="System.DateTime" FilterControlAltText="Filter BirthDate column">
                <HeaderStyle Width="25%" />
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

 

Notice that the first column(ID) is set to Display="false", the second and third columns both have widths, 75% and 25% respectively. If you were to run the application with the Grid the way it is, the column widths that you desire will not display correctly. When the page loads your grid will display your two columns but the problem is, your DisplayName column will be the wrong width.

The reason?

If you have to use a column in your grid, but you do not want it to display; you HAVE to put that column BENEATH the columns you wish to display. What I noticed was, in my mastertableview column stack, I had two hidden columns above the rest of my columns. The third column in the stack was the first column I styled, but for some reason it wasn't styled when I ran the application. When it displayed, my desired column was not styled but the third column was!

The columns are indexed based, and if you have set a column's display to false then they are not counted in the index. So you may have styled your third column in the markup, but when it was time to compile, the index of that column changed. The index of the styling however did not.

Andrew
Top achievements
Rank 1
 asked on 15 Dec 2016
2 answers
177 views

Hello,

I've looked through the forums with no luck for the specifics required.

I have the need to select the current row of the grid where the cell is being edited.  When using a mouse click, the desired row is selected. However, when using the Tab Key (or arrow keys), the row is not selected.  I have tried finding the proper event that has a rowindex type argument to use to select the current row, but have failed so far.

Note:  This is for a grid in Batch Edit mode, so I need to do this solely on the Client side.

Thanks in advance,

g.

Jeff
Top achievements
Rank 1
 answered on 15 Dec 2016
4 answers
156 views

One of our users pointed out the vertical scroll bar in the top half of the RadSplitter displays but is greyed out.  If the splitter is collapsed forwards and then moved back, the scroll bar becomes enabled.  This issue occurs only in Chrome.  The scroll bar appears enabled as expected in Firefox, Opera, and Safari. 

I've attached screenshots for all the browsers mentioned above.  The related code is below; I stripped out the content in the table elements since it's not relevant to the issue.  The RadPane with the ID "radpane_preview" is where the vertical scroll bar isn't working correctly.

<telerik:RadPane ID="radpane_comments_preview" runat="server" Scrolling="None" Height="355px">
    <telerik:RadSplitter ID="radsplitter_comments_preview" runat="server" Skin="Office2010Silver"
        Height="355px">
        <telerik:RadPane ID="radpane_comments" runat="server" Scrolling="None" Width="410px">
            <table class="item_meta_table"></table>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="radsplitbar_comments_preview" runat="server" CollapseMode="Forward" />
        <telerik:RadPane ID="radpane_preview" runat="server" >
            <TheXXX:TheItemPreview ID="TheItemPreview" runat="server" Scrolling="Y"/>
        </telerik:RadPane>
    </telerik:RadSplitter>
</telerik:RadPane>
<telerik:RadSplitBar ID="radsplitbar_top_bottom" runat="server" CollapseMode="Forward" />
<telerik:RadPane ID="radpane_bottom" runat="server" Scrolling="None">
    <telerik:RadSplitter ID="radsplitter_bottom" runat="server" Skin="Office2010Silver">
        <telerik:RadPane ID="radpane_meta" runat="server" Width="410px">
            <TheXXX:TheItemMeta ID="TheItemMeta" runat="server" />
        </telerik:RadPane>
        <telerik:RadSplitBar ID="radsplitbar_meta_content" runat="server" CollapseMode="Forward" />
        <telerik:RadPane ID="radpane_content" runat="server" Scrolling="Y">
            <table class="xxxTable"></table>
            <asp:PlaceHolder ID="contentPlaceholder" runat="server" />
        </telerik:RadPane>
    </telerik:RadSplitter>
</telerik:RadPane>

 

Any thoughts as to why this happens in Chrome?

Thanks!

Vessy
Telerik team
 answered on 15 Dec 2016
36 answers
816 views

I am using 3 frozen columns in my grid. And then there are other columns that are dynamically added to the grid.
A horizontal scroll appears when the columns exceeds the maximum width. Till now it works great.
Now if I scroll the horizontal scroll to extreme right and resize my browser window, the horizontal scroll disappears making the the initial non frozen columns inaccessible.
This issue does not occur when forzen columns is removed.

Here is my grid's markup:

<telerik:radgrid id="pptGrid" runat="server" height="450px" Width="1024px" CssClass="pptGrid" OnItemDataBound="pptGrid_ItemDataBound" AutoGenerateColumns="false">
    <HeaderStyle CssClass="centeredTableHeader"></HeaderStyle>
    <ItemStyle CssClass="pptGridItem"></ItemStyle>
    <AlternatingItemStyle CssClass="pptGridItem"></AlternatingItemStyle>
    <ClientSettings Scrolling-AllowScroll="True">
        <Resizing AllowColumnResize="False" EnableRealTimeResize="false" ClipCellContentOnResize="false">
        </Resizing>
        <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" FrozenColumnsCount="3" EnableVirtualScrollPaging="true">
        </Scrolling>
        <ClientEvents OnGridCreated="scrollDiv" />
    </ClientSettings>
      
    <MasterTableView autogeneratecolumns="false" TableLayout="fixed">
        <Columns>      
                
        </Columns>
    </MasterTableView>
    <HeaderContextMenu EnableAutoScroll="True">
    </HeaderContextMenu>
</telerik:radgrid>

Is there any additional property setting I need to use? Please suggest ?
Alfonso
Top achievements
Rank 1
 answered on 15 Dec 2016
1 answer
66 views

Hi

 

i have a problem with the RadCalendar:

when it is initially opened from a mobile device in portrait mode, it shows ok.

when it is initially opened from a mobile device in landscape mode, it shows ok

however, if it is opened in portrait mode and then orientation changes to landscape, the calendar stays in portrait and is shown on its side.

the same happens if we start at landscape and change to portrait.

 

I've tried hiding the calendar on orientation change event, but after reopening it is still showing sideways.

 

you can see in the attached file the result.

 

any ideas how to fix, or how to reset the orientation ?

 

thanks,

 

snir

 

Vasil
Telerik team
 answered on 15 Dec 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?