Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
60 views

the folowing is my drag and drop code behind but the problem is that every row drags and drops and works except for the last row in the grid.  Is there something I need to change or do differnetly to get the last row to drag and drop.

Protected Sub myGridPErsonnel_RowDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDragDropEventArgs) Handles myGridPErsonnel.RowDrop
      If e.DestDataItem.OwnerTableView.ClientID = myGridPositions.MasterTableView.ClientID Then
          For i As Integer = 0 To e.DraggedItems.Count - 1
              Dim SSN As String = e.DraggedItems(i).GetDataKeyValue("SSN")
              Dim PositionId As Integer = e.DestDataItem.GetDataKeyValue("intPositionId")
              HFSSN.Value = SSN
              HFPosition.Value = PositionId
              FillInfo(SSN, PositionId)
              pnlPersonnelInfo_POP.Show()
          Next
      End If
  End Sub
Maria Ilieva
Telerik team
 answered on 11 Aug 2011
3 answers
214 views
Hi!

I'm trying to speed up performance in a User Control Edit Form used to edit items from a main grid.  Currently, the custom edit form opens in 3-5 seconds.  I've isolated the problem to a grid on the edit form which contains four RadNumericTextBox editors in each row.  If I remove these, the form opens and closes in less than a second.

I followed guidance on these forums to replace the RadNumericTextBoxes with asp:TextBox and use a RadInputManager to validate the input.  In the grid's ItemCreated event, I assign each TextBox to the RadInputManager's control collection.  The problem is, the controls in the grid rows don't seem to pick up any of the validation.  I even added a test TextBox on the form to verify that the input manager was configured correctly.

The grid columns are defined like this (I changed two of the four to TextBox for testing):

<telerik:GridTemplateColumn HeaderStyle-Width="100" HeaderText="Min Distance" UniqueName="MinDistance">
     <ItemTemplate>
         <telerik:RadNumericTextBox ID="rntbMinDistance" Type="Number" MinValue="0" MaxLength="4"
             NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" Width="40" DbValue='<%# Eval("MinDistanceToLocation") %>'
             Enabled='<%# Eval("IsIncludedInOrder") %>' runat="server" />
     </ItemTemplate>
 </telerik:GridTemplateColumn>
 <telerik:GridTemplateColumn HeaderStyle-Width="100" HeaderText="Max Distance" UniqueName="MaxDistance">
     <ItemTemplate>
         <telerik:RadNumericTextBox ID="rntbMaxDistance" Type="Number" MinValue="0" MaxLength="4"
             NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" Width="40" DbValue='<%# Eval("MaxDistanceToLocation") %>'
             Enabled='<%# Eval("IsIncludedInOrder") %>' runat="server" />
     </ItemTemplate>
 </telerik:GridTemplateColumn>
 <telerik:GridTemplateColumn HeaderStyle-Width="100" HeaderText="Min HSGY" UniqueName="MinHSGY">
     <ItemTemplate>
         <asp:TextBox ID="txtMinHSGY" Type="Number" Width="40" Text='<%# Eval("MinHighSchoolGraduationYear") %>'
              runat="server" />
     </ItemTemplate>
 </telerik:GridTemplateColumn>
 <telerik:GridTemplateColumn HeaderStyle-Width="100" HeaderText="Max HSGY" UniqueName="MaxHSGY">
     <ItemTemplate>
         <asp:TextBox ID="txtMaxHSGY" Type="Number" Width="40" Text='<%# Eval("MaxHighSchoolGraduationYear") %>'
              runat="server" />
     </ItemTemplate>
 </telerik:GridTemplateColumn>


I defined the input manager as follows: 

<telerik:RadInputManager ID="RadInputManager1" runat="server" >
    <telerik:NumericTextBoxSetting BehaviorID="hsgyBehavior" InitializeOnClient="false"
        ErrorMessage="Valid year is required" Type="Number" DecimalDigits="0" MinValue="1900"
        MaxValue="2099" >
        <TargetControls>
            <telerik:TargetInput ControlID="txtTest" />
        </TargetControls>
    </telerik:NumericTextBoxSetting>
