Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
131 views
Hi

I have run into interesting case - Grid shows Aug 2 in view mode and Feb 8 in edit mode.

here is the code that can let you reproduce issue. All 4 columns in the grid will show Aug 2 in view mode, but in Edit mode, only  d4 column will show  Aug 2, rest will display Feb 8.

on ASPX side:

<telerik:RadGrid ID="rgGrid1" runat="server" AutoGenerateColumns="false">
    <MasterTableView EditMode="EditForms">
        <Columns>
            <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>
            <telerik:GridDateTimeColumn
                UniqueName="d1"
                PickerType="DateTimePicker"
                DataField="d1"
                HeaderText="d1"
                DataType="System.DateTime"
                EditDataFormatString="MMM dd HH:mm"
                DataFormatString="{0:MMM dd HH:mm}"
                >
            </telerik:GridDateTimeColumn>  
            <telerik:GridDateTimeColumn
                UniqueName="d2"
                DataField="d2"
                HeaderText="d2"
                DataType="System.DateTime"
                EditDataFormatString="MMM dd HH:mm"
                DataFormatString="{0:MMM dd HH:mm}"
                >
            </telerik:GridDateTimeColumn>  
            <telerik:GridDateTimeColumn
                UniqueName="d3"
                DataField="d3"
                HeaderText="d3"
                DataType="System.DateTime"
                ColumnEditorID="ed"
                EditDataFormatString="MMM dd HH:mm"
                DataFormatString="{0:MMM dd HH:mm}"
                >
            </telerik:GridDateTimeColumn>  
 
            <telerik:GridTemplateColumn
                UniqueName="d4"
                HeaderText="d4"
                DataType="System.DateTime"
                ItemStyle-HorizontalAlign="Center"
                HeaderStyle-Width="120px"
                >
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblLastTicket"
                        Text='<%# Eval("d4", "{0:MMM dd HH:mm}") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadDateTimePicker runat="server" ID="txtLastTicket"
                    DbSelectedDate='<%#Bind("d4", "{0:MMM dd HH:mm}") %>'
                    Width="150px"
                    DateInput-ReadOnly="true"
                    DateInput-DateFormat="MMM dd HH:mm"></telerik:RadDateTimePicker>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>           
 
 
        </Columns>
         
    </MasterTableView>
</telerik:RadGrid>
<telerik:GridDateTimeColumnEditor ID="ed" runat="server" ></telerik:GridDateTimeColumnEditor>

on server side:

DateTime dt2 = DateTime.Parse("2011-08-02");

DataTable dttest =
new DataTable();
dttest.Columns.Add(new DataColumn("d1", typeof(DateTime)));
dttest.Columns.Add(new DataColumn("d2", typeof(DateTime)));
dttest.Columns.Add(new DataColumn("d3", typeof(DateTime)));
dttest.Columns.Add(new DataColumn("d4", typeof(DateTime)));
 
DataRow dr = dttest.NewRow();
dr["d1"] = dt2;
dr["d2"] = dt2;
dr["d3"] = dt2;
dr["d4"] = dt2;
dttest.Rows.Add(dr);
rgGrid1.DataSource = dttest;
if (!IsPostBack)
    rgGrid1.DataBind();



Can you explain what is wrong with 1st 3 columns and is there a fix?

Thanks,

Dmitry
Dmitry
Top achievements
Rank 1
 answered on 04 Aug 2011
