Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
135 views
Hi, how do I get an item count for a treeview folder or node? I would like the item count to appear in parenthesis () next to the folder or node.

Thanks
Gary
Princy
Top achievements
Rank 2
 answered on 24 Jan 2012
4 answers
139 views
Hi,
m new user of telerik i want to change the behaviour of Scheduler Appointment Click. on appointment click i want to open a RadWindow having information of that appointment and the resource detail by joining other tables from database..
Plz reply me how to achive that behaviour by using C#
Shinu
Top achievements
Rank 2
 answered on 24 Jan 2012
1 answer
29 views
Is there a way to to use a GridButtonColumn to display an image with text across it?  For example, I might display an Employee's picture with their name (as text) across the picture.

Thanks,
Carl.
Shinu
Top achievements
Rank 2
 answered on 24 Jan 2012
1 answer
66 views
Hello,

I have a issue I am using multi uploader and its work fine in all browsers but there is a problem its not showing progress bar in IE8 while it showing in chrome.

could you please give me some hints for this.

Princy
Top achievements
Rank 2
 answered on 24 Jan 2012
5 answers
158 views
I have a page with agreement control, from that page I open a RadWindow with control to create or edit tenant details.
Tenant control contain antoher RadWindow to edit adress details (as on attahed picture)
How can I make RadWindow with address control to be above the tenant control?
piotre6
Top achievements
Rank 1
 answered on 23 Jan 2012
1 answer
416 views
I have a RadButton with ButtonType=ToggleButton and ToggleType=CheckBox with an associated OnCheckedChanged callback.  My problem is that the callback only fires on the 1st, 4th, 7th, etc. time I click the checkbox.  I would like the callback to fire every time I toggle the check box.  Does anyone know why the callback does not fire every time the checkbox is toggled?  

Note: If I change focus after toggling the checkbox by clicking on another server control, the callback does fire the next time I toggle it even if it's just the 2nd time I toggle it.

Here's my aspx code:
<asp:UpdatePanel ID="UpdatePanel_System" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true" EnableViewState="True">
  <div>
    <telerik:RadButton ID="displaySystemAnnouncementsCB" runat="server" Text="Display system announcements to all users at the top of the page"
        ToggleType="CheckBox" OnCheckedChanged="displaySystemAnnouncementsCBCB" ButtonType="ToggleButton">
    </telerik:RadButton>
  </div>
</asp:UpdatePanel>


Here's my callback function:
protected void displaySystemAnnouncementsCBCB(object sender, EventArgs e)
{
    RadButton rb = (RadButton)sender;
    if (rb.Checked)
    {
        configuration.AppSettings.Settings["displaySystemAnnouncements"].Value = "1";
    }
    else
    {
        configuration.AppSettings.Settings["displaySystemAnnouncements"].Value = "0";
    }
    configuration.Save();
}
Mike
Top achievements
Rank 1
 answered on 23 Jan 2012
0 answers
133 views
I have a RadListView that has a detail table.  To see it you click the expand/collapse button.  My question is what is the code to expand or collapse them all with one click.  I tried copying the expamples for TreeVeiws but it did not work.

Thank you for your help.
David Copp
Top achievements
Rank 1
 asked on 23 Jan 2012
0 answers
86 views
Hi,

I am able to bind boolean columns as a checkbox column and were able to use client template for ajax binding. everything over UI is working terrific

But, I am facing a problem in binding model again and following things in telerik mvc2 grid

1. I am unable to bind checkbox columns with model when I am posting whole form back to controller
2. Checkbox's Id has not been sorted on sorting or being filtered. checkbox id remains same ( I mean if checkbox id is chkrow1 then on filtering or on sorting first row checkbox id will always be chkrow1 only)

Request you to please provide me sample code with checkbox column and saving it to database again.

I really appreciate your help

Yogesh
Top achievements
Rank 1
 asked on 23 Jan 2012
1 answer
118 views
Hello Telerik,

I have the following in my .ASPX:

