Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
80 views
I'm implementing client-side databinding on a grid.
On the page's initial load the grid is automatically binded on client-side although the user should specify some data first.
So, with javascript, is there a way to rebind the grid only when rebind() is manually called? For example rebind is automatically triggered when filter() is called. 

Thanks
Nikolay Rusev
Telerik team
 answered on 29 Nov 2010
1 answer
124 views
OnFilterMenuShowing event of RadGird sets "Left" css style as "this.Control.style.left=e.clientX+document.documentElement.scrollLeft+document.body.scrollLeft+5+"px";"
This will make the filter menu appear next to the current mouse pointer. We are in need of showing the filter menu before the current mouse pointer. Please suggest us how can we override "this.Control.style.left " property.

Attached a rad grid page with filter options enabled in grid header. If the user clicks on the right most filter menu the page is going out of scope. We where tring to show this filter menu before the mouse pointer. Is there a way to do that? Kindly help.

filtermenu_outofscope.jpg 
Veli
Telerik team
 answered on 29 Nov 2010
1 answer
122 views
Hi Folks,

In Editor we use a Custom File Dialogs Content Provider for the ImageManager.
Now, we try to show a certain directory when opening the ImageManager.

We set the SelectedUrl to some path but it has no influence.
We managed somehow to show the correct files in the right hand panel but on the left hand side always the first folder is selected.

We tried already this:
http://www.telerik.com/support/kb/aspnet-ajax/editor/select-an-image-or-folder-when-imagemanager-is-first-shown.aspx

It doesnt work either, i think because of the Custom Content Provider.

What else can we try?


Thanks a lot
Regards
Felix
Dobromir
Telerik team
 answered on 29 Nov 2010
2 answers
46 views
I have remove the below Script:

<%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" TagName="Header" Src="~/Common/Header.ascx" %>
<%@ Register TagPrefix="telerik" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
<%@ Register TagPrefix="telerik" TagName="Footer" Src="~/Common/Footer.ascx" %>
<%@ Register TagPrefix="sds" Namespace="Telerik.Web.SessionDS" %>

then, when I added these functions (as title), it has an error at the run time. the error occur when I do the action both Drag To Group, Filtering, go to Second page of Grid. it said:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

But, it is work if I select row, resize the column width and my other function in my web, so I can confirm that is only error occur when Drag To Group, Filtering, go to Second page of Grid.

Tsvetina
Telerik team
 answered on 29 Nov 2010
3 answers
219 views
Hi,

I have seen the answer follow path: http://www.telerik.com/community/forums/aspnet-ajax/grid/total-record-count-after-filter.aspx but i can not fix this error. My scario is below:

