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

I'm trying to change backgroundcolor for a certain day in a timeline. Is that in any way possible? (Look at the attached image for a clearer view of what i'm trying to do).

i want to make the background color gray for that day.


Very grateful for all kind of help.

Regards / Magnus.
Magnus
Top achievements
Rank 1
 answered on 07 Oct 2009
3 answers
163 views
hi i use for test your
ComboBox / Related ComboBoxes exemple
all work perfectly but now i tri tu put in session the value off the 3 combobox
the 1 work perfectly but the other do this message :
System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.

my code :

 

Protected Sub Loadvoiture()

 

Dim connection As SqlConnection = CreateConnection()

 

 

 

Dim adapter As New SqlDataAdapter("SELECT * FROM MAKE ORDER By Make", connection)

 

 

 

Dim dt As New DataTable()

 

 

adapter.Fill(dt)

RadComboBox1.DataTextField =

 

"Make"

 

RadComboBox1.DataValueField =

 

 

"Makecode"

 

 

RadComboBox1.DataSource = dt

RadComboBox1.DataBind()

 

'insert the first item

 

 

RadComboBox1.Items.Insert(0,

New RadComboBoxItem("- Slectionnez une marquent -"))

 

 

End Sub

 

 

Protected Sub LoadModele(ByVal MakecodeID As String)

 

 

 

Dim connection As SqlConnection = CreateConnection()

 

 

 

Dim adapter As New SqlDataAdapter("SELECT * FROM MODEL WHERE Makecode=@Makecode ORDER By Model asc", connection)

 

 

adapter.SelectCommand.Parameters.AddWithValue(

 

"@Makecode", MakecodeID)

 

 

 

Dim dt As New DataTable()

 adapter.Fill(dt)

 

For Each row As DataRow In dt.Rows

 

 

 

Dim item As New RadComboBoxItem()

 

 

 tem.Text = row(

 

"Model").ToString() & " ( " & row("Model_Year_From").ToString() & " - " & row("Model_Year_Till").ToString() & " ) "

 

item.Value = row(

 

 

"ModelCode").ToString()

 

RadComboBox2.Items.Add(item)

 

Next

 

 

 

End Sub

 

 

 

 

 

Protected Sub LoadType(ByVal ModelCodeID As String)

 

Dim connection As SqlConnection = CreateConnection()

 

 

 

Dim adapter As New SqlDataAdapter("SELECT * FROM TYPE WHERE ModelCode=@ModelCode ORDER By ModelCode", connection)

 

 

 adapter.SelectCommand.Parameters.AddWithValue(

 

"@Modelcode", ModelCodeID)

 

 

Dim dt As New DataTable()

 

 

adapter.Fill(dt)

RadComboBox3.DataTextField =

 

"Type"

 

 

RadComboBox3.DataValueField =

"TypeCode"

 

RadComboBox3.DataSource = dt

 

RadComboBox3.DataBind()

 

End Sub

 

 

 

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

'------------------------after this WORK
Session(

"marque") = RadComboBox1.SelectedItem.Text

 

Session(

"marqueID") = RadComboBox1.SelectedItem.Value 


'------------------------after this NOT WORK

 

Session(

"modelev") = RadComboBox2.SelectedItem.Text     

 

Session(

"modelevID") = RadComboBox2.SelectedItem.Value

 

Session(

"typev") = RadComboBox3.SelectedItem.Text

 

Session(

"typevID") = RadComboBox3.SelectedItem.Value

 

  

 

End Sub


this code not work impossible to put the selected value of RadComboBox2 and RadComboBox3 in session
why ? the first RadComboBox1 session work perfectly !

Thanks for you help
casa51
Top achievements
Rank 2
 answered on 07 Oct 2009
1 answer
83 views
Hello,

I am trying to use the panel bar together with the DotNetNuke 4.9, having module caching enabled for the module that contains the PanelBar.

DotNetNuke caches the content of the module (html generated by the module) in a file system, however the PanelBar also adds javascript like 

