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

We have a grid that contains nested rows three levels deep, in the following way:
1. Status
2.    -- Action
3.        -- Role

To add a Role, there is an 'Add Row' button, which contains a dropdown of Roles on a GridDropDownColumn. There is an Insert button and a Close button. This functionality works fine to add a Role, but sometimes the Role name is blank in the row below. It seems to only happen after deleting/inserting roles, particularly if a higher up row is expanded as well.

I'm unable to reproduce the exact steps as it is intermittent, but I was wondering if there are any known issues with nested rows in grids, or if you have any suggestions in how to establish the cause of this?


Regards,
Graeme
Antonio Stoilkov
Telerik team
 answered on 28 Aug 2012
1 answer
111 views

Hi,

I have a radgrid with edit mode = custom edit form in asp.net page.  There are several asp textbox in the FormTemplate. 
I follow the sample in http://www.telerik.com/help/aspnet-ajax/grid-set-focus-on-textboxes-in-edit-control.html to set one of the textbox focus when itemcreated.  However, I found that this the script did not work when I set AllowKeyboardNavigation = true in client setting.  If I set AllowKeyboardNavigation  = false, the textbox can get the foucs when I edit the row.
Below is my coding for the FormTemplate and ClientSetting

<EditFormSettings EditFormType="Template" >  
                   <EditColumn UniqueName="EditColumn" AutoPostBackOnFilter="true"></EditColumn>                     
                   <FormTemplate>
                       <asp:Table ID="EditTable" runat="server" cellspacing="0" cellpadding="0" BorderStyle=None>
                           <asp:TableRow>
                               <asp:TableCell>
                                   <asp:Label ID="lblOrgCode" runat="server" Text="Org. Code" ></asp:Label>
                               </asp:TableCell>
                               <asp:TableCell>
                                   <asp:TextBox ID="txtOrgCode" Text='<%# Bind("OrgCode") %>' runat="server" CssClass="uppercase" TabIndex="1" Readonly='<%#IIf(TypeOf(Container) is GridEditFormInsertItem,"false","true")%>' ></asp:TextBox>
                               </asp:TableCell>
                               <asp:TableCell></asp:TableCell>
                               <asp:TableCell>
                                   <asp:RequiredFieldValidator ID="RequiredFieldValidator1" Runat="server" Display="Dynamic"
                                       ControlToValidate="txtOrgCode" ForeColor="Red"
                                       ErrorMessage="Organization code can not be empty!">
                                   </asp:RequiredFieldValidator>
                                   <asp:CustomValidator ID="CustomValidator1" runat="server" Display="Dynamic"
                                       ControlToValidate="txtOrgCode" ForeColor="Red" OnServerValidate="OrgCode_ServerValidate"
                                       ErrorMessage="Org. code must be less than 100 characters">
                                   </asp:CustomValidator>
                               </asp:TableCell>
                           </asp:TableRow>
                           <asp:TableRow>
                               <asp:TableCell>
                                   <asp:Label ID="lblOrgName" runat="server" Text="Org. Name" ></asp:Label>
                               </asp:TableCell>
                               <asp:TableCell>
                                   <asp:TextBox ID="txtOrgName" Text='<%# Bind("OrgName") %>' runat="server" TabIndex="2" ></asp:TextBox>
                               </asp:TableCell>
                               <asp:TableCell></asp:TableCell>
                               <asp:TableCell>
                                   <asp:RequiredFieldValidator ID="RequiredFieldValidator2" Runat="server" Display="Dynamic"
                                       ControlToValidate="txtOrgName" ForeColor="Red"
                                       ErrorMessage="Organization name can not be empty!">
                                   </asp:RequiredFieldValidator>
                                   <asp:CustomValidator ID="CustomValidator2" runat="server" Display="Dynamic"
                                       ControlToValidate="txtOrgName" ForeColor="Red" OnServerValidate="OrgName_ServerValidate"
                                       ErrorMessage="Org. name must be less than 100 characters">
                                   </asp:CustomValidator>
                               </asp:TableCell>
                           </asp:TableRow>
                           <asp:TableRow>
                               <asp:TableCell>
                                   Creation Date
                               </asp:TableCell>
                               <asp:TableCell>
                                   <asp:TextBox ID="txtCreationDate" Text='<%# Bind("CreationDate") %>' runat="server" ReadOnly="true"> 
                                   </asp:TextBox>
                               </asp:TableCell>
                               <asp:TableCell>
                                     By   
                               </asp:TableCell>
                               <asp:TableCell>
                                   <asp:TextBox ID="txtCreationUser" runat="server" Text='<%# Bind("CreationUser") %>' ReadOnly="true"> 
                                   </asp:TextBox>
                               </asp:TableCell>
                           </asp:TableRow>
                           <asp:TableRow>
                               <asp:TableCell>
                                   Last Change Date   
                               </asp:TableCell>
                               <asp:TableCell>
                                   <asp:TextBox ID="txtLastChangeDate" Text='<%# Bind("LastChangeDate") %>' runat="server" ReadOnly="true"> 
                                   </asp:TextBox>
                               </asp:TableCell>
                               <asp:TableCell>
                                     By   
                               </asp:TableCell>
                               <asp:TableCell>
                                   <asp:TextBox ID="txtLastChangeUser" runat="server" Text='<%# Bind("LastChangeUser") %>' ReadOnly="true"> 
                                   </asp:TextBox>
                               </asp:TableCell>
                           </asp:TableRow>
                       </asp:Table>
                       <asp:Table runat="server">
                           <asp:TableRow>
                               <asp:TableCell HorizontalAlign=Left
                                   <asp:Button ID="Button1" Text='<%#IIf(TypeOf(Container) is GridEditFormInsertItem,"Insert","Update")%>' runat="server" CommandName='<%#IIf(TypeOf(Container) is GridEditFormInsertItem,"PerformInsert","Update")%>' TabIndex="3"> </asp:Button
                                   <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" TabIndex="4"></asp:Button>
                               </asp:TableCell>
                           </asp:TableRow>
                       </asp:Table>
                   </FormTemplate>
               </EditFormSettings>
           </MasterTableView>
           <ClientSettings ReorderColumnsOnClient="True"  AllowColumnsReorder="True" AllowKeyboardNavigation="true" >
               <Selecting AllowRowSelect="True"></Selecting>
               <KeyboardNavigationSettings AllowSubmitOnEnter="true" EnableKeyboardShortcuts="true" AllowActiveRowCycle="true" CollapseDetailTableKey="LeftArrow" ExpandDetailTableKey="RightArrow" />                  
           </ClientSettings>