</telerik:RadInputManager>


And finally, I added this handler to the grid: 

protected void rgrdLocations_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem && e.Item.IsDataBound && e.Item.DataItem != null)
    {
        NumericTextBoxSetting hsgySetting = (NumericTextBoxSetting)RadInputManager1.GetSettingByBehaviorID("hsgyBehavior");
         
        TextBox txtMinHSGY = e.Item.FindControl("txtMinHSGY") as TextBox;
        TextBox txtMaxHSGY = e.Item.FindControl("txtMaxHSGY") as TextBox;
        hsgySetting.TargetControls.Add(new TargetInput(txtMinHSGY.UniqueID, true));
        hsgySetting.TargetControls.Add(new TargetInput(txtMaxHSGY.UniqueID, true));
    }
}

txtTest validates as expected, but the textBoxes in the grid do not.  What am I missing?

I'm new to Telerik and new to web development, so I apologize if it's something obvious.

Thanks,

Drew
Tsvetina
Telerik team
 answered on 11 Aug 2011
1 answer
174 views
Hi,
I am currently wanting to implement the RadTreeView "Expand All" functionality.
I used "ServerSideCallBack" mode to expand nodes and used a menuitem to call the event(Expand All).
But when I click "ExpandAll" button to expand  a selected node which its child child nodes count is more than 5, the first time it will get correct result.
At the second time to click  "ExpandAll" button to  expand this node,  its child child nodes will appear in a confuse way. Only the top 5 child child nodes are correct, the others are wrong. Although we do nothing  but only toggle the selected node in server side codes. 

Below codes maybe helpful to understand it. Please tell me how to resolve it.

[Function:ExpandNode]
  .....
  foreach (RadTreeNode radTreeNode in treeNodes)
    {
             radTreeNode.NodeTemplate = new MyTemplate(radTreeNode);
             currentNode.Nodes.Add(radTreeNode);
             radTreeNode.DataBind();
    }
[Function:Expand All]
   if (!radTreeNode.Expanded)
      {
             if (radTreeNode.ExpandMode == TreeNodeExpandMode.ServerSideCallBack)
             {
                 ExpandNode(radTreeNode);
             }
             else if(radTreeNode.Nodes.Count>0)
             {
                  radTreeNode.Toggle();
             }
       }
       foreach (RadTreeNode node in radTreeNode.Nodes)
       {
            ExpandAllNode(node);
       }
Plamen
Telerik team
 answered on 11 Aug 2011
1 answer
55 views

Scenario:

I am developing an application using Telerik RadControls for ASPX.NET AJAX. I have tree

different Rad controls in the main page. A RadTreeview, a RadTabStrip and a RadGrid.

The basic functionality is: I select a node from the Treeview, that builds dynamic questions sourced from a database) in the RadTabStrip. And the answer to those questions is given by

selection an option in the single column RadGrid.

My questions are:

1. How can I set a default selection in the RadGrid?

2. When a node is selected the RadTabStrip is rebuilt but the page always blinks. How can I

avoid that blinking from the whole page running some server side code like the example here: http://demos.telerik.com/aspnet-classic/treeview/Examples/Programming/ServerSideApi/DefaultCS.aspx?

3. After a node selection and rebuilding the tabstrip pages, the RadTreeView loses the selected node focus. How can I keep the focus on the previously selected node? (it has something to do with that blink, can it be from the PostBack of the page?)

4. How can I load the grid having for each row a value and a text (value is an id related to the text element)?

Thank you all.

Regards

Bruno

Plamen
Telerik team
 answered on 11 Aug 2011
1 answer
52 views

Scenario:

I am developing an application using Telerik RadControls for ASPX.NET AJAX. I have tree

different Rad controls in the main page. A RadTreeview, a RadTabStrip and a RadGrid.

The basic functionality is: I select a node from the Treeview, that builds dynamic questions sourced from a database) in the RadTabStrip. And the answer to those questions is given by

