Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
159 views
I have a ListView that contains a list of images.On image click i open a Radwindow:
<telerik:RadWindow runat="server" ID="Details"  NavigateUrl="hcitempage.aspx" Title=""   VisibleStatusbar="false" 
                  Width="660px" Height="450px"  AutoSize="false" Behaviors="Close" ShowContentDuringLoad="false" CssClass="rwLoading"  ReloadOnShow="true"
                  Modal="true"   OnClientClose ="OnClientClose"  > 
              </telerik:RadWindow>

And in my window i am placing at the left a vertical rotator I have the following code :
<form id="form1" runat="server" >
 <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <script type="text/javascript">
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                return oWindow;
            }
  
            function Close() {
                GetRadWindow().close();
            }
  
              
        </script>
  
  <div >
    <table >
  <tr valign="top" >
    <td >
    <table>
     
    <tr>
     
  <td style="width:50%;border:solid  1px #E4E4E4;font-family:Tahoma; font-size:10pt;"  valign="top">
    
    
    
   
      <asp:Label ID="Name" runat="server" Font-Size="12pt" style="color: #344850;" Font-Bold="true" ></asp:Label><br />
        <asp:Label ID="l1" runat="server" text="Price:" ></asp:Label>  
        <asp:Label ID="Price" runat="server" ></asp:Label><br />
        <br />
       
     <asp:Label ID="l3" runat="server" Text="quantity:"></asp:Label><br />
      <asp:TextBox ID="qty" runat="server" Text="1" Width="92px"></asp:TextBox> <br />
      <br />
      <asp:Label ID="Label3" runat="server" Text="Size:"></asp:Label><br />  <asp:DropDownList ID="SizeList" runat="server">
       
           </asp:DropDownList>
        
                
         <br />
      <br />
             
     <asp:Label ID="Label2" runat="server" Text="Color:"></asp:Label><br /> <asp:DropDownList ID="colorList" runat="server"  >
       
           </asp:DropDownList>
      <asp:Label ID="details" runat="server" Text=""></asp:Label>
           
            
     
           
         <br />
   
       
           
            
     
           
         <br />
      <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="add-button.png"    
           /> 
      <asp:Button ID="Button1" runat="server" Text="close" Visible="false" 
          onclientclick="Close()"  />
       
  </td>
   <td valign="top" align="center" class="style1" >      <a   class="jqzoom" id="zoomed" runat="server"  ><img id ="small" runat="server"  height="225" width="250" style="border:none;"/></a>
        
        
    
  <asp:ImageButton ID="zoom" runat="server" ImageUrl="graphics/zoom.png" /> 
      
</td>
<td style="width:20%;" valign="top" align="center"  >
  <div dir="ltr" >   
                   <table>
                                            <tr >
                                              
                                             <td ><img  style="position:static;"  id="rrButtonLeft1" alt=""  src="rotator/rotator_left_01.png"  /></td></tr>
                                           <tr >   <td >                                             <telerik:RadRotator ID="RadRotator1" runat="server" Height="200px" Width="30px" ScrollDirection="Up" Skin=""
                                                               RotatorType="ButtonsOver" ItemHeight="30px" ItemWidth="30px"
                                                                DataSourceID="XmlDataSource1"  ScrollDuration="350"
                                                                FrameDuration="800">
                                                                <ItemTemplate>
                                                                                                                                                        <img align="center" border="0" height="20" hspace="0" src='<%# XPath("src") %>' width="20" onclick="<%# XPath("link") %>"  />
                                                                                                                                                    </ItemTemplate>
                                                              <ControlButtons LeftButtonID="rrButtonLeft1" RightButtonID="rrButtonRight1" />
                                                </telerik:RadRotator></td></tr>
                                             <tr > <td ><img  style="position:static;"  id="rrButtonRight1" alt=""   src="rotator/rotator_righ_01.png"   /></td>
                                            </tr></table>
                                                 </div>
                                                         
</td>
   </tr>
    </table>
    </td>
    </tr>
 </table>
   </div>
    </form>


My problem is that the window horizontal scroll appears when i have a vertical rotator even though it's width and item's width are very small as u can see in the image attached.. When i remove the rotator the window displays correctly without vertical scroll and when i put instead of the rotator a list of images with width and height 20 px also no vertical scroll..Is that a bug or am i missing something?
Pero
Telerik team
 answered on 21 Jul 2010