Below is my coding in setting the textbox focus on ItemCreated event.

If e.Item.IsInEditMode Then
                If TypeOf (e.Item) Is GridEditFormInsertItem Then
                    ControlToFocus = DirectCast(DirectCast(e.Item, GridEditableItem).FindControl("txtOrgCode"), TextBox)
                Else
                    ' Dim lGridEditableItem As GridEditableItem = DirectCast(e.Item, GridEditableItem)
                    ControlToFocus = DirectCast(DirectCast(e.Item, GridEditableItem).FindControl("txtOrgName"), TextBox)
                End If
            End If
 
            If Not ControlToFocus Is Nothing Then
                Dim script As String = [String].Format("$get('{0}').focus(); $get('{0}').select();", ControlToFocus.ClientID)
                RadScriptManager.RegisterStartupScript(Page, GetType(Page), "EditFocusScript", script, True)
 
            End If

Thanks!

Vasil
Telerik team
 answered on 28 Aug 2012
2 answers
85 views

Hi,

We are using the Real Font Sizes for the RadEditor.
When I create new line, RadEditor does not inherit font size to the line.

1. All clear
2. Input any string and set any font size.
3. move cursor to end of the string.
4. Input enter key.

Result:
 <p><span style="font-size: 22px;">testtesttest</span></p>
 <p>&nbsp;</p>

Expected Result:
 <p><span style="font-size: 22px;">testtesttest</span></p>
 <p><span style="font-size: 22px;">&nbsp;</span></p>

If I use the Default Font Size instead of the Real Font Size, the behavior is expected.

Please tell me any workarounds.
Thanks,
Akinori

Rumen
Telerik team
 answered on 28 Aug 2012
1 answer
112 views
I wonder how it is possible to make a filter in real time on a RadGridView

I do not know what event by my textBox to perform so that the filter will

update my RadGrid through just the characters that I'm typing

no more need to go on the bench ... research in itself is showing the list q grid.

- Code that updates my RadGrid -

private void BindToGridAllUsers (string domainIdentity)
         {
             / / Get list of domain users
             List <AllUsersr> listAllUser = (new viewGroups ()). GetAllUser (domainIdentity);

             / / Update the list of users of the grid
             radGridUsers.DataSource = listAllUser;
             radGridUsers.DataBind ();
         }

my code this variable "listAllUser" this taking the existing users and putting in my RadGridView.

I appreciate the help.

Information: Database SQL Server, Visual C # 2010 Ultimate, Telerik components
Eyup
Telerik team
 answered on 28 Aug 2012
8 answers
182 views
I have two problems with anchor tags. First, in preview mode, the full url of the current page is added, so rather than navigate to their targets, they try to open a new editor page. So, a tag like this:

<a href="#top">Return to Top</a>

opens a new window. I found a workaround for this. If you go to preview mode, then switch to html mode, and then back to preview mode, the anchor works properly. Without the back-and-forth, it opens a new window. I was able to reproduce this behavior in the editor demo.