1. ASPX Page:
             <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="radGridControl">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="radGridControl" LoadingPanelID="RadAjaxLoadingPanel1"/>
                        </UpdatedControls>
                     </telerik:AjaxSetting>
                 </AjaxSettings>
            </telerik:RadAjaxManager>
            
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="50px" Width="75px" Transparency="25" >
                <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border:0;" />
            </telerik:RadAjaxLoadingPanel>
            
                <telerik:RadFilter runat="server" ID="radFilter" OnApplyExpressions="radFilter_SearchGridData" CssClass="hoanguyen-GridStyleRow">
                   <FieldEditors>
                        <telerik:RadFilterTextFieldEditor DisplayName = "Languge Code" FieldName="LangugeCode" TextBoxWidth="120" />
                        <telerik:RadFilterTextFieldEditor DisplayName = "Languge Name" FieldName="LangugeName" TextBoxWidth="120" />
                   </FieldEditors>                                   
                </telerik:RadFilter>              
            </div>           
            </td>
        </tr>
        <tr>
            <td >            
            <telerik:RadGrid  
            Width="99.8%" ID="radGridControl"
            runat="server"
            AutoGenerateColumns="False"
            AllowSorting="true"
            AllowPaging="True"  
            AllowCustomPaging="true"
            AllowMultiRowSelection="True"  
            CellPadding="0" PageSize="10"  
            VirtualItemCount="100000"
            OnNeedDataSource="radGridControl_NeedDataSource"
            AllowFilteringByColumn="true"
            OnPreRender ="radGridControl_PreRender"
            >
            <PagerStyle Mode="NumericPages" CssClass = "hoanguyen-GridStyleRow"  />  
            <MasterTableView IsFilterItemExpanded="false" Font-Bold="False" TableLayout="Fixed">
                <Columns>
                <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkItem" runat="server" />
                    </ItemTemplate>
                    <HeaderTemplate>
                        <asp:CheckBox ID="headerChkbox" runat="server" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" />                      
                    </HeaderTemplate>
                </telerik:GridTemplateColumn>                   
                <telerik:GridBoundColumn DataField="LanguageCode" HeaderText="Language Code" UniqueName="colLanguageCode">
                    <ItemStyle CssClass="hoanguyen-GridStyleRow"  />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="LanguageName" HeaderText="Language Name" UniqueName="colLanguageName">
                    <ItemStyle CssClass="hoanguyen-GridStyleRow"  />
                </telerik:GridBoundColumn>
             
                </Columns>
            </MasterTableView>
            <ClientSettings  EnableRowHoverStyle="True">
                <Selecting AllowRowSelect="True" />
                <ClientEvents  OnRowSelected="RowSelected" />
                <Scrolling
                            AllowScroll="True"
                            ScrollHeight="320"  
                            EnableVirtualScrollPaging="True"
                            UseStaticHeaders="True" />
            </ClientSettings>
            <AlternatingItemStyle    Height="20px" />
            <ItemStyle  Height="20px"  />
            <HeaderStyle Height="20px"  CssClass="hoanguyen-GridStyleRow" Font-Bold="True"  />
            </telerik:RadGrid>
2. Code-behid:
    protected void radGridControl_PreRender(object sender, EventArgs e)
    {
        if (check)
        {
            radGridControl.AllowPaging = false;
            radGridControl.Rebind();
           
            int intRecordCount = radGridControl.MasterTableView.Items.Count;
            radGridControl.AllowPaging = true;
            radGridControl.AllowCustomPaging = true;
            radGridControl.Rebind();
        }
    }

    protected void radFilter_SearchGridData(object sender, RadFilterApplyExpressionsEventArgs e)
    {
        RadFilterSqlQueryProvider provider = new RadFilterSqlQueryProvider();
        provider.ProcessGroup(e.ExpressionRoot);
        radGridControl.MasterTableView.FilterExpression = provider.Result;
        radGridControl.Rebind();

        check = true;
    }
Note: "int intRecordCount = radGridControl.MasterTableView.Items.Count;" line is still error because the result is row count for earch page. It is not total rows on grid after click event "OnApplyExpressions="radFilter_SearchGridData" of Filter.

Please, do you help me this problem?

Thansks,

Mr PhuongLD


Pavlina
Telerik team
 answered on 29 Nov 2010
7 answers
319 views
Hi!
I have a page with a RadGrid. ClientSettings section of the grid contains
<ClientEvents OnCommand="RadGridCommand" /> 
Everything has worked perfectly with RadGrid 2009 Q2. But when I installed version 2009.3.1314 I found that my RadGrid displays "No records to display" message even if some records exist. So, I see my records and "No records to display" message at the bottom of the grid. After quick research I found that it is because of item <ClientEvents OnCommand="RadGridCommand" />. When it is commented the grid works fine (I mean, without "No records to display"), but this element is essential to handle some client-side events.

Could you help me to solve this problem?
Thank you in advance



Pavel
Telerik team
 answered on 29 Nov 2010
0 answers
166 views
Hi all,
In my form i'm using both Ajax controls like eg. (validatorcallout) and Radcontrols like eg(radcombobox)
I'm using below Script Manager
   <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>

On running it showing the following error  "sys.extended.UI is null"
and sometime the form get into stuck...
I want to know the script that support both..

this is my code
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="radajax.aspx.vb" Inherits="radajax" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<head runat="server">
    <title></title>
 