<telerik:RadSplitter ID="table_splitter" runat="server" Width="100%" Orientation="Horizontal">
    <telerik:RadPane ID="row1_pane" runat="server" OnClientResizing="OnClientRowResizing">
        <telerik:RadSplitter ID="row1_column_splitter" runat="server" Width="100%" Orientation="Vertical">
            <telerik:RadPane ID="row1_col1_pane" runat="server" OnClientResizing="OnClientColResizing">row1_col1_pane
            </telerik:RadPane>
            <telerik:RadSplitBar ID="row1_col1_splitbar" runat="server"></telerik:RadSplitBar>
            <telerik:RadPane ID="row1_col2_pane" runat="server" OnClientResizing="OnClientColResizing">row1_col2_pane
            </telerik:RadPane>
            <telerik:RadSplitBar ID="row1_col2_splitbar" runat="server"></telerik:RadSplitBar>
            <telerik:RadPane ID="row1_col3_pane" runat="server" OnClientResizing="OnClientColResizing">row1_col3_pane
            </telerik:RadPane>
        </telerik:RadSplitter>
    </telerik:RadPane>
    <telerik:RadSplitBar ID="row1_splitbar" runat="server"></telerik:RadSplitBar>
    <telerik:RadPane ID="row2_pane" runat="server" OnClientResizing="OnClientRowResizing">
        <telerik:RadSplitter ID="row2_column_splitter" runat="server" Width="100%" Orientation="Vertical">
            <telerik:RadPane ID="row2_col1_pane" runat="server" OnClientResizing="OnClientColResizing">row2_col1_pane
            </telerik:RadPane>
            <telerik:RadSplitBar ID="row2_col1_splitbar" runat="server"></telerik:RadSplitBar>
            <telerik:RadPane ID="row2_col2_pane" runat="server" OnClientResizing="OnClientColResizing">row2_col2_pane
            </telerik:RadPane>
            <telerik:RadSplitBar ID="row2_col2_splitbar" runat="server"></telerik:RadSplitBar>
            <telerik:RadPane ID="row2_col3_pane" runat="server" OnClientResizing="OnClientColResizing">row2_col3_pane
            </telerik:RadPane>
        </telerik:RadSplitter>
    </telerik:RadPane>
    <telerik:RadSplitBar ID="row2_splitbar" runat="server"></telerik:RadSplitBar>
    <telerik:RadPane ID="row3_pane" runat="server" OnClientResizing="OnClientRowResizing">
        <telerik:RadSplitter ID="row3_column_splitter" runat="server" Width="100%" Orientation="Vertical">
            <telerik:RadPane ID="row3_col1_pane" runat="server" OnClientResizing="OnClientColResizing">row3_col1_pane
            </telerik:RadPane>
            <telerik:RadSplitBar ID="row3_col1_splitbar" runat="server"></telerik:RadSplitBar>
            <telerik:RadPane ID="row3_col2_pane" runat="server" OnClientResizing="OnClientColResizing">row3_col2_pane
            </telerik:RadPane>
            <telerik:RadSplitBar ID="row3_col2_splitbar" runat="server"></telerik:RadSplitBar>
            <telerik:RadPane ID="row3_col3_pane" runat="server" OnClientResizing="OnClientColResizing">row3_col3_pane
            </telerik:RadPane>
        </telerik:RadSplitter>
    </telerik:RadPane>
</telerik:RadSplitter>

And here is my client Javascript:

function OnClientRowResizing(splitter, args) {
    var id = splitter._element.id;
    var rowstr = id.substr(id.search("_row"), id.search("_pane") - id.search("_row"));
    var row = rowstr.replace("_row", "");
    // let's get the row splitters
    for (i = 1; i <= 3; i++) {
        if (i == row) {
            var rowSplitter = $find("ctl00_MainContent_ctlSplitterPanes_row" + i + "_column_splitter");
            if (rowSplitter != null) {
                for (j = 0; j <= rowSplitter.getPanes().length - 1; j++) {
                    var pane = rowSplitter.getPanes()[j]
                    pane.set_height(pane.get_height() + args._delta);
                    pane.set_content("row" + i + "_col" + (j + 1) + "_pane> height: " + pane.get_height() + " width: " + pane.get_width());
                }
            }
        }
    }
}
function OnClientColResizing(splitter, args) {
    var id = splitter._element.id;
    var rowstr = id.substr(id.search("_row"), id.search("_col") - id.search("_row"));
    var row = rowstr.replace("_row", "");
    var colstr = id.substr(id.search("_col"), id.search("_pane") - id.search("_col"));
    var col = colstr.replace("_col", "");
    // let's get the row splitters
    for (i = 1; i <= 3; i++) {
        var rowSplitter = $find("ctl00_MainContent_ctlSplitterPanes_row" + i + "_column_splitter");
        if (rowSplitter != null) {
            for (j = 0; j <= rowSplitter.getPanes().length - 1; j++) {
                if (j==col-1) {
                    var pane = rowSplitter.getPanes()[j]
                    pane.set_width(pane.get_width() + args._delta);
                    pane.set_content("row" + i + "_col" + (j+1) + "_pane> height: " + pane.get_height() + " width: " + pane.get_width());
                }
            }
        }
    }
}

See the attachment for the initial output.

What I'm trying to achieve here is: when I resize the width of any pane of any column in any row, I want to resize the panes in the same column in the other rows as well.

Using the client script I have come up with (OnClientColResizing), I am actually able to do just that. However, my problem is that, the width of the panes that are in the affected columns in the row where I'm triggering the resizing from, is ALWAYS not the same as the width of the panes in the corresponding columns of the other rows, even though it's width is the basis for changing the other panes' widths.