Second, we had a case where the url of the editor page actually got added to the href of a number of anchor tags. I manually cleaned them up, and the problem did not recur (yet...). I can't reproduce it, but it is not the kind of thing a user could have done on purpose. I have asked the user for more info on how this may have happened, so I will post again if I hear anything interesting.

BTW - while researching this problem, I ran into this post (http://www.telerik.com/community/forums/aspnet-ajax/editor/editor-generates-target-and-re-target-properties-in-links.aspx) which discusses a 're-target' attribute being added to anchors. The anchors I cleaned up also had this attribute.
Rumen
Telerik team
 answered on 28 Aug 2012
1 answer
94 views
I built a dynamic tree structure on my web page and this tree has different asp.net and telerik controls (radtextbox checkbox, label..etc) as nodes.
everything works good except when a space button is clicked, I get javascript error saying "null is null or not an object".



Boyan Dimitrov
Telerik team
 answered on 28 Aug 2012
1 answer
118 views
Hello.
I have a problem when I tried to print generated html.
All elements in HTML has top and left attributes and in editor they looks good, but when I tried to print it all pages after first was overlaped.
I attached example pdf (printing result) and screenshot (from two parts) of the editor.
Thanks.

Attached printed pdf
Rumen
Telerik team
 answered on 28 Aug 2012
14 answers
435 views
I've been trying to use radeditor as an email editor and although most of my experience has been smooth I have a couple of issues as below:

a) when using any theme and I have a custom button I cannot get it to display the button normally without a problem with the background. I have added the below to my stylesheet as per the instructions but to no avail:
        .reTool .CRMTemplate<br>        {<br>            background-image: none !important;<br>        }<br>
This is my button definition:
                    <telerik:EditorTool Name="CRMTemplate" ImageUrl="/Images/insertField.png" ShowIcon="false"<br>                        ImageUrlLarge="/Images/insertField.png" Text="Insert CRM Template" Visible="true"<br>                        Enabled="true" ShowText="true" /><br>
The only way I have found to fix this was to add this in my page stylesheet:
        .reButton_text<br>        {<br>            background-image: none !important;<br>        }<br>
I don't know if that's normal behavior or an issue. You can find a sample of the problematic buttons at http://www.dotcy.com.cy/downloads/InvalidButtonBackground.png

b) the second problem I'm facing is with horizontal scrollbars when there is an image in the editor. It appears that automatically the minimum width of the editor becomes the width of the image. Even if I forcefully add a horizontal scrollbar it has no effect. You can find sample images at:
http://www.dotcy.com.cy/downloads/EditorScrollbar1.png and http://www.dotcy.com.cy/downloads/EditorScrollbar2.png

If anyone can help me solve these two issues I'd greatly appreciate it.

It appears issue b) is only occurring with full screen mode but I have to have it at full screen mode. I've been playing with the online demo and got very similar behavior. Please see the 2 attached image files.
Rumen
Telerik team
 answered on 28 Aug 2012
27 answers
886 views
I've got a radGrid that allows in-place editing.   After the user makes changes to the row, and presses the CommandButton.Update button to commit the change, the following error message displays:

Sys.WebForms.PageRequestManagerServerErrorException:  An item with the same key has already been added.

I don't think we were getting this error until we replaced our demo version of Telerik asp.net controls with the purchased version this week. 

Interestingly, the row does in fact get persisted to the database.  However, this error is causing the row to stay in Edit mode.

Anyone else have this problem?  Any suggestions as to what I may be doing wrong?

Thanks!
Eyup
Telerik team
 answered on 28 Aug 2012
4 answers
406 views
If I include jQuery in a RadScriptManager like this (ignore the fact that I'm loading a different version, that just makes the problem easier to spot):

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptCombine="true">
<CompositeScript>
<Scripts>
    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" Path="~/SCRIPTs/jquery-1.8.0.min.js" />
</Scripts>
</CompositeScript>
</telerik:RadScriptManager>

And then add a Telerik control to the page:

<telerik:RadDateTimePicker ID="RadDateTimePicker1" runat="server">
</telerik:RadDateTimePicker>

Then if you search among the files loaded (I used search in the Firebug script tab with the multiple files option ticked - search for 'jquery.org') then you'll see that there are two copies of jQuery loaded - the 1.8.0 one in a ScriptResource.axd file and the 1.7.2 one in a Telerik.Web.UI.WebResource.axd file.

If you turn script combining off then only one version of jQuery is loaded, the 1.8.0 one, however you then of course see about 12 separate script requests.

I'd like to use script combining, but I'd like to only load jquery once, how can I do this?
Dev
Top achievements
Rank 1
 answered on 28 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?