5 answers
224 views
I have a functional RadGrid with an RadUpload control in the editTemplate. I am also using a RadAjaxManager in which the Grid references itself. For some reason, the LoadingPanel doesn't display (even though I have set the panel in the RadAjaxManager). The loading panel worked fine until I added in the upload control and javascript conditionalPostback code. I've even tried adding a button and label to print some text and although it ajaxifies it still doesn't display the loader (and it's not because of the image).

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="gridupload.aspx.cs" Inherits="admin_gridupload" %> 
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml"
<head id="Head1" runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
            <telerik:radscriptblock id="RadScriptBlock1" runat="server"
                <script type="text/javascript"
                    //On insert and update buttons click temporarily disables ajax to perform upload actions                     
                    function conditionalPostback(e, sender) { 
                        var theRegexp = new RegExp("\.UpdateButton$|\.PerformInsertButton$", "ig"); 
                         
                        if (sender.EventTarget.match(theRegexp)) { 
                            var upload = $find(window['UploadId']); 
 
                            //AJAX is disabled only if file is selected for upload 
                            if (upload.getFileInputs()[0].value != "") { 
                                sender.EnableAjax = false
                            } 
                        } 
                    }     
                </script> 
            </telerik:radscriptblock> 
             
            <telerik:RadAjaxManager ID="AjaxManager1" runat="server"
            <ClientEvents OnRequestStart="conditionalPostback"/> 
            <AjaxSettings>         
                <telerik:AjaxSetting AjaxControlID="RadGrid1"
                    <UpdatedControls > 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting>           
            </AjaxSettings>          
            </telerik:RadAjaxManager> 
    <div> 
     
             
            <telerik:RadProgressManager ID="RadProgressManager1" Runat="server" /> 
    <telerik:RadProgressArea ID="RadProgressArea1" Runat="server"
    </telerik:RadProgressArea> 
        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="odsVideo"  
            GridLines="None" AutoGenerateColumns="False"  
            oninsertcommand="RadGrid1_InsertCommand"
<MasterTableView  
    CommandItemDisplay="Top"  
    DataKeyNames="VideoID"  
    EditMode="EditForms" 
    DataSourceID="odsVideo"
    <EditItemTemplate> 
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
    </EditItemTemplate> 
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
    <Columns> 
        <telerik:GridEditCommandColumn> 
        </telerik:GridEditCommandColumn> 
        <telerik:GridBoundColumn DataField="VideoID" DataType="System.Int32"  
            HeaderText="VideoID" ReadOnly="True" SortExpression="VideoID"  
            UniqueName="VideoID"
        </telerik:GridBoundColumn> 
        <telerik:GridTemplateColumn DataField="Title" HeaderText="Title"  
            SortExpression="Title" UniqueName="Title"
            <EditItemTemplate> 
                <asp:TextBox ID="txtTitle" runat="server" Text='<%# Bind("Title") %>'></asp:TextBox> 
            </EditItemTemplate> 
            <ItemTemplate> 
                <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>'></asp:Label> 
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn DataField="FileName" DataType="System.Guid"  
            HeaderText="FileName" SortExpression="FileName" UniqueName="FileName"
            <EditItemTemplate> 
                <telerik:RadUpload ID="RadUpload1" Runat="server"
                </telerik:RadUpload>  
            </EditItemTemplate> 
            <ItemTemplate> 
                <asp:Label ID="FileNameLabel" runat="server" Text='<%# Eval("FileName") %>'></asp:Label> 
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridBoundColumn DataField="Minutes" DataType="System.Int32"  
            HeaderText="Minutes" SortExpression="Minutes" UniqueName="Minutes"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Seconds" DataType="System.Int32"  
            HeaderText="Seconds" SortExpression="Seconds" UniqueName="Seconds"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="DateAdded" DataType="System.DateTime"  
            HeaderText="DateAdded" SortExpression="DateAdded" UniqueName="DateAdded"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="SeriesID" DataType="System.Int32"  
            HeaderText="SeriesID" SortExpression="SeriesID" UniqueName="SeriesID"  
            Visible="False"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Ranking" DataType="System.Int32"  
            HeaderText="Ranking" SortExpression="Ranking" UniqueName="Ranking"  
            Visible="False"
        </telerik:GridBoundColumn> 
        <telerik:GridCheckBoxColumn DataField="IsActive" DataType="System.Boolean"  
            HeaderText="IsActive" SortExpression="IsActive" UniqueName="IsActive"
        </telerik:GridCheckBoxColumn> 
    </Columns> 
 
<EditFormSettings> 
<EditColumn UniqueName="EditCommandColumn1"></EditColumn> 
</EditFormSettings> 
</MasterTableView> 
</telerik:RadGrid>         
 
    </div> 
    <asp:ObjectDataSource ID="odsVideo" runat="server"  
        DataObjectTypeName="MySample.BusinessObjects.Video"  
        DeleteMethod="Delete" InsertMethod="Insert"  
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetItems"  
        TypeName="MySample.BusinessLogic.VideoManager"  
        UpdateMethod="Update"
        <DeleteParameters> 
            <asp:Parameter Name="videoID" Type="Int32" /> 
        </DeleteParameters> 
    </asp:ObjectDataSource> 
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server"
    </telerik:RadScriptManager> 
             
    <br /> 
    <br />         
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="16px" 
    Transparency="50" Width="16px"
    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
        style="border: 0px;" /> 