Sys.Application.add_init(function() { ... }

to the bottom of the page.

Since the javascript is outside of the module content, it does not get cached in a DotNetNuke file and when DNN renders the module from the cache, Javascript is omitted, breaking the functionality.

Is there a way to include the javascript inside of the moduel instead of having it in the end of the page?

Thanks
Peter
Telerik team
 answered on 07 Oct 2009
1 answer
184 views
I want to use a fileupload control in an editable WebUserControl in conjunction with a RadGrid.

I have put everything together, but when I try to upload the file it says.

Index was out of range. Must be non-negative and less than the size of the collection.

This is strange because when copy and paste the code in non-user control (regular aspx page), it works fine.  I have tried the code in the WebUserControl which is called by the RadGrid Parent page, and I have also tried referencing the WebUserControl from within the Parent page, yet the message is the same either way.

Here is the code on my Parent RadGrid page which calls the UserControl with the FileUpload control in it:

protected void RadGrid1_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
        GridEditableItem editedItem = e.Item as GridEditableItem; 
        UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID); 
 
        RadUpload RadUpload1 = userControl.FindControl("RadUpload1") as RadUpload; 
        Repeater repeaterResults = userControl.FindControl("repeaterResults") as Repeater; 
        Label labelNoResults = userControl.FindControl("labelNoResults") as Label; 
 
        string targetFolder = Server.MapPath(RadUpload1.TargetFolder); 
 
        UploadedFile file = RadUpload1.UploadedFiles[0]; 
        string uniqueFileName = System.Guid.NewGuid().ToString(); 
        string targetFileName = Path.Combine(Server.MapPath("~/shared/videos/members"), uniqueFileName + file.GetExtension()); 
        file.SaveAs(targetFileName); 
        //delete unique filename if database insert fails         
 
        if (RadUpload1.UploadedFiles.Count > 0) 
        { 
            repeaterResults.DataSource = RadUpload1.UploadedFiles; 
            repeaterResults.DataBind(); 
            labelNoResults.Visible = false; 
            repeaterResults.Visible = true; 
        } 
        else 
        { 
            labelNoResults.Visible = true; 
            repeaterResults.Visible = false; 
        } 

Iana Tsolova
Telerik team
 answered on 07 Oct 2009
1 answer
70 views
I downloaded and am trying to install the controls but it says "This installation package could not be opened".  I have the latest version of windows installer already.  The log file for the installation is below.  I am running windows XP professional.  I have already read the other forum posts on this topic but nothing was really posted as a solution so can someone help out here?

LOG FILE CONTENTS:

=== Verbose logging started: 10/6/2009  18:25:34  Build type: SHIP UNICODE 4.05.6001.00  Calling process: C:\WINDOWS\System32\msiexec.exe ===
MSI (c) (10:DC) [18:25:34:109]: Resetting cached policy values
MSI (c) (10:DC) [18:25:34:109]: Machine policy value 'Debug' is 0
MSI (c) (10:DC) [18:25:34:109]: ******* RunEngine:
           ******* Product: C:\Documents and Settings\Adam\My Documents\RadControls_for_ASP.NET_AJAX_2009_2_826_trial.msi
           ******* Action:
           ******* CommandLine: **********
MSI (c) (10:DC) [18:25:34:140]: Note: 1: 2203 2: C:\Documents and Settings\Adam\My Documents\RadControls_for_ASP.NET_AJAX_2009_2_826_trial.msi 3: -2147287010
MSI (c) (10:DC) [18:25:34:140]: MainEngineThread is returning 1620
=== Verbose logging stopped: 10/6/2009  18:25:34 ===

 



Thanks.
Missing User
 answered on 07 Oct 2009
4 answers
405 views
The issue is I have some dropdownlists on the grid that map to enumerations.  In each one of these drop down lists, the first choice is always blank - nothing there at all. 

I'm using an objectdatasource with this.

