Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
260 views
I needed to be able to trim leading & trailing spaces that may have been inadvertently entered by the user as part of their search criteria. I tried to find documentation on this to no avail. If there's a better way to do it, please let me know. 

Until then, this is what I did...
I used a separate button to execute the search. The onclick of that button fires this method:

   protected void FilterData(object sender, EventArgs e)
    {
        LoopThruFilterControls(rfPortfolios.Controls);
        rfPortfolios.FireApplyCommand();
    }



And LoopThruFilterControls looks like this:
    private void LoopThruFilterControls(ControlCollection cc)
     {
        for (int i = 0; i < cc.Count; i++)
        {
string controlType = cc[i].GetType().Name;
if(controlType.Equals("TextBox", StringComparison.CurrentCultureIgnoreCase))
{
TextBox tmp = (TextBox)cc[i];
                ((TextBox)cc[i]).Text = tmp.Text.Trim();
                }
                LoopThruFilterControls(cc[i].Controls);
        }
    }
Princy
Top achievements
Rank 2
 answered on 24 Jan 2012
1 answer
160 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
152 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
41 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
84 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
174 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
458 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
156 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
96 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
137 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?