</telerik:RadAjaxLoadingPanel> 
    </form> 
</body> 
</html> 


Pavlina
Telerik team
 answered on 04 Aug 2011
3 answers
182 views
Hi  'Rumen'

I am creating a CMS of my company where I want to use radeditor
i split page into 2 frames top frame contain the toolbar of editor and second frame contain editor that look like div
this scenario work on all browser except SAFARI
You give me this code past 2 month but i check this code in SAFARI now and it does not work
I have SAFARI 5.0.5 (7533.21.1)
below link is the project link

https://skydrive.live.com/?cid=96dc14ef9668ae5a&sc=documents&id=96DC14EF9668AE5A%21108#

Kindly Check the complete code and solve the problem

Thanks
Looking forward Your reply

Regards: Abdul Haseeb

I am set to lunch the project it is delying because Editor not work in SAFARI
please reply soon
Rumen
Telerik team
 answered on 04 Aug 2011
1 answer
136 views
We are currently seeing an issue when attempting to put a Telerik RadButton inside a table when rendering the page with Firefox 2. The button will not render as a whole, instead the button left-hand-side will render above the button. All other browsers do not have this issue, especially the modern browsers. We're aware that FF2 is old, but the client is insisting support. We're not having any other rendering issues with FF2 with other Telerik ASP.NET controls.

Also, if the table is inside a div we will see the right-hand-side of the button render below the button.

I've attached a screenshot of the render issue, and I'm including the a simple markup if someone is interested in replicating the issue.

Question: 
Any ideas what's wrong?
Should the Telerik RadButton support Firefox 2?
Is there something we need to do in our style sheets to get Firefox 2 support?
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="buttonTest.aspx.cs" Inherits="LAWA.Portal.apps.lawa.pages.telerik.buttonTest" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title>telerik button test</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
        <table width="500px" border="1">
            <tr>
                <td >
                    <telerik:RadButton ID="btnTest" runat="server" Text="Button Test"/>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
Slav
Telerik team
 answered on 04 Aug 2011
3 answers
83 views
Hi,

I would like to use the print functionality for the radgrid that is created programatically. Is it possible?
Please provide some direction.

Thanks,
Vijay
Daniel
Telerik team
 answered on 04 Aug 2011
2 answers
199 views
Just wondering if there is a load complete or post render event for radscheduler? I need to begin some other processing once the scheduler is completely loaded.

Thanks,
Dan
Dan
Top achievements
Rank 1
 answered on 04 Aug 2011
3 answers
102 views
Please give code example on

I populate my treeview from sql example
Column Name : ID
Column Name : Catalogue
Column Name : ParentID

Data

1    Cataloge1      null
2.   Catalogue2    1
3.   Catalogue3    2

The tree look like this
  
  • Catalogue1

              Catalogue2
                       Catalogue3
I want to delete the middel node "Catalogue2" then node 3 "Catalogue3" must move 1 up so the tree just have 2 nodes
    

  • Catalogue1

              Catalogue3
How do i do this when treeview is populated from sql  

    
Herman
Top achievements
Rank 1
 answered on 04 Aug 2011
4 answers
239 views
Hi

I am using Radwindow as a modal popup for inline form editing.  I have created a wizard, using standard 'asp:panels', inside the ContentTemplate of the Radwindow to break up the form in to smaller chunks. In each asp:panel there is a 'next' and 'back' button which is used to navigate between them. These buttons control server side functions to show/hide the various panels during navigation, and perform some form validation etc. in the background.  I need this server side functionality. 

I would like the Radwindow to resize the height automatically in each Panel of the wizard (to reflect the content in that panel) and to remain centred in the browser.  When I first open the Radwindow it autosizes to the content in the first Panel.  However when I click the 'next' button to show the second content panel in the wizard, the height remains stuck at the height of the first Panel - it doesn't resize to the new content height of the second panel.

I have searched around but have not found a similar scenario to auto resize the Radwindow in a wizard Panel navigation.  Any ideas?