I don't seem to have any problem using OnClientRowResizing to sychronize the heights of all panes when I'm resizing any row.

Kindly look into my code and see if I've missed anything. Any suggestions in improving my code will be most appreciated too!

Best regards.

Virgil
Dobromir
Telerik team
 answered on 23 Jan 2012
2 answers
174 views
I am trying to get a Split Button with a context menu working inside the EditItemTemplate of a Grid. I want it to show the context menu and not postback on the "dropdown arrow" split button click, and postback on the main button click. I can get this working when its outside of the grid, but once I put it in EditItemTemplate of the Grid, it always does a postback, even when I click the split-button arrow (but the context menu still shows, so I know it hits the proper javascript) and the Click event's IsSplitButtonClick is always false. The button I am referring to is _btnFile in the following code.

<telerik:RadGrid ID="_rgRevisions" runat="server" Skin="Office2007" Width="410px" AllowFilteringByColumn="false" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="center" FilterItemStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="center" AlternatingItemStyle-HorizontalAlign="center" OnPreRender="_rgRevisions_PreRender" OnNeedDataSource="_rgRevisions_NeedDataSource" OnItemCommand="_rgRevisions_ItemCommand" OnItemDataBound="_rgRevisions_ItemDataBound" OnItemCreated="_rgRevisions_ItemCreated" OnUpdateCommand="_rgRevisions_UpdateCommand">
                <ClientSettings>
                    <Scrolling AllowScroll="True" ScrollHeight="200px" UseStaticHeaders="true" />
                </ClientSettings>
                <MasterTableView EditMode="InPlace" AutoGenerateColumns="false" DataKeyNames="Id">
                    <Columns>
                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"
                            HeaderStyle-Width="30px" UpdateImageUrl="../../Icons/accept.png" EditImageUrl="../../Icons/EditViewDetails.png" CancelImageUrl="../../Icons/cancel.png" />
                        <telerik:GridBoundColumn DataField="linkedDocument" UniqueName="linkedDocument" HeaderText="Document" HeaderStyle-Width="70px" />
                        <telerik:GridTemplateColumn DataField="FileID" UniqueName="modifiedDoc" HeaderText="Modified Doc"
                            HeaderStyle-Width="90px" AllowFiltering="false" >
                            <ItemTemplate>
                                <asp:ImageButton ID="_btnModDocument" runat="server" ImageUrl="~/Theme/Img/A2bIcons/PDF.png" Visible='<%# Eval("FileID") != null && ((int)Eval("FileID")) != 0 ? true : false %>' CommandArgument='<%# Eval("FileID") %>' CommandName="DownloadModDocument" />
                            </ItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadButton ID="_btnFile" runat="server" EnableEmbeddedSkins="true"
                                    Skin="Office2007" Text='<%# Eval("fileName") %>'
                                                     CssClass="noWrapEllBtn" ButtonType="LinkButton"
                                                     EnableSplitButton="true" Width="140px"
                                                     Visible='<%# Eval("FileID") != null && ((int)Eval("FileID")) != 0 ? true : false %>'
                                                     CommandArgument='<%# Eval("FileID") %>' OnClick="_btnFile_Click"
                                                     OnClientClicked="OnUpdateModFileClicked">
                                    <Icon PrimaryIconUrl="~/Icons/PDF.png" />
                                </telerik:RadButton>
                                <telerik:RadContextMenu ID="_cmFile" runat="server" OnItemClick="_cmFile_ItemClick"
                                    EnableShadows="true">
                                    <Items>
                                        <telerik:RadMenuItem Text="Remove" Value="Remove" ImageUrl="../../Icons/Delete.gif" />
                                    </Items>
                                </telerik:RadContextMenu>
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>

function OnUpdateModFileClicked(sender, args) {
               if (args.IsSplitButtonClick()) {
                   var currentLocation = $telerik.getLocation(sender.get_element());
                   var menuID = $(sender.get_element()).siblings("div")[0].id;
                   var contextMenu = $telerik.findMenu(menuID);
                   contextMenu.showAt(currentLocation.x, currentLocation.y + 22);
                   sender.set_autoPostBack(false);
               }
               else {
                   sender.set_autoPostBack(true);
               }
           }

protected void _btnFile_Click(object sender, EventArgs e)
        {
            if (sender == null) throw new ArgumentNullException("sender");
            if (e == null) throw new ArgumentNullException("e");
            if (((ButtonClickEventArgs)e).IsSplitButtonClick) return;
 
            int fileId;
            int.TryParse(((RadButton)sender).CommandArgument, out fileId);
            if (fileId > 0)
            
               // Download File
            }
        }
Stephen
Top achievements
Rank 1
 answered on 23 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?