When I use inplace editing or the form that's built for me using template columns, I can select blank and udpate the database with null - not a problem.

However, when I try to use the Template edit mode, I get an error raised in the RaisePostbackEvent method.  It complains that cannot convert a string (the blank in the dropdownlist) to the enumerated type. 

This is going on in the objectdatasource I know, but I'm asking here because you guys seem to be solving this issue someway in non-template editing form mode, or maybe I'm missing something ??? 

Side note: The business object that's being bound exposes 4 different types of enumerated datatypes. They're all nullable types.  I also have logic in the set accessor to handle empty string data that comes in.  However, it appears the ObjectDataSource is doing its own thing creating the object and not using my set accessors. 

Wondering if it's possible to actually grab the business object itself before it creates it and change the fields.  I was able to extract it the objectdatasource's updating event, but that fires after it's already created. 

It's annoying and I dont' understand why it doesn't work in template edit mode. 

Here's the grid: 

 

<telerik:RadGrid ID="RadGrid1"  BorderWidth="0px" runat="server" DataSourceID="odsRules"   
            AllowSorting="True" AllowAutomaticInserts="True" PageSize="10"   
            GridLines="Vertical" AllowAutomaticDeletes="True"   
            AllowAutomaticUpdates="True" Skin="Vista"   
            AutoGenerateColumns="False" onitemdatabound="RadGrid1_ItemDataBound"   
            AllowPaging="True" oninsertcommand="RadGrid1_InsertCommand"   
            onitemcommand="RadGrid1_ItemCommand" oniteminserted="RadGrid1_ItemInserted">  
          
        <MasterTableView DataSourceID="odsRules" CommandItemDisplay="TopAndBottom" DataKeyNames="RuleID, EstimateFormID" Width="900px">   
            <Columns> 
                <telerik:GridEditCommandColumn ButtonType="ImageButton" /> 
                <telerik:GridBoundColumn DataField="RuleID" Visible="False" ReadOnly="true" /> 
                  
                <telerik:GridTemplateColumn DataField="EstimateFormID" Visible="false">  
                    <ItemTemplate> 
                        <asp:Label id="lblEstimateFormID" runat="server" Text='<%# Bind("EstimateFormID") %>'></asp:Label> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
                  
                <telerik:GridTemplateColumn HeaderText="Activity Number" SortExpression="ActivityNumber">  
                    <EditItemTemplate> 
                        <asp:TextBox id="txtActivityNumber" runat="server" Text='<%# Bind("ActivityNumber") %>'></asp:TextBox> 
                    </EditItemTemplate> 
                    <ItemTemplate> 
                        <asp:Label id="lblActivityNumber" runat="server" Text='<%# Bind("ActivityNumber") %>'></asp:Label> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
                  
                <telerik:GridTemplateColumn HeaderText="Abbreviation" SortExpression="Abbreviation">  
                    <EditItemTemplate> 
                        <uc1:AbbreviationList SelectedValue='<%# Bind("Abbreviation") %>' ID="ddlAbbreviation" runat="server" /> 
                    </EditItemTemplate> 
                    <ItemTemplate> 
                        <asp:Label ID="Label1" runat="server" Text='<%# GetValue(DataBinder.Eval(Container.DataItem, "Abbreviation")) %>'></asp:Label> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
                  
                <telerik:GridTemplateColumn HeaderText="Discipline" SortExpression="Discipline">  
                    <EditItemTemplate> 
                        <uc1:DisciplineList SelectedValue='<%# Bind("Discipline") %>' ID="ddlDiscipline" runat="server" /> 
                    </EditItemTemplate> 
                    <ItemTemplate> 
                        <asp:Label ID="lblDiscipline" runat="server" Text='<%# GetValue(DataBinder.Eval(Container.DataItem, "Discipline")) %>'></asp:Label> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
                  
                <telerik:GridTemplateColumn HeaderText="Resource" EditFormColumnIndex="1" SortExpression="Resource">  
                    <EditItemTemplate> 
                        <uc1:ResourceList SelectedValue='<%# Bind("Resource") %>' ID="ddlResource" runat="server" />   
                    </EditItemTemplate> 
                    <ItemTemplate> 
                        <asp:Label ID="lblResource" runat="server" Text='<%# GetValue(DataBinder.Eval(Container.DataItem, "Resource")) %>'></asp:Label> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn>   
                  
                <telerik:GridTemplateColumn HeaderText="Time" EditFormColumnIndex="1" SortExpression="Time">  
                    <EditItemTemplate> 
                        <uc1:TimeList id="timeList" SelectedValue='<%# Bind("Time") %>' runat="server"></uc1:TimeList> 
                    </EditItemTemplate> 
                    <ItemTemplate> 
                        <asp:Label ID="lblTime" runat="server" Text='<%# GetValue(DataBinder.Eval(Container.DataItem, "Time")) %>'></asp:Label> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
                  
                <telerik:GridTemplateColumn HeaderText="Hard Factor" EditFormColumnIndex="1">   
                    <ItemTemplate> 
                        <asp:Label ID="lblHardFactor" runat="server" Text='<%# Bind("HardFactor") %>'></asp:Label> 
                    </ItemTemplate> 
                    <EditItemTemplate> 
                        <asp:TextBox ID="txtHardFactor" runat="server" Text='<%# Bind("HardFactor") %>'></asp:TextBox> 
                    </EditItemTemplate> 
                </telerik:GridTemplateColumn>   
                <telerik:GridButtonColumn ConfirmText="Delete this rule?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />       
 
            </Columns>   
 
        <EditFormSettings EditFormType="AutoGenerated" ColumnNumber="2"  CaptionFormatString="Edit properties of Hard Factor Rule.">  
            <EditColumn ButtonType="ImageButton" UpdateImageUrl="http://demos.telerik.com/aspnet/Grid/Examples/DataEditing/AllEditableColumns/Img/save.gif" EditImageUrl="..\Img\Edit.gif" 
                        InsertImageUrl="http://demos.telerik.com/aspnet/Grid/Examples/DataEditing/AllEditableColumns/Img/save.gif" CancelImageUrl="http://demos.telerik.com/aspnet/Grid/Examples/DataEditing/AllEditableColumns/Img/cancel.gif" InsertText="Insert rule" 
                        UpdateText="Update rule" UniqueName="EditCommandColumn1" CancelText="Cancel rule">  
            </EditColumn> 
              
    
            <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" /> 
            <FormMainTableStyle Width="100%" GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White" /> 
            <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle> 
              
    
            <FormTableItemStyle Wrap="False"></FormTableItemStyle> 
            <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle> 
            <FormTableButtonRowStyle HorizontalAlign="Right"></FormTableButtonRowStyle> 
            <FormTemplate> 
                <span class="EditFormHeader">Edit properties of Hard Factor Rule.</span>==><asp:Label id="lblEditEstimateFormID" runat="server" Text='<%# Bind("EstimateFormID") %>'></asp:Label> 
    
                <br /><br />   
                <table style="width: 900px;">  
                    <tr> 
                        <td style="width:12%;">Activity Number:</td><td><asp:TextBox id="txtActivityNumber" runat="server" Text='<%# Bind("ActivityNumber") %>'></asp:TextBox></td>  
                        <td style="width:12%;">Resource:</td><td><uc1:ResourceList SelectedValue='<%# Bind("Resource") %>' ID="ddlResource" runat="server" /></td>  
                    </tr> 
                    <tr> 
                        <td style="width:12%;">Abbreviation:</td><td><uc1:AbbreviationList SelectedValue='<%# Bind("Abbreviation") %>' ID="ddlAbbreviation" runat="server" /></td>  
                        <td style="width:12%;">Time:</td><td><uc1:TimeList id="timeList" SelectedValue='<%# Bind("Time") %>' runat="server"></uc1:TimeList></td>  
                    </tr> 
                    <tr> 
                        <td style="width:12%;">Discipline:</td><td><uc1:DisciplineList SelectedValue='<%# Bind("Discipline") %>' ID="ddlDiscipline" runat="server" /></td>  
                        <td style="width:12%;">Hard Factor:</td><td><asp:TextBox ID="lblHardFactor" runat="server" Text='<%# Bind("HardFactor") %>'></asp:TextBox></td>  
                    </tr> 
                    <tr> 
                        <td></td><td></td><td></td>  
                        <td align="left">  
                            <asp:ImageButton ID="btnUpdate" ImageUrl='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "http://demos.telerik.com/aspnet/Grid/Examples/DataEditing/AllEditableColumns/Img/save.gif" : "http://demos.telerik.com/aspnet/Grid/Examples/DataEditing/AllEditableColumns/Img/save.gif" %>' runat="server" CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>'></asp:ImageButton>&nbsp;  
                            <asp:ImageButton ID="btnCancel" ImageUrl="http://demos.telerik.com/aspnet/Grid/Examples/DataEditing/AllEditableColumns/Img/cancel.gif" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:ImageButton> 
                        </td> 
                    </tr> 
                </table>   
              
            </FormTemplate> 
        </EditFormSettings> 
     
        <HeaderStyle Width="20px"></HeaderStyle> 
     
        </MasterTableView> 
        <ClientSettings> 
            <Selecting AllowRowSelect="True" /> 
            <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" 
                          OnGridCreated="GridCreated" OnCommand="GridCommand" /> 
        </ClientSettings> 
    </telerik:RadGrid> 

 

 