2 answers
137 views
I have a Master and detail section in the hierarchy radgrid. I have Radgrid1_SortCommand firing when i click on the Detail Column but i am getting the FieldName in the GridSortExpression as Empty. Could some one shed a light on this please.
Pavlina
Telerik team
 answered on 21 Jul 2010
3 answers
201 views
Hi Guys,

Don't know if it's me, but I can't find the client-side data binding features (as per RadGrid).  My understanding was that RadListView was a more adaptive method for binding data (as per the videos I have seen).  Can you provide me an update or better still an example of this working.

Thks, David
Rosen
Telerik team
 answered on 21 Jul 2010
1 answer
119 views

We created the follow RadWindowManager

<telerik:RadWindowManager
    ID="RadWindowManagerDefault"
    runat="server"
    KeepInScreenBounds="false"
    Width="950px"
    Height="2048px"
    Skin="Office2007"
    RestrictionZoneID="janelas">
</telerik:RadWindowManager>

and, on Page_Load we create the RadWindow components:

int i = 0;
foreach (EstadoWidgetResp widget in lista)
{
    radw = new RadWindow();
    radw.ID = "widget-" + widget.IdControle;
    radw.Title = widget.Title;
    radw.ShowContentDuringLoad = true;
    RadWindowManagerDefault.Windows.Add(radw);
    i++;
}

the page contains a DIV element as restricted zone for the windows:

<div id="janelas">       
</div>

but, when we look at the rendered HTML (using FireBug extension), whe found:

[html]
[head contents]
[body]
    <form id="aspnetForm" action="Default.aspx" method="post" name="aspnetForm">
