Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
71 views
Hello

Is there any way to set cursor position to next editable character in MaskedTextBox?
Tsvetina
Telerik team
 answered on 22 Oct 2010
1 answer
107 views
Hi

I'm using RadSplitter with radslidingpane.  I have the following issue with these controls. I have attached screen of my issue. Plz provide the solution.


Thanks in advance
Dobromir
Telerik team
 answered on 22 Oct 2010
2 answers
251 views
Hi,

    I have a problem with RadGrid and Ajax. 
    Scenario:

    1. Im using Master pages and content pages.
    2. Im using RadAjaxManager at MasterPage and RadAjaxManagerProxy at content page.
    3. I have other controls that use ajax over the RadGrid for updating.
    4. Im using advanced databind for RadGrid ( NeedDataSource event) with List<Object> as datasource

Ok, the problem is that the LoadingAjaxPanel or Ajax effect doesnt works all the time. For example, if i try to sort any column or try to go to the next page or anyevent of the grid the ajax effect works (i mean the LoadingAjaxPanel works), but at the next action sorting, or paging or any, the complete page update like a postback, then i try to do another action adn the Ajax effects works again. I folowed all the examples for this but i dont know whta is wrong with the ajax part.

Some code here:
MasterPage
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
  
                <script type="text/javascript">
                function mngRequestStarted(ajaxManager, eventArgs)
                {
                    if ((eventArgs.EventTarget.indexOf("GridExportToCSV") != -1) ||
                        (eventArgs.EventTarget.indexOf("GridExportToXLS") != -1)                   {
                     eventArgs.EnableAjax = false;
                  }
                }
                </script>
  
            </telerik:RadCodeBlock>
    <telerik:RadScriptManager ID="tsmGeneric" runat="server" EnableScriptGlobalization="true" EnableScriptLocalization="true">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="mainAjaxManager" runat="server" ClientEvents-OnRequestStart="mngRequestStarted">
                <ClientEvents OnRequestStart="mngRequestStarted" />
    </telerik:RadAjaxManager>
.
.
.
<asp:ContentPlaceHolder ID="cphMainContent" runat="server">
                    </asp:ContentPlaceHolder>

ContentPage:
(Ajax Section)
<asp:Content ID="cntMain" ContentPlaceHolderID="cphMainContent" runat="server">
  
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="gvwOperations">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="gvwOperations" LoadingPanelID="rlpLoading"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="dropPeriods" >
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="gvwOperations" LoadingPanelID="rlpLoading"/>
                    <telerik:AjaxUpdatedControl ControlID="pnlDateRange"/>
                </UpdatedControls>                
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="dropUsers" >
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="gvwOperations" LoadingPanelID="rlpLoading"/>
                </UpdatedControls>                
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnGO">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="gvwOperations" LoadingPanelID="rlpLoading"/>
                </UpdatedControls>
            </telerik:AjaxSetting>            
        </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadAjaxLoadingPanel ID="rlpLoading" runat="server" Skin="Windows7" />

(RadGrid Section)
<telerik:RadGrid ID="gvwOperations" runat="server" 
            AllowPaging="True" 
            AutoGenerateColumns="False" 
            GridLines="None" 
            Skin="Windows7" 
            AllowSorting="True" 
            OnNeedDataSource="gvwOperations_NeedDataSource" 
            OnItemCommand="gvwOperations_ItemCommand" 
              onitemcreated="gvwOperations_ItemCreated" 
              onitemdatabound="gvwOperations_ItemDataBound">
            <ExportSettings ExportOnlyData="True" IgnorePaging="True" OpenInNewWindow="True">
                <Pdf PageWidth="297mm" PageHeight="210mm" />
            </ExportSettings>
            <ClientSettings EnableRowHoverStyle="true" ReorderColumnsOnClient="false" AllowKeyboardNavigation="true" >
            <Resizing AllowColumnResize="true" EnableRealTimeResize="true" />
            </ClientSettings>
            <MasterTableView CommandItemDisplay="Top" TableLayout="Fixed" 
            PageSize="6"
            BorderStyle="None"
            EnableHeaderContextMenu="true" 
            EnableHeaderContextFilterMenu="true"
            IsFilterItemExpanded="false"
            AllowFilteringByColumn="True">
                <CommandItemTemplate>
                <asp:CheckBox ID="chkAllowGroup" runat="server" Text="Allow Group Columns" TextAlign="Right" Checked="false" OnCheckedChanged="chkAllowGroup_CheckedChanged"/>
                <asp:Button ID="GridExportToCSV" runat="server" Text="CSV" OnClick="btnDownloadCSV_Click"/>
                <asp:Button ID="GridExportToXLS" runat="server" Text="Excel" OnClick="btnDownloadXLS_Click"/>
                </CommandItemTemplate>
  
                <CommandItemSettings />
                <Columns>                
                    <telerik:GridBoundColumn DataField="ProcessDateTime" HeaderStyle-Width="150px" DataType="System.DateTime" HeaderText="ProcessDateTime"
                        SortExpression="ProcessDateTime" UniqueName="ProcessDateTime" meta:resourcekey="GridBoundColumnResource1">
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OperationID" HeaderStyle-Width="120px" HeaderText="OperationID" SortExpression="OperationID"
                        UniqueName="OperationID" meta:resourcekey="GridBoundColumnResource2">
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="TransactionID" HeaderText="TransactionID" DataType="System.Int32"
                        SortExpression="TransactionID" UniqueName="TransactionID" meta:resourcekey="GridBoundColumnResource3">
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="MerchantSalesID" HeaderText="MerchantSalesID"
                        SortExpression="MerchantSalesID" UniqueName="MerchantSalesID" meta:resourcekey="GridBoundColumnResource4">
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Currency" HeaderText="Currency" SortExpression="Currency"
                        UniqueName="Currency" meta:resourcekey="GridBoundColumnResource5">
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Amount" DataType="System.Decimal" DataFormatString="{0:0.00}"
                        HeaderText="Amount" SortExpression="Amount" UniqueName="Amount" meta:resourcekey="GridBoundColumnResource6">
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ToCurrency" HeaderText="ToCurrency" SortExpression="ToCurrency"
                        UniqueName="ToCurrency" meta:resourcekey="GridBoundColumnResource7">
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ToAmount" DataType="System.Decimal" DataFormatString="{0:0.00}"
                        HeaderText="ToAmount" SortExpression="ToAmount" UniqueName="ToAmount" meta:resourcekey="GridBoundColumnResource8">
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Estado" HeaderStyle-Width="55px" UniqueName="State" meta:resourcekey="GridTemplateColumnResource1">
                        <ItemTemplate>
                            <asp:Image ID="imgStatus" runat="server" BorderWidth="0px" 
                                ImageUrl='<%# String.Format("~/Images/{0}.png", Eval("LastStatus")) %>'
                                ToolTip='<%# GetLocalResourceObject(String.Format("tooltip{0}Transaction", Eval("LastStatus"))).ToString() %>'
                                AlternateText='<%# GetLocalResourceObject(String.Format("alternateTxt{0}Transaction", Eval("LastStatus"))).ToString() %>' />
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"  />
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="UserCompleteName" HeaderText="UserCompleteName"
                        SortExpression="UserCompleteName" UniqueName="UserCompleteName" meta:resourcekey="GridBoundColumnResource9">
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" Visible="false"
                        SortExpression="CustomerID" UniqueName="CustomerID" meta:resourcekey="GridBoundColumnResource10">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CustomerName" HeaderText="CustomerName" Visible="false"
                        SortExpression="CustomerName" UniqueName="CustomerName" meta:resourcekey="GridBoundColumnResource11">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CustomerEmail" HeaderText="CustomerEmail" Visible="false"
                        SortExpression="CustomerEmail" UniqueName="CustomerEmail" meta:resourcekey="GridBoundColumnResource12">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <PagerStyle Mode="NextPrevAndNumeric" />
        </telerik:RadGrid>

I ll attach some images so you can understand me better.

By the way the others controls (buttons and combobox) that use ajax over the RadGrid WORKS FINE ALL THE TIME.

I hope you can help me because its urgent.
thank you very much.
Luis
Top achievements
Rank 1
 answered on 21 Oct 2010
2 answers
138 views

Hi,
We are using 2010 Q1 SP1.
We have enebled excel export on a dynamically created grid (few columns are GridTemplateColumn and others are GridBoundColumn) and added programmatically on runtime.
If we make ExportOnlyData="true" and Format="Html" or ExcelML then it do not exports GridTemplateColumn columns.

If we make ExportOnlyData="false" and Format="Html" then it exports all data in all columns but it makes Columns headers as Links in exported file.

Is there any way to make grid to export data with ExportOnlyData="true" and Format="Html" or to remove link tag from the exported excel.

Thanks

Daniel
Telerik team
 answered on 21 Oct 2010
1 answer
73 views
It would be very nice if the control had a property which would clientside auto render and remove a loading div...

I use this control a ton and I keep having to implement it each time I use it...

Just a though :)
Steve
Pero
Telerik team
 answered on 21 Oct 2010