And the exception: 

[InvalidOperationException: Cannot convert value of parameter 'Time' from 'System.String' to 'Turner.Quickplan.Enums.EstimateTimeType']
   System.Web.UI.WebControls.ObjectDataSourceView.ConvertType(Object value, Type type, String paramName) +378
   System.Web.UI.WebControls.ObjectDataSourceView.BuildObjectValue(Object value, Type destinationType, String paramName) +167
   System.Web.UI.WebControls.ObjectDataSourceView.BuildDataObject(Type dataObjectType, IDictionary inputParameters) +214
   System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +462
   System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +92
   Telerik.Web.UI.GridTableView.PerformUpdate(GridEditableItem editedItem, Boolean suppressRebind) +224
   Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +975
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +134
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridEditFormItem.OnBubbleEvent(Object source, EventArgs e) +299
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +111
   System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +176
   System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   Quickplan.HardFactorPage.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) in C:\QP3\Quickplan\Quickplan\HardFactorPage.aspx.cs:20
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

This happens on edits and inserts when ANY drop down list is blank .... 

Thanks in advace.
 
Nikolay Rusev
Telerik team
 answered on 07 Oct 2009
1 answer
83 views
Hi community,

I had a simple question. Is it possible to retrieve a RadComboBox control (or any other control)
from the <EditItemTemplate> of a GridTemplateColumn when the Grid is
NOT in Edit Mode?