</head>
<body>
    <form id="form1" runat="server">
     
    <div>
  
   <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        Name:
        <asp:TextBox ID="name" runat="server"></asp:TextBox>
        <asp:Button ID="cmd_submit" runat="server" Text="SUBMIT" />
        <asp:RequiredFieldValidator ID="NameReqFieldVal" runat="server"
            ErrorMessage="Enter Name" ControlToValidate="name" Display="None"></asp:RequiredFieldValidator>
    
        <asp:ValidatorCalloutExtender ID="ValCalloutExt" TargetControlID ="NameReqFieldVal" runat="server">
        </asp:ValidatorCalloutExtender>
        <br />
                      
                    <telerik:RadComboBox runat="server" EmptyMessage="Choose IGM No"
                        EnableLoadOnDemand="True" HighlightTemplatedItems="True" DropDownWidth="298px"
                         Skin="Telerik" Height="200px" Width="200px" ShowMoreResultsBox="True"  EnableVirtualScrolling="True"
                        ID="radcombo_IGM"
                        ><HeaderTemplate>
                            <table cellpadding="0" cellspacing="0" style="width: 275px">
                                <tr>
                                    <td style="width: 225px;">
                                       GP No</td>
                                    
                                   <td style="width: 225px;">
                                       GP DATE</td>
                                </tr>
                            </table>
                         
</HeaderTemplate>
<ItemTemplate>
                            <table cellpadding="0" cellspacing="0" style="width: 275px">
                                <tr>
                                    <td style="width: 225px;">
                                    <%# DataBinder.Eval(Container, "Text")%>
                                         
                                    </td>
                                     
                                     <td style="width: 255px;">
                                        <%#DataBinder.Eval(Container, "Attributes['GPDATE']")%>
                                    </td>
                                    
                                                                   </tr>
                            </table>
                         
</ItemTemplate>
 
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</telerik:RadComboBox>
 
    </div>
    </form>
</body>
</html>

Is there any Radvalidation controls...?

Thanks
salvio
Top achievements
Rank 1
 asked on 29 Nov 2010
2 answers
92 views

Hi

 

I am using a FormTemplate and an objectdatasource to updateand insert items in my radGrid.

I would like to pass a custom object to my data object layer instead of a parameter for each bind field in the form template.

 

Currently I am creating my custom object in the UpdateCommand and InsertCommand and pass it to the inserting or updating event of the objectdataosurce using the page viewstate. I also remove the formtemplate required paramaters in the inserting and updating events. Is there a better way to do this?

 

protected void ObjectDataSource1_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
      {
          //Remove parameters
          e.InputParameters.Remove("field1");
          e.InputParameters.Remove("field2");
          e.InputParameters.Remove("field3");
          e.InputParameters.Remove("field4");
          e.InputParameters.Add("customObject", (CustomObject)ViewState["customObject"]);
                        
      }

protected void radGrid__InsertCommand(object source, GridCommandEventArgs e)
       {
           GridEditableItem editedItem = e.Item as GridEditableItem;
           CustomObject customObject = new CustomObject();
             
           RadTextBox txtField1 = (RadTextBox)editedItem.FindControl("field1");
           RadTextBox txtField2 = (RadTextBox)editedItem.FindControl("field2");
           RadTextBox txtField3 = (RadTextBox)editedItem.FindControl("field3");
           RadTextBox txtField4 = (RadTextBox)editedItem.FindControl("field4");
           customObject.Field1 = txtField1.Text;
           customObject.Field2 = txtField2.Text;
           customObject.Field3 = txtField3.Text;
           customObject.Field4 = txtField4.Text;
           ViewState.Add("customObject", customObject);
            
       }

Thanks

Fred Mare
Top achievements
Rank 1
 answered on 29 Nov 2010
2 answers
144 views
Hi,

I have placed my radeditor inside the radtabstrip's radmultipage, tools not getting displayed when I use it in other normal pages it works fine.
Following works in normal page

