Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
123 views
I've read the some posts about this. I've looked at 2 demos, the web mail one and the one under docs titled Search on key press/button click. In both of these examples a seperate search box was used.

What I want to do seems fairly straight forward and revolved around the way the filtering is implemented. Most search screens from google to most apps out there have a number of search fields to fill out, then you click a search button. Using the AutoPostBackOnFilter, then clicking enter works great, except for the autopostback. Users want to be able to fill out several fields, then hit search to find what they are looking for.

What I need to do is use the existing autogenerated filter fields, or templated fields. Then on the click of a search button filter on those fields. Additionally, I want to disable the functionality that will filter when you select a filter type.

Can anyone point me in the right direction? Is there a single javascript funciton exposed, like doFilter() that I can call when the user clicks a button?

Thank you!
Yavor
Telerik team
 answered on 26 Jun 2009
1 answer
107 views
hi telerik people!

I have the following code although im getting stuck in making the listview refresh using ajax from an event within a telerik popup window.

please provide some guidance, many many thanks,

the markup is below:


// javascript

            function myfunction() {

                var oManager = GetRadWindowManager();
                var oMailWnd = oManager.getWindowByName("mywindow");
                oMailWnd.SetUrl(filename);
                oMailWnd.show();
                oMailWnd.setActive(true);
                oMailWnd.center();

                return false;
            }


<asp:PlaceHolder ID="PlaceHolderExistingTracks" runat="server" Visible="true">
                
                
            <script language="javascript" type="text/javascript">
                    
                function Close() {
                    var masterTable = $find("<%= ListView1.ClientID %>").get_masterTableView();
                    masterTable.rebind();
                }
                  
            </script>
               
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>

    <telerik:RadWindowManager EnableEmbeddedSkins="true" ID="RadWindowManager1" VisibleStatusbar="false" runat="server" Skin="Default">
        <Windows>
          <telerik:RadWindow ID="mywindow" Modal="true" Title="xxx" VisibleStatusbar="false" Width="90px" Height="90px" runat="server">
            </telerik:RadWindow>


    <asp:ListView ID="ListView1" runat="server">
       <LayoutTemplate>
          <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
       </LayoutTemplate>

       <ItemTemplate>
          <div style="float: left; width: 200px;">
            <a href=""><%# Eval("test") %></a>
          </div>
          <div style="float: left; width: 200px;">
            <%# Eval("test2") %>
          </div>
          <div style="float: left; width: 200px;">
            <a href="javascript:void(0);" onclick="myfunction()" />open window</a>
          </div>
          <div style="clear:both"></div>
       </ItemTemplate>
    </asp:ListView>

</asp:PlaceHolder>


in my popup aspx file
===================


// javascript

 <script type="text/javascript">
        function CloseAndRebind(args)
        {
            GetRadWindow().Close();
            GetRadWindow().BrowserWindow.refreshGrid(args);
        }
     
        function GetRadWindow()
        {
         var oWindow = null;
         if (window.radWindow) oWindow = window.radWindow;
         else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
       
         return oWindow;
        }        
    </script>


markup for popup
==============

<asp:Button ID="ButtonConfirm" runat="server" Text="Confirm" resourcekey="ButtonConfirm" OnClick="ButtonConfirm_Click" />



code behind for popup
==============

not sure what I need here if anything
       

==============
Sebastian
Telerik team
 answered on 26 Jun 2009
2 answers
110 views
This is probably a stupid question but...

I have a set of Telerik (or simply ASP.Net) controls on a page.
In Visual Studio, I can assign a server side event by double clicking on the object in the Design mode view.

Now, because I want to lay all this out nicely, I organise all this within an ASP Table... and I don't seem to have access to the events of all controls within the table.

Everything seems fine if I use an HTML table instead.

Is that by design? Is it because the ASP Table grabs all the (click) events instead of the control inside?


Sorry if the question is a bit basic but this is not my main expertise...


Many thanks


Eric
Eric
Top achievements
Rank 1
 answered on 26 Jun 2009
2 answers
116 views
I have a page with several dynamically added RadEditors inside an ajax panel, which is inside a RadSplitter. When ever an Ajax request is complete, I resize the splitter so that the panes are equal height.

function resizeDashboardSplitter() { 
    var contentHeight = $('#cms-content-pane').height(); 
    var treeHeight = $('#cms-site-explorer').height(); 
    var newHeight; 
    newHeight = contentHeight > treeHeight ? contentHeight : treeHeight; 
    dashboardSplitter.set_height(newHeight + 15); 
} 
function dashboardSplitterLoaded(splitter, args) { 
    dashboardSplitter = splitter; 
    var prm = Sys.WebForms.PageRequestManager.getInstance(); 
    prm.add_endRequest(resizeDashboardSplitter); 
    resizeDashboardSplitter(); 
} 

The RadEditor loads before the resize, causing the content area to sometimes be squished if the page gets taller. (this is in firefox 3, ie8 seems to work fine.)

Screenshot: squished