Or To Explain Further if necessary:

The issue is that I am importing from an excel spreadsheet into a grid. One of the grids
has a <GridTemplateColumn> with a Label control in the <ItemTemplate>
and a RadComboBox in the <EditItemTempalte>. The 'DataTextField' of the combo
box is something like 'product_name', the 'DataValueField' is something like 'product_id'.

code:

 

<telerik:GridTemplateColumn HeaderText="Product" UniqueName="prodDropDown">

 

<EditItemTemplate>

 

<telerik:RadComboBox ID="prodDropDown"

 

DataSourceId="prodDataSource"

 

DataTextField="prod_name"

 

DataValueField="prod_id"

 

Visible="true" runat="server" />

 

</EditItemTemplate>

 

<ItemTemplate>

 

 

 

<asp:Label ID="prodDropDownLbl" runat="server" Text='<%# Eval("prod_name") %>'></asp:Label>

 

</ItemTemplate>

 

</telerik:GridTemplateColumn>

 

 



The problem is that the user only knows the 'product_name' values so that's what they put
in the spreadsheet.

After they do the import, a grid appears with all the data (for review purposes) along with a 'Commit To Database' button.
I am using 'GridTemplateColumn ' because I am trying to display the value of 'Product' to the user as just a 'Label' as opposed to a 'RadComboBox' control.