3 answers
109 views
When adding a new expression in RadFilter, for some fields, I would like to pre-populate a default value in the expression. For example, in the attached picture, when adding an OrderID expression, it should programmatically populate the value to "111".

I tried to customize the ItemCommand event, but I don't know how to obtain the associated RadFilterTextFieldEditor and set the default value "111" to it.

Does any one know how to archieve it?

 

Daniel
Telerik team
 answered on 21 Oct 2010
1 answer
136 views
I'm pretty close on this one.  I took advantage of the EnableEmptyListItem to add an string telling the user to select an item.  I have a CompareValidator that is picking up the empty list item text.  What I would really like is to pick up the empty list item value, which is zero by default.  Here's what I have and it works on the text in the radcombobox.
GridDropDownListColumnEditor category = (GridDropDownListColumnEditor)item.EditManager.GetColumnEditor("RiskCategory");
                TableCell catcell = (TableCell)category.ComboBoxControl.Parent;
  
                CompareValidator comp = new CompareValidator();
                comp.ID = "compID";
                comp.ControlToValidate = category.ComboBoxControl.ID;
                  
                comp.ValueToCompare =  "Select a category";
  
                comp.Operator = ValidationCompareOperator.NotEqual;
                comp.ErrorMessage = "Please select a valid category";
                catcell.Controls.Add(comp);