The Telerik controls are Q3 2010 and it's ASP.NET 3.5. Thanks in advance.

Cheers

Kevin

P.S. I have also added a Div, with a width, in the Radwindow ContentTemplate
as it doesn't resize properly without this - is there a more elegant solution so that I can remove this Div ideally?  As I said I want to keep theRadwindow width constant - just vary height.

Secondly can I generally use RadAjaxpanel instead of asp:panel in pages?  Is there a benefit or overhead to this? Sorry for all the questions but am new to these controls :)

<asp:Button ID="ButtonAddNew" Text="Open RadWindow" runat="server" CausesValidation="false" OnClick="ButtonAddNew_Click" />
   
  
<telerik:RadWindowManager ID="RadWindowManager01" Modal="true" runat="server">
        <Windows>
  
         </Windows>
</telerik:RadWindowManager>
  
   
  
 <telerik:RadWindow ID="RadWindowImageEdit"
            InitialBehaviors="Pin"
            Skin="Sitefinity"
            Width="920"
            AutoSize="true"
            AutoSizeBehaviors="Height"
            EnableEmbeddedSkins="false"
            EnableEmbeddedBasestylesheet="false"
            Behaviors= "Close" 
            VisibleTitlebar="true"
            VisibleStatusbar="false"
            KeepInScreenBounds="true"      
            EnableShadow="false"
            VisibleOnPageLoad = "False"
            Modal="true"
            runat="server">
 
    <ContentTemplate>
 
 <div style="width: 867px; padding: 10px;">
 
    <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server">
      
    
            <asp:Panel ID="panel01" runat="server">
                <!--Form part 1 content here -->
                <asp:Button ID="ButtonNext01" Text="Button1" ValidationGroup="vgText" CausesValidation="True" runat="server"
                    OnClick="OnClick_ButtonNext01" />
            </asp:Panel>
 
            <asp:Panel ID="panel02" runat="server">
                <!--Form part 2 content here -->
                <asp:Button ID="Buttonback02" ValidationGroup="vgText" Text="Button2" CausesValidation="True" runat="server"
                    OnClick="OnClick_Buttonback02" />
            </asp:Panel>
 
     
         
        </telerik:RadAjaxPanel>
  </div>
    </ContentTemplate>
</telerik:RadWindow>



Marin Bratanov
Telerik team
 answered on 04 Aug 2011
3 answers
315 views
Dear Sir:
   I have a radgrid with paging for search result, when the user search a large number of record and it take long time to retrieve the data from the stored procedue . In fact, the user normally just look at the first few page in the grid only but they still have suffer the time for get the whole result set from the database. is there anyway/sample to retrieve the record by page and how can i handle the sorting and filtering?

From CH
Radoslav
Telerik team
 answered on 04 Aug 2011
6 answers
409 views
Hi,

I can able to format the cells of the RadGrid.  I want to format footer and group footer based on some condition like in the following code. 
Look at the following code which i format for the cell:
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
        'Is it a GridDataItem  
        If (TypeOf (e.Item) Is GridDataItem) Then  
            'Get the instance of the right type  
            Dim dataBoundItem As GridDataItem = e.Item  
 
            Dim a As New ArrayList  
            a.Add("M9_Sep")  
            a.Add("M10_Oct")  
            a.Add("M11_Nov")  
            a.Add("M12_Dec")  
            a.Add("M1_Jan")  
            a.Add("M2_Feb")  
            a.Add("M3_Mar")  
            a.Add("M4_Apr")  
            a.Add("M5_May")  
 
            For i As Integer = 0 To 8  
                Dim s As Integer = 0 
                Integer.TryParse(dataBoundItem(a(i)).Text, s)  
 
                Select Case s  
                    Case Is > 120  
                        dataBoundItem(a(i)).BackColor = Drawing.Color.Red  
                    Case 90 To 120  
                        dataBoundItem(a(i)).BackColor = Drawing.Color.Green  
                    Case 60 To 89  
                        dataBoundItem(a(i)).BackColor = Drawing.Color.Yellow  
                    Case Is < 60 
                        dataBoundItem(a(i)).BackColor = Drawing.Color.Purple  
                End Select  
            Next  
        End If 

Thanks.

Regards
Syed Arshad

Tsvetina
Telerik team
 answered on 04 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?