The problem is I need to get at the <EditItemTemplate> part to set the product_id after the Excel is imported.
So far I haven't been able to get the combo box control unless the grid is in edit mode.

If anybody could help, it would be appreciated. Thanks!
Iana Tsolova
Telerik team
 answered on 07 Oct 2009
6 answers
113 views
i have a RadComboBox and some TextBoxes in a UserControl that i use this UserControl as UserControlEditFrom in a Radgrid ,
when i go to edit mode from grid i need to bind the my combo box to own current value from DataBase,
in same cases about text boxes i use this code (like your example here : http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx ) to bind text property of my text box :

<asp:TextBox Text=<%# DataBinder.Eval( Container, "DataItem.Title" ) %> ID="TextBoxTitle" runat="server"></asp:TextBox>

but about my combo box !!!!!!!!!!! what shoud i do ?

i search your example (http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx ) but you dont use any line of code to bind combo but it work when i test your sample by editing different row of grid !!!!!!!!
what you do ? and what does it work ?

it is a part of your code front of your project that i think in the bold line you should have use anything to bind combo like textboxes :

<tr>
                    <td>Birth Date:</td>
                    <td>
<asp:TextBox id="TextBox11" runat="server"
Text='<%# DataBinder.Eval( Container, "DataItem.BirthDate") %>'
                         tabIndex=4>
                        </asp:textbox></td>
                </tr>
                <tr>
                    <td>Title Of Courtesy</td>
                    <td>
                        <asp:dropdownlist id="ddlTOC" runat="server" tabindex="7"></asp:dropdownlist></td>
                </tr>
            </table>
        </td>
        <td>
amir sherafatian
Top achievements
Rank 1
 answered on 07 Oct 2009
3 answers
388 views
I just want to show the RadAjaxLoadingPanel with client side and not used AJAX , just like a loop in javascript, I have tried the follows method, but did not worked.

function Test() { 
                var currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>"); 
                currentLoadingPanel.show("<%= Panel1.ClientID %>"); 
                for (var i = 0; i < 1000; i++) { 
                     //test code ... 
                } 
                currentLoadingPanel.hide("<%= Panel1.ClientID %>"); 
            }   

Does the RadAjaxLoadingPanel support this ? or only can used with AJAX ?

Thanks!


Dimo
Telerik team
 answered on 07 Oct 2009
3 answers
158 views
Dear telerik,

We notice some differences when we enable SaveScrollPosition and AllowKeyBoardNavigation between IE8 and Chrome (RadGrid Version Q12009).