<telerik:RadEditor runat="server" ID="radEditor" Width="460px" Height="150px" ContentAreaMode="Div" EditModes="Design"

                            SkinID="MinimalSetOfTools">

                            <Tools>

                                <telerik:EditorToolGroup>

                                    <telerik:EditorTool Name="Bold" />

                                    <telerik:EditorTool Name="Italic" />

                                    <telerik:EditorTool Name="Underline" />

                                    <telerik:EditorSeparator Visible="true" />

                                    <telerik:EditorTool Name="LinkManager" />

                                    <telerik:EditorTool Name="Unlink" />

                                    <telerik:EditorSeparator Visible="true" />

                                    <%--<telerik:EditorTool Name="DocumentManager" />--%>

                                    <telerik:EditorTool Name="Copy" />

                                    <telerik:EditorTool Name="Paste" />

                                    <telerik:EditorTool Name="Cut" />

                                    <telerik:EditorSeparator Visible="true" />

                                    <telerik:EditorTool Name="FontName" />

                                    <telerik:EditorTool Name="FontSize" />

                                    <telerik:EditorSeparator Visible="true" />

                                    <telerik:EditorTool Name="Redo" />

                                    <telerik:EditorTool Name="Undo" />

                                    <telerik:EditorSeparator Visible="true" />

                                    <telerik:EditorTool Name="ForeColor" />

                                   

                                </telerik:EditorToolGroup>        

                                  </Tools>

                        </telerik:RadEditor>

 

I tried using tools xml file also, tools getting displayed only on ToolbarMode="ShowOnFocus" , but i need to show it when page loads itself

 

 

 

 


 

<

 

 

telerik:RadEditor Height="150px" Width="620px" EditModes="Design" AllowScripts="true" Enabled="false"

 

 

 

 

 

 

 

ID="txtMailBody" runat="server" BackColor="White" ToolbarMode="ShowOnFocus" CssClass="formmessagebody"

 

 

 

 

 

 

 

ToolsFile="~/app_data/BasicTools.xml">

 

 

 

 

 

 

 

</telerik:RadEditor>

 

 

 

 

Can any one help me

 

Subramanian
Top achievements
Rank 1
 answered on 29 Nov 2010
1 answer
124 views


Hi,
I have a created a RadContext Menu under button click, then it will open "Contains","NotContains"....etc items.When i select any of the item from the list,then that particular item need to be highlighted/should change to bold. when i click on 2nd time on the button then the previous selected item should show by highlighting of that item.
bellow is the my code.

<

 

div>

 

 

<asp:ScriptManager ID="ScriptManager" runat="server">

 

 

</asp:ScriptManager>

 

 

<asp:Button ID="btnFilterName" runat="server" CssClass="rgFilter" Text="Show Menu"

 

 

OnClientClick="showMenuFirstName(this, event);return false;"

 

 

/>

 

 

<telerik:RadContextMenu ID="RadContextMenuFirstName" runat="server" OnClientItemClicked="applyFilterFirstName">

 

 

<Targets>

 

 

<telerik:ContextMenuControlTarget ControlID="btnFilterName"/>

 

 

</Targets>

 

 

<Items>

 

 

<telerik:RadMenuItem Value="CONTAINS" Text="CONTAINS"/>

 

 

<telerik:RadMenuItem Value="DOESNOTCONTAIN" Text="DOESNOTCONTAIN" />

 

 

<telerik:RadMenuItem Value="EQUALTO" Text="EQUALTO" />

 

 

<telerik:RadMenuItem Value="NOTEQUALTO" Text="NOTEQUALTO" />

 

 

<telerik:RadMenuItem Value="STARTSWITH" Text="STARTSWITH" />

 

 

<telerik:RadMenuItem Value="ENDSWITH" Text="ENDSWITH" />

 

 

<telerik:RadMenuItem Value="ISNULL" Text="ISNULL" />

 

 

<telerik:RadMenuItem Value="NOTISNULL" Text="NOTISNULL" />

 

 

</Items>

 

 

</telerik:RadContextMenu>

 

 

<telerik:RadScriptBlock ID="RadScriptBlockFstName" runat="server">

 

 

<script type="text/javascript">

 

 

function showMenuFirstName(btn, e) {

 

$find(btn.id.replace(

"btnFilterName", "RadContextMenuFirstName")).show(e);

 

 

}

 

function applyFilterFirstName(sender, args) {

 

 

 

var menu = $find("<%=RadContextMenuFirstName.ClientID %>");

 

}

 

</script>

 

 

</telerik:RadScriptBlock>

 

 

</div>

 


Thanks in advance.
Princy
Top achievements
Rank 2
 answered on 29 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?