Here, the emptylistitem text is "Select a category".  I can live with this, but if it's possible to get the value field for the comboboxcontrol, that would be great.  Thanks.
Cori
Top achievements
Rank 2
 answered on 21 Oct 2010
1 answer
256 views
I just installed the latest asp.net ajax controls and I'm using VS2010.  I clicked convert to telerik project and ran through the wizard leaving everything default.  I added a test.aspx and dragged a RadGrid onto the page and added a RadScriptManager.  It renders fine in design mode but when I run the project the grid just shows up as a gray line in the browser.

I also tried manually adding columns, populating the grid with data, etc.  Nothing works.
Cori
Top achievements
Rank 2
 answered on 21 Oct 2010
1 answer
102 views
I've got a grid that is on a radwindow.  The height of the window in set and so is the grid height but when the user select Add Record the height of the grid changes.  Is there anyway of stopping this from happening.
Cori
Top achievements
Rank 2
 answered on 21 Oct 2010
4 answers
317 views
I have two load on demand radcomboboxes that are working great, however, in the page load I try to set the seleceted value to session values:
if (Session["FacilityID"] != null)
            {
                FacilityID = Utils.ToInteger(Session["FacilityID"].ToString());
                if (Utils.ToInteger(radcmbFacility.SelectedValue.ToString()) != FacilityID)
                {
                    radcmbFacility.SelectedValue = FacilityID.ToString();
                }
            }
if I pause execution of the code, the line setting the value does run, and after it runs I can hover over the SelectedValue and it shows the correct value, however,  on the page the combobox still shows the empty message instead of the text for the selected value.





Cori
Top achievements
Rank 2
 answered on 21 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?