If i call the RadEditor method _resizeContentArea from the console of Firebug, it seems to fix the issue. So I added the following javascript:
var radEditors = new Array(); 
function resizeRadEditors() { 
    for (i = 0; i < radEditors.length; i++) { 
        radEditors[i]._updateEditorSize(); 
        radEditors[i]._resizeContentArea(); 
 
    } 
} 
function onEditorLoaded(editor, args) { 
   addEditorStylesheet(editor, args); // not relevant 
   editor.add_modeChange(addEditorStylesheet); // not relevant 
   radEditors.push(editor); 
} 

However, this just made the RadEditor jump to 750px tall, even though it was set at 300px. Any suggestions on how I can fix it?

Thanks!


dlamprey
Top achievements
Rank 2
 answered on 26 Jun 2009
3 answers
111 views
Hi there,

We are using the Rad editor ..It works very nicely,My only concern is that when I click on Apply CSS it lists a long list of CSS.We do have a couple of web applications on this server and it gets the CSS from everywhere.Can I restrict the Apply CSS tab to get only the CSS from this current web application,or canI hide the CSS i don't need.

Any help would be much Appreciated .

Thanks in Advance
Arjita

Rumen
Telerik team
 answered on 26 Jun 2009
2 answers
110 views
We need to develop our own skin for the datepicker and the timepicker in the calendar control.  We need a css for the calender/pickers.  Where can I get a css for this component that includes the formats for the pickers?
Sebastian
Telerik team
 answered on 26 Jun 2009
0 answers
174 views
I have placed a RadComboBox on my page as following:

 

<radCb:RadComboBox ID="RadComboBox2" runat="server" 

SkinsPath="~/RadControls/ComboBox/Skins" Width="150px">   

 

</radCb:RadComboBox>

I have to populate some items (e.g. 2 countries) into this using javascript:
function populateMyRadComboBox(comboBox)
{
...
// what I want is:
// comboBox.Items.Clear();
// comboBox.Items.Add('UK');
// comboBox.Items.Add('US');
}

How can I do this using JavaScript?

Any help?

Pooya
Top achievements
Rank 1
 asked on 26 Jun 2009
2 answers
142 views
I used the codes written here for OnClientSelectedIndexChanged: http://www.telerik.com/help/aspnet-ajax/combo_clientsideonclientselectedindexchanged.html

The event is raised when an item selection is changed but the parameters are not passed.

eventArgs is null inside the function and sender just has Text and Value properties.

Any help is much appreciated.
Pooya
Top achievements
Rank 1
 answered on 26 Jun 2009
3 answers
136 views
not sure why but i added the form decorated to my master page. and it seems the controls dont get rendered correctly.
the only styling i am using is a cssclass that sets the width of the controls.
but even then some controls do and some do not.

are there any issues with have the radformdecorater on a master page and having it decorate on the controls in the content page as well as webusercontrols inside the content page.

i even have one page where some controls are decorated and others are not even though they have the same cssclass assigned and are the same type of controls.

thanks
Georgi Tunev
Telerik team
 answered on 26 Jun 2009
1 answer
96 views
I am generating a grid that contains hiearchical data.  The child detail table is being generated in the DetailTableDataBind event.  When the child table is displayed the columns twice.  I only want them to display once.  Any ideas?

 

protected void rgdTestPlan_DetailTableDataBind(object sender, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)

 

{

 

 

GridDataItem parentItem = e.DetailTableView.ParentItem as GridDataItem;

 

 

 

if (parentItem.Edit)

 

{

 

 

return;

 

}

 

 

GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;

 

 

 

if (e.DetailTableView.Name == "TestPlanList")

 

{

 

e.DetailTableView.DataSource = 'myDataTable'

 

 

 

}

}



ASPX

 

 

 

<telerik:RadGrid ID="rgdTestPlan" GridLines="None" Skin="Web20" AllowMultiRowSelection="false" AllowMultiRowEdit="false" runat="server"

 

 

 

AutoGenerateEditColumn="false" OnItemCreated="rgdTestPlan_ItemCreated" OnNeedDataSource="rgdTestPlan_NeedDataSource"

 

 

 

 

 

 

 

 

OnUpdateCommand="rgdTestPlan_OnUpdateCommand" on OnDetailTableDataBind="rgdTestPlan_DetailTableDataBind" OnCancelCommand="rgdTestPlan_OnCancelCommand" OnSortCommand="rgdTestPlan_OnSortCommand"

 

 

 

 

 

 

 

 

OnItemDataBound="rgdTestPlan_ItemDataBound"

 

 

 

 

 

 

 

 

ShowStatusBar="true" AllowPaging="true" >

 

 

 

 

 

 

 

 

<PagerStyle Mode="NextPrevNumericAndAdvanced" EnableSEOPaging="false"></PagerStyle>

 

 

 

 

 

 

 

 

<HeaderContextMenu EnableTheming="True"><CollapseAnimation Duration="200" Type="OutQuint" /></HeaderContextMenu>

 

 

 

 

 

 

 

 

<PagerStyle Mode="NextPrevNumericAndAdvanced" EnableSEOPaging="false"></PagerStyle>

 

 

 

 

 

 

 

 