selection an option in the single column RadGrid.

My questions are:

1. How can I set a default selection in the RadGrid?

2. When a node is selected the RadTabStrip is rebuilt but the page always blinks. How can I

avoid that blinking from the whole page running some server side code like the example here: http://demos.telerik.com/aspnet-classic/treeview/Examples/Programming/ServerSideApi/DefaultCS.aspx?

3. After a node selection and rebuilding the tabstrip pages, the RadTreeView loses the selected node focus. How can I keep the focus on the previously selected node? (it has something to do with that blink, can it be from the PostBack of the page?)

4. How can I load the grid having for each row a value and a text (value is an id related to the text element)?

Thank you all.

Regards

Bruno

Plamen
Telerik team
 answered on 11 Aug 2011
2 answers
76 views
Is there any way to persist the settings for a listview (i.e. current sort column) similar to the way the RadGrid does or do I have to manually store a session variable or something?
Veli
Telerik team
 answered on 11 Aug 2011
2 answers
216 views
I have been looking for a way to load a TabStrip such that only the active tab gets loaded. The whole TabStrip control should not load up front. What if you had 10 tabs, all with data controls?

The demo's only have this example. This is not the behaviour I want.

I want the tab to postback every time it is clicked (which the demo does not achieve. There, tabs only postback the 1st time they are clicked).

I also don't like the solution of setting RenderSelectedPageOnly="true" on the MultiPage. When you click View Source, you only see the content of the front tab in the source, regardless of which tab you are on.

I have had a go at solving this, but my solution has not worked. You can download my attempt from here.
If you navigate away from a tab and then back to it, its content is missing (even without AJAX).  
I've removed the Telerik DLL. I used version 2010.3.1215.35.

Has anyone solved this problem? If so, I think it should be added to the demos, as I am sure it would be a very common requirement.
Joni
Top achievements
Rank 1
 answered on 11 Aug 2011
3 answers
81 views
Hi,

I have implemented spell check in my page. i am facing a problem in spell check, its is not loading for the first time.

for example

i have configured a textbox to the spell check, and have provided text with spelling mistakes, now when i click the Spell Check button a dialog box has been open and it has been in progress for long time.

if i am doing this again na then its working fine.

i have included spellcheck as below

<

 

 

telerik:RadSpell ID="spVenue" runat="server" ButtonText="Spell Check" ControlToCheck="txtVenueName"

 

 

 

AjaxUrl="~/Telerik.Web.UI.SpellCheckHandler.axd" />

 


Included RadSpell.Dialog.resx in App_GlobalResources, App_Data\RadSpell\en-US.tdf

and in Web.Config

<

 

 

httpHandlers>

 

<

 

 

add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/>

 

</

 

 

httpHandlers>

 

<

 

 

handlers>

 

<

 

 

add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler"/>

 

</

 

 

handlers>

 


Please help me to fix this problem.

Thanks,
Prakash.

Rumen
Telerik team
 answered on 11 Aug 2011
7 answers
204 views
Is it possible to add a link to the header of the scheduler (where it has the "today" link, date, and "Day", "Week", & "Month" buttons)?

If so, how?

Thanks.
Peter
Telerik team
 answered on 11 Aug 2011
1 answer
54 views
I have a very simple page that includes a RadComboBox tied to a SqlDatasource.

As soon as I attempt to add AJAX Manager (v2011.2.712.40) to the page, the combo box is non-reponsive.

If I configure the Manage by turning off the "Enable Ajax" option, the page returns to normal operation.

Where would I start looking for configuration or other areas that might cause Ajax to fail?

Bear in mind, I have had great success with all of these components in several other projects, so I am sure the workstation is configured correctly.

This problem persists across the latest versions of IE, Firefox and Chrome, yet another reason to suspect my configuration.

The other possibly relevant details are: VS2010 Pro, IIS 7.5 on Win 7 Pro, coding in VB, targeting ASP.NET 4.0. (all updated as of this morning)
Shinu
Top achievements
Rank 2
 answered on 11 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?