[DIV of #1 window (RadWindowWrapper_ctl00_)]
[DIV of #2 window (RadWindowWrapper_ctl00_)]
...
[DIV of #n window (RadWindowWrapper_ctl00_)]
[body page]
<div id="janelas">[RadWindowManager element]</div>
[end of html]

So, when we resize the browser window, the RadWindows still fixed, but, as a DIV element the 'expected' behaviour was: the RadWindow moves with the DIV (id="janelas") because, we expected that the RadWindows render was insed of restricted zone element.

Can we render the RadWindows inside the DIV[id="jalelas"] element ?

Thanks in advance,
André

Georgi Tunev
Telerik team
 answered on 21 Jul 2010
1 answer
86 views
Hi

I have developed 5 level grid using Ajax Grid. I had set various properties of parent table grid like

 

 

AutoGenerateEditColumn="True"

 

 

 

AutoGenerateHierarchy="True"

 


When I click on Edit button of parent grid, It d'nt load the data I need to again refresh the page. This problem is only with parent table grid, all other child table grid working fine, their is no issue with them.

I using asp.net ajax 2009 q3 2009 sp2 with vs 2010.

Thanks  

Pavlina
Telerik team
 answered on 21 Jul 2010
2 answers
210 views
Hi, I would like to have a filter for only two out of my three columns. My code is as follows
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" EnableAJAX="true" LoadingPanelID="RadAjaxLoadingPanel1" ClientEvents-OnRequestStart="onRequestStart" >
        <telerik:RadGrid ID="gridUsers" DataSourceID="srcUsers" runat="server" AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true" PageSize="10" AutoGenerateColumns="false">
            <GroupingSettings CaseSensitive="false" />
            <HeaderStyle Font-Bold="true" />
            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" Visible="true" EnableSEOPaging="true"/>
            <MasterTableView CommandItemDisplay="Top" AllowNaturalSort="false" DataKeyNames="distinguishedName">
                <CommandItemSettings RefreshImageUrl="~/images/refresh_button.gif" ShowExportToWordButton="false" ShowExportToExcelButton="false" ShowExportToCsvButton="true" ShowExportToPdfButton="false" ExportToWordText="" ExportToExcelText="" ExportToCsvtext="" ExportToPdfText="" ExportToWordImageUrl="~/images/export_to_doc.gif" ExportToExcelImageUrl="~/images/export_to_xls.gif" ExportToCsvImageUrl="~/images/export_to_csv.gif" ExportToPdfImageUrl="~/images/export_to_pdf.gif" />
                 
                <Columns>
                    <telerik:GridHyperLinkColumn HeaderText="Edit"  DataNavigateUrlFormatString="EditUser.aspx?user={0}" DataNavigateUrlFields="objectGUID" UniqueName="link" ShowFilterIcon="false"/>
                    <telerik:GridBoundColumn HeaderText="First Name" UniqueName="givenName" DataField="givenName" FilterListOptions="VaryByDataType" FilterImageUrl="~/images/filter_icon.gif" />
                    <telerik:GridBoundColumn HeaderText="Last Name" ItemStyle-Width="100%" HeaderStyle-Width="100%" UniqueName="sn" DataField="sn" FilterListOptions="VaryByDataType" FilterImageUrl="~/images/filter_icon.gif" />
                    <telerik:GridBoundColumn HeaderText="Created" ItemStyle-Wrap="false" UniqueName="whencreated" DataField="whencreated" FilterListOptions="VaryByDataType" FilterImageUrl="~/images/filter_icon.gif" />
                    <telerik:GridBoundColumn HeaderText="distinguishedName" UniqueName="distinguishedName" DataField="distinguishedName" Visible="false" FilterListOptions="VaryByDataType" FilterImageUrl="~/images/filter_icon.gif" />
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </telerik:RadAjaxPanel>

Where the gridHyperLinkColumn is edit icon that simply opens up a new page for the user to use an edit form. However, there is a filter text box above this column and I would not like it there.

Please help!
Trevor
Top achievements
Rank 1
 answered on 21 Jul 2010
3 answers
286 views
I'm using the latest version of Telerik Editor in my website and there is a problem with Editor word count.
I wrote a document in MS word and did a word count and it shows
words 280,
Characters ( no spaces) 1950 
Characters ( with spaces) 2229

I did a select all and copied the text as plain text in Telerik Editor and it gave me 
Words: 280 Characters: 2237  .
I have attached some screen shots also.
One of the screen shot is from the demo on the website ( just trying to make it sure that it's not the version problem )

var editorList = new Object();
var editorLengthArray = [20, 30];
var counter = 0;
AlreadyAlerted = false;
 
function isAlphaNumericKey(keyCode) {
    if ((keyCode > 47 && keyCode < 58) || (keyCode > 64 && keyCode < 91)) {
        return true;
    }
    return false;
}
 
function LimitCharacters(editor) {
     
    var style = editor.get_contentArea().style;
    style.backgroundImage = "none";
    style.backgroundColor = "white";
     
    editorList[editor.get_id()] = editorLengthArray[counter];
    counter++;
 
    editor.attachEventHandler("onkeydown", function(e) {
        var content = editor.get_text().trim(); //returns the editor's content as plain text
        var words = 0;
        if (content) {
            var punctRegX = /[!\.?;,:&_\-\-\{\}\[\]\(\)~#'"]/g;
            var contentcontent = content.replace(punctRegX, "");
            var trimRegX = /(^\s+)|(\s+$)/g;
            contentcontent = content.replace(trimRegX, "");
            if (content) {
                splitRegX = /\s+/;
                var array = content.split(splitRegX);
                words = array.length;
            }
        }
        var counter = $get("counter");
        counter.innerHTML = "Words: " + words + " Characters: " + content.length + "   <b>(Maximum character length is 2500)</b>";
        e = (e == null) ? window.event : e;
        if (isAlphaNumericKey(e.keyCode)) {
 
            var maxTextLength = 2500;
 
            textLength = editor.get_text().length;
            if (textLength >= maxTextLength) {
                alert('You have exceeded the maximun character count of 2500.');
                //alert('1');
                AlreadyAlerted = true;
                e.returnValue = false;
            }
        }
    });
} 
 
function CalculateLength(editor, value) {
    var textLength = editor.get_text().length;
    var clipboardLength = value.length;
    textLength += clipboardLength;
    return textLength;
}
 
 
function ClientExecuteCommand(editor, args) {
    
        var commandName = args.get_commandName();
        var value = args.get_value();
        if (commandName == "PastePlainText" || commandName == "Paste") {
            var textLength = CalculateLength(editor, value);
            if (textLength >= 2500) {
                if (!AlreadyAlerted) {
                    alert("You have exceeded the maximun character count of 2500.");
                    }
                AlreadyAlerted = false;
                args.set_cancel(true);
 
        }
    }
}
<telerik:RadEditor ID="RadEditor1" runat="server" SkinID="" Width="100%" SpellCheckSettings-AllowAddCustom="false"  ToolsFile="../TelerikRichEditControl/ToolsFile.xml" OnClientPasteHtml="ClientExecuteCommand" Skin="Office2007" Height="300" EditModes="Design" OnClientLoad="LimitCharacters">
 
</telerik:RadEditor><span id="counter">


Really appreciate your help.
Roomi
Dobromir
Telerik team
 answered on 21 Jul 2010
1 answer
138 views
Hi,

In the EditFormTemplate or default (out-of-the-box) form, when I use the combobox with

SelectedValue

then I got the error but if I remove it then it's fine but then no item is selected.

<telerik:RadComboBox runat="server" ID="RadComboBox2" DataTextField="StateName" DataValueField="ID"
    HighlightTemplatedItems="true" Height="190px" Width="220px" DropDownWidth="420px"
    DataSourceID="sdsStates" SelectedValue='<%#Bind("ID") %>' EnableAutomaticLoadOnDemand="true"
    ItemsPerRequest="10" ShowMoreResultsBox="true" EnableVirtualScrolling="true">
    <HeaderTemplate>
        <ul>
            <li class="col1">State Name</li>
            <li class="col1">Country</li>
        </ul>
    </HeaderTemplate>
    <ItemTemplate>
        <ul>
            <li class="col1"><%# DataBinder.Eval(Container.DataItem, "StateName")%></li>
            <li class="col1"><%# DataBinder.Eval(Container.DataItem, "countryabrv")%></li>
        </ul>
    </ItemTemplate>
</telerik:RadComboBox>
Mira
Telerik team
 answered on 21 Jul 2010
2 answers
186 views
I have implemented a radmenu on my webpage. However when the client hovers over the menu the cursor stays as a pointer and we want it to display the default hand cursor (hover icon).

Is there an easy way to do this? Thanks.
josephjijo
Top achievements
Rank 1
 answered on 21 Jul 2010
1 answer
227 views
I have a grid that I have to be missing something really simple, but after hours, I am asking for some help.  The code is attached.  If I edit a grid line and update, it doesn't save the results.  It appears if the save function is working because I can hard code the key in the table I am editing, and the results save.  If I remove it and add a ?, it won't save.  On the grid1_ItemUpdated event, if I place the following, the correct key comes back.  So, something is not getting passed to the datasource.  I am JUST working on the update.  I don't anticipate the delete or insert to function correctly.  I have a FormView to a datasource and it works fine.  Thanks!

Dim strID As String = e.Item.GetDataKeyValue("ID").ToString()
Response.Write(strID)

So the event has the correct key, but the datasource doesn't not get it.  Can somebody take a look for me and tell me what I am missing?
Grid:
    
     <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="AccessDataSource2"
        GridLines="None" AutoGenerateDeleteColumn="True"
        AutoGenerateEditColumn="True" AllowAutomaticDeletes="True"
        AllowAutomaticUpdates="True" AllowAutomaticInserts="True"
        AutoGenerateColumns="False" Width="690">
<MasterTableView DataKeyNames="ID" CommandItemDisplay="TopAndBottom"
            DataSourceID="AccessDataSource2" EditMode="EditForms">

<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
    <Columns>
        <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID"
            ReadOnly="True" SortExpression="ID" UniqueName="ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Address" HeaderText="Address"
            SortExpression="Address" UniqueName="Address">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="FirstName" HeaderText="FirstName"
            SortExpression="FirstName" UniqueName="FirstName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LastName" HeaderText="LastName"
            SortExpression="LastName" UniqueName="LastName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Email" HeaderText="Email"
            SortExpression="Email" UniqueName="Email">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Company" HeaderText="Company"
            SortExpression="Company" UniqueName="Company">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="JobFunction" HeaderText="JobFunction"
            SortExpression="JobFunction" UniqueName="JobFunction">
        </telerik:GridBoundColumn>
        <telerik:GridCheckBoxColumn DataField="Resident" DataType="System.Boolean"
            HeaderText="Resident" SortExpression="Resident" UniqueName="Resident">
        </telerik:GridCheckBoxColumn>
        <telerik:GridCheckBoxColumn DataField="Owner" DataType="System.Boolean"
            HeaderText="Owner" SortExpression="Owner" UniqueName="Owner">
        </telerik:GridCheckBoxColumn>
    </Columns>
</MasterTableView>
    </telerik:RadGrid>


DataSource:
    <asp:AccessDataSource ID="AccessDataSource2" runat="server"
        DataFile="~/App_Data/HomeOwners.mdb"
        SelectCommand="SELECT * FROM [tblResidents] WHERE ([Address] = ?) ORDER BY [FirstName]"
        ConflictDetection="CompareAllValues"
        DeleteCommand="DELETE FROM [tblResidents] WHERE [ID] = ? AND (([Address] = ?) OR ([Address] IS NULL AND ? IS NULL)) AND (([FirstName] = ?) OR ([FirstName] IS NULL AND ? IS NULL)) AND (([LastName] = ?) OR ([LastName] IS NULL AND ? IS NULL)) AND (([Email] = ?) OR ([Email] IS NULL AND ? IS NULL)) AND (([Company] = ?) OR ([Company] IS NULL AND ? IS NULL)) AND (([JobFunction] = ?) OR ([JobFunction] IS NULL AND ? IS NULL)) AND [Resident] = ? AND [Owner] = ?"
        InsertCommand="INSERT INTO [tblResidents] ([ID], [Address], [FirstName], [LastName], [Email], [Company], [JobFunction], [Resident], [Owner]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"
        UpdateCommand="UPDATE [tblResidents] SET [FirstName] = ?, [LastName] = ?, [Email] = ?, [Company] = ?, [JobFunction] = ?, [Resident] = ?, [Owner] = ? WHERE [ID] = ?">
        <DeleteParameters>
            <asp:Parameter Name="original_ID" Type="Int32" />
            <asp:Parameter Name="original_Address" Type="String" />
            <asp:Parameter Name="original_Address" Type="String" />
            <asp:Parameter Name="original_FirstName" Type="String" />
            <asp:Parameter Name="original_FirstName" Type="String" />
            <asp:Parameter Name="original_LastName" Type="String" />
            <asp:Parameter Name="original_LastName" Type="String" />
            <asp:Parameter Name="original_Email" Type="String" />
            <asp:Parameter Name="original_Email" Type="String" />
            <asp:Parameter Name="original_Company" Type="String" />
            <asp:Parameter Name="original_Company" Type="String" />
            <asp:Parameter Name="original_JobFunction" Type="String" />
            <asp:Parameter Name="original_JobFunction" Type="String" />
            <asp:Parameter Name="original_Resident" Type="Boolean" />
            <asp:Parameter Name="original_Owner" Type="Boolean" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="ID" Type="Int32" />
            <asp:Parameter Name="Address" Type="String" />
            <asp:Parameter Name="FirstName" Type="String" />
            <asp:Parameter Name="LastName" Type="String" />
            <asp:Parameter Name="Email" Type="String" />
            <asp:Parameter Name="Company" Type="String" />
            <asp:Parameter Name="JobFunction" Type="String" />
            <asp:Parameter Name="Resident" Type="Boolean" />
            <asp:Parameter Name="Owner" Type="Boolean" />
        </InsertParameters>
        <SelectParameters>
            <asp:SessionParameter Name="Address" SessionField="Address" Type="String" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="FirstName" Type="String" />
            <asp:Parameter Name="LastName" Type="String" />
            <asp:Parameter Name="Email" Type="String" />
            <asp:Parameter Name="Company" Type="String" />
            <asp:Parameter Name="JobFunction" Type="String" />
            <asp:Parameter Name="Resident" Type="Boolean" />
            <asp:Parameter Name="Owner" Type="Boolean" />
            <asp:Parameter Name="ID" Type="Int32" />
        </UpdateParameters>
    </asp:AccessDataSource>
Pavlina
Telerik team
 answered on 21 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?