We were able to isolate the problem in a single grid defined as follows in a default.aspx page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ 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 runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form runat="server" id="mainForm" method="post" style="width: 100%;">  
    <telerik:RadScriptManager ID="RadScriptManager" runat="server">  
    </telerik:RadScriptManager> 
    <telerik:RadCodeBlock ID="codeBlock" runat="server">  
        <script type="text/javascript">  
            function GridCreated(sender, args) {  
                var row = sender.get_masterTableView().get_selectedItems()[0];  
                if (row) sender.set_activeRow(row.get_element())  
                sender.Control.focus();  
            }  
            function GridRowSelected(sender, args) {  
                if (sender.get_masterTableView().get_selectedItems().length == 1) {  
                    var oldBehaviour = Telerik.Web.UI.Grid.ScrollIntoView;  
                    Telerik.Web.UI.Grid.ScrollIntoView = function() { };  
                    sender.set_activeRow($get(args.get_id()));  
                    Telerik.Web.UI.Grid.ScrollIntoView = oldBehaviour;  
                }  
            }  
        </script> 
    </telerik:RadCodeBlock> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">  
    </telerik:RadAjaxManager>   
    <telerik:RadGrid ID="RadGrid1" 
        DataSourceID="SqlDataSource1" 
        AllowAutomaticDeletes="false" 
        AllowAutomaticInserts="false" 
        AllowAutomaticUpdates="false" 
        AutoGenerateColumns="false" 
        EnableViewState="true" 
        AllowMultiRowSelection="true" 
        ShowGroupPanel="true" 
        AllowFilteringByColumn="true" 
        AllowPaging="true" 
        PageSize="50" 
        Skin="Office2007" 
        runat="server">  
        <PagerStyle Mode="NextPrev" /> 
        <GroupingSettings CaseSensitive="false" ShowUnGroupButton="true" /> 
        <ClientSettings AllowColumnsReorder="true" AllowDragToGroup="true" AllowGroupExpandCollapse="true" AllowKeyboardNavigation="true">  
            <ClientEvents OnGridCreated="GridCreated" OnRowSelected="GridRowSelected" /> 
            <Resizing AllowColumnResize="true" ClipCellContentOnResize="true" EnableRealTimeResize="true" ResizeGridOnColumnResize="true" /> 
            <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" /> 
            <Scrolling AllowScroll="true" SaveScrollPosition="true" ScrollHeight="300px" UseStaticHeaders="true" /> 
        </ClientSettings> 
        <MasterTableView   
            AllowSorting="true" 
            EnableColumnsViewState="false" 
            GroupLoadMode="Server" 
            CommandItemDisplay="None" 
            DataSourceID="SqlDataSource1"   
            DataKeyNames="uid" 
            ClientDataKeyNames="uid">  
            <Columns> 
                <telerik:GridBoundColumn DataField="uid" HeaderText="uid" UniqueName="uid" 
                    SortExpression="uid" ReadOnly="True">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" UniqueName="CompanyName" 
                    SortExpression="CompanyName">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Country" HeaderText="Country" UniqueName="Country" 
                    SortExpression="Country">  
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
    </telerik:RadGrid> 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Nwind.mdb;Persist Security Info=True" 
        SelectCommand="SELECT TOP 1000 CustomerID AS uid, CompanyName, Country FROM Customers order by CustomerID;"   
        ProviderName="System.Data.OleDb">  
    </asp:SqlDataSource> 
    <br /> 
    <asp:Button ID="Button1" Text="Post Back" runat="server" /> 
    </form> 
</body> 
</html> 
 

1) Open the above page in IE 8
2) Start scrolling using the keyboard down arrow.
    It works fine till the active row reaches the last visible line in the grid (in this case Customer ID=CACTU)
3) Press the down arrow again, the active row changes, but the grid does not scroll. I.e. the active row remains hidden (Why?)
4) Press the down arrow 5 more times till you active the Customer=DUMON (you have to manually move the vertical scroll bar to view the active row)
5) Make sure the active row is not the last visible row
6) Press the Post Back button, the grid will reposition itself exactly where it was, i.e. the SaveScrollPosition works under IE (Correct).

Now, lets repeat the same under Chrome (latest version)

1) Open the above page in Google Chrome
2) Start scrolling using the keyboard down arrow.
    It works fine till the active row reaches the last visible line in the grid (in this case Customer ID=CACTU)
3) Press the down arrow again, the active row changes, and the grid scrolls fine making the active row visible (Correct)
4) Press the down arrow 5 more times till you active the Customer=DUMON
5) Make sure the active row is not the last visible row (by moving the vertical scroll bar)
6) Press the Post Back button, the grid will reposition itself but without respecting the scroll postion placing the last active row CustomerID=DUMON as the last visible row, i.e. the SaveScrollPosition does not work under Chrome (Why?).

Please help us solve this bug.

Regards
Salah A. Malaeb
TeknoBuild
Pavel
Telerik team
 answered on 07 Oct 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?