Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
167 views
Hi,

I am usin Rad scheduler in my application. I am using Advanced forms feature for editing and creating new appointments, however i have some questions mentioned below.

1. How to  make timelines show 15 minutes. PLease check the screen attached.

2. I am saving values n multiple tables after Save button is clicked on New or Edit form. What is the best way to do teh validations on this form?

Any help in this regards will be appreciable as this is very urgent for me.

Regards,
Sachin
Peter
Telerik team
 answered on 22 Oct 2010
1 answer
76 views
The Window css seems to be downloading BOTH the gif and png sprites....if they both contain the same elements, that seems a bit redundant (and perhaps why the window seems to "pop" in)?

So should the icon be it's own image?  Therefore it won't be downloaded if we don't even use the default window icon?

(validated this on the demo site)

Steve
Georgi Tunev
Telerik team
 answered on 22 Oct 2010
1 answer
74 views
Hello,
           It may be a simple question. I want to create a grid control and add columns like the following

 

<telerik:RadGrid ID="grid1" runat="server" GridLines="None">

 

 

<columns>

 

 

</columns>

 

 

</telerik:RadGrid>

I dont want to use datasource associated with the grid control. Is there a simple way to add columns to the grid??. I want to add rows dynamically like we add ListItem in list control. I went through the Property Builder. I dont see an option to add a column. I see an option to add bound column, button column etc. But I dont want any of that.

Thanks,
Bharani

 

Shinu
Top achievements
Rank 2
 answered on 22 Oct 2010
3 answers
47 views
Hi,

I cannot seem to get this, I have a multipage with a label in it that dynamically populates a list, I have set scroll to auto, but no matter what I have tried I cannot seem to style the scroll bar, the design has a custom looking scroll bar so I need to make the scroll bar look as close to that as possible. Is there a way to style the scroll bar in this control?
Yana
Telerik team
 answered on 22 Oct 2010
1 answer
125 views
the methods for never fire on this sample code at http://www.telerik.com/help/aspnet-ajax/grdtotalsingridfooters.html under

Client-side calculation of totals for a template column in firefox 3.6.10 but works fine in IE 8 how do I adapt this telerik supplied sample code so that it works on both of them?

<script type="text/javascript">
  var initialValue = 0.0;
   function update(footerBox, changedBox)
   {
   var footerBoxControl = $get(footerBox);
   var changedBoxControl = $get(changedBox);
   var tempValue = footerBoxControl.value - initialValue;
   footerBoxControl.value = parseFloat(tempValue) + parseFloat(changedBoxControl.value);
   }
   function getInitialValue(changedBox)
   {
   var changedBoxControl= document.getElementById(changedBox);
   initialValue = parseFloat(changedBoxControl.value);
   }
 </script>

<form id="form1"  runat="server">
       <telerik:RadGrid
        ShowFooter= "true"
        ID= "RadGrid1" runat="server" DataSourceID="AccessDataSource1" GridLines="None"
        OnPreRender= "RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound">
           <MasterTableView AutoGenerateColumns="False" DataKeyNames="OrderID"
           DataSourceID= "AccessDataSource1">
               <Columns>
                   <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32"
                   HeaderText= "OrderID"
                       ReadOnly= "True"
                       SortExpression= "OrderID" UniqueName="OrderID">
                   </telerik:GridBoundColumn>
                   <telerik:GridTemplateColumn UniqueName="Template1">
                   <ItemTemplate>
<asp:TextBox runat="server" ID="TextBox1" Text='<% #Eval("Freight") %>'></asp:TextBox>
                   </ItemTemplate>
                   <FooterTemplate>
                   <asp:TextBox runat="Server" ID="TextBox2">
                   </asp:TextBox>
                   </FooterTemplate>
                   </telerik:GridTemplateColumn>
               </Columns>
               <ExpandCollapseColumn Visible="False">
                   <HeaderStyle Width="19px" />
               </ExpandCollapseColumn>
               <RowIndicatorColumn Visible="False">
                   <HeaderStyle Width="20px" />
               </RowIndicatorColumn>
           </MasterTableView>
       </telerik:RadGrid><asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/Nwind.mdb"
           SelectCommand= "SELECT TOP 10 [OrderID], [Freight] FROM [Orders]"></asp:AccessDataSource>
   </form>


public partial class _Default : System.Web.UI.Page
{
   double sum = 0;
   string clientID;
 
 
   protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
   {
        if (e.Item is GridDataItem)
       {
           GridDataItem dataItem = (GridDataItem)e.Item;
           sum+=double.Parse((dataItem[ "Template1"].FindControl("TextBox1") as TextBox).Text);
       }
        else if (e.Item is GridFooterItem)
       {
           GridFooterItem footer = (GridFooterItem)e.Item;
           (footer[ "Template1"].FindControl("TextBox2") as TextBox).Text = sum.ToString();
           clientID = (footer["Template1"].FindControl("TextBox2") as TextBox).ClientID;
       }
   }
 
 
 
   protected void RadGrid1_PreRender(object sender, EventArgs e)
   {
       foreach (GridDataItem dataItem in RadGrid1.MasterTableView.Items)
       {
           (dataItem[ "Template1"].FindControl("TextBox1") as TextBox).Attributes.Add("onblur", "update('" + clientID + "'" + "," + "'" + (dataItem["Template1"].FindControl( "TextBox1") as TextBox).ClientID + "')");
           (dataItem[ "Template1"].FindControl("TextBox1") as TextBox).Attributes.Add("onfocus", "getInitialValue('" + (dataItem["Template1"].FindControl( "TextBox1") as TextBox).ClientID + "')");
       }
   }
}
Veli
Telerik team
 answered on 22 Oct 2010
1 answer
54 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
89 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
216 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
122 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
60 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?