<HeaderContextMenu EnableTheming="True"><CollapseAnimation Duration="200" Type="OutQuint" /></HeaderContextMenu>

 

 

 

 

 

 

 

 

<MasterTableView AutoGenerateColumns="False" EditMode="InPlace" Name="TestSpecList" AllowNaturalSort="false" DataKeyNames="MasterSpecId" CommandItemDisplay="None">

 

 

 

 

 

 

 

 

<DetailTables>

 

 

 

 

 

 

 

 

<telerik:GridTableView DataKeyNames="TestPlanId" Name="TestPlanList" Width="100%" runat="server">

 

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="/Img/Using/GridEdit.gif" UniqueName="EditCommandColumn"><ItemStyle CssClass="MyImageButton" /></telerik:GridEditCommandColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="TestPlanId" HeaderText="TestPlanId" SortExpression="TestPlanId" UniqueName="TestPlanId" Visible="false"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="PlatformMasterSpecId" HeaderText="PlatformMasterSpecId" SortExpression="PlatformMasterSpecId" UniqueName="PlatformMasterSpecId" Visible="false"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ContainerId" HeaderText="ContainerId" SortExpression="ContainerId" UniqueName="ContainerId" Visible="false"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ParamLimitId" HeaderText="ParamLimitId" SortExpression="ParamLimitId" UniqueName="ParamLimitId" Visible="false"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="TestJobId" HeaderText="TestJobId" SortExpression="TestJobId" UniqueName="TestJobId" Visible="false"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ContainerName" HeaderText="Container" SortExpression="ContainerName" UniqueName="ContainerName" Visible="true"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="PlanLevel" HeaderText="Plan Level" SortExpression="PlanLevel" UniqueName="PlanLevel" Visible="true"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Priority" HeaderText="Priority" SortExpression="Priority" UniqueName="Priority" Visible="true"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="ForwardTestPlanId" HeaderText="Symbol Feed Forward" SortExpression="ForwardTestPlanId" UniqueName="ForwardTestPlanId" Visible="true"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="TestPlanStatus" HeaderText="Test Plan Status" SortExpression="TestPlanStatus" UniqueName="TestPlanStatus" Visible="true"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="TestJobName" HeaderText="Test Job Name" SortExpression="TestJobName" UniqueName="TestJobName" Visible="true"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

<%

 

--<SortExpressions>

 

<telerik:GridSortExpression FieldName="PlanLevel"></telerik:GridSortExpression>

<telerik:GridSortExpression FieldName="ContainerName"></telerik:GridSortExpression>

</SortExpressions>--

 

 

%>

 

 

 

</telerik:GridTableView>

 

 

 

 

 

 

 

 

</DetailTables>

 

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

 

<telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="/Img/Using/GridEdit.gif" UniqueName="EditCommandColumn"><ItemStyle CssClass="MyImageButton" /></telerik:GridEditCommandColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="UniqueGridId" HeaderText="UniqueGridId" UniqueName="UniqueGridId" Visible="false"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="MasterSpecId" HeaderText="MasterSpecId" SortExpression="MasterSpecId" UniqueName="MasterSpecId" Visible="false"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="FuncBlock" HeaderText="Functional Block" SortExpression="FuncBlock" UniqueName="FuncBlock" Visible="true"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Param" HeaderText="Parameter" SortExpression="Param" UniqueName="Param" Visible="true"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Symbol" HeaderText="Symbol" SortExpression="Symbol" UniqueName="Symbol" Visible="true"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="Cond" HeaderText="Condition" SortExpression="Cond" UniqueName="Cond" Visible="true"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="TestType" HeaderText="TestType" SortExpression="Test Type" UniqueName="TestType" Visible="true"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

<telerik:GridDropDownColumn DataField="Priority" HeaderText="Priority" SortExpression="Priority" UniqueName="Priority" Visible="true"></telerik:GridDropDownColumn>

 

 

 

 

 

 

 

 

<telerik:GridDropDownColumn DataField="ForwardTestPlanId" HeaderText="Symbol Feed Forward" SortExpression="ForwardTestPlanId" UniqueName="ForwardTestPlanId" Visible="true"></telerik:GridDropDownColumn>

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

 

<EditFormSettings UserControlName="TestSpec_Entry.ascx" EditFormType="WebUserControl">

 

 

 

 

 

 

 

 

<EditColumn UniqueName="EditTestSpec"></EditColumn>

 

 

 

 

 

 

 

 

</EditFormSettings>

 

 

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

 

 

 

<clientsettings>

 

 

 

 

 

 

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="false"></Scrolling>

 

 

 

 

 

 

 

 

<selecting allowrowselect="True" />

 

 

 

 

 

 

 

 

</clientsettings>

 

 

 

 

 

 

 

 

<FilterMenu EnableTheming="True">

 

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

 

 

 

 

 

 

</FilterMenu>

 

 

 

 

 

 

 

 

</telerik:RadGrid>

 

 

Princy
Top achievements
Rank 2
 answered on 26 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?