Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
77 views
I have a page with two RadGrids on it.  When a row in the left grid is selected, the right grid is refreshed to show data pertinent to the row that was selected in the left grid.   This all works great, until somebody clicks Edit on a different row than the was currently selected.  The right grid refreshes but still shows data for the row that was previously selected, not for the row that is now being edited.  I solved the problem this way:

        protected void rgRegion_EditCommand(object sender, GridCommandEventArgs e)
        {
            var item = e.Item as GridDataItem;
            item.Selected = true;

            if (rgRegion.SelectedItems.Count > 0)
            {
                rgRegionAcct.Rebind();
            }
        }

This works great UNLESS, while the row in the left grid is still in Edit Mode, the user clicks the Add link in the right grid.  At this point, as the right grid tries to lookup the selected row in the left grid, the left grid no longer has a row selected.  

        protected void rgRegionAcct_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            try
            {
                int? selectedRegionId = GetSelectedRegionId();
                rgRegionAcct.DataSource = GetRegionAccountsTable(selectedRegionId);
            }
            catch (Exception ex)
            {
                Utilities.LogError("Retrieving Account/Region Configuration", ex.Message, ex.StackTrace, "");
                ShowPopup(String.Format("There was an error loading the account/region configuration.  The error was {0}", ex.Message));
            }
        }

        private int? GetSelectedRegionId()
        {
            int? returnValue = null;

            if (rgRegion.SelectedItems.Count > 0)
            {
                var gridDataItem = rgRegion.SelectedItems[0] as GridDataItem;
                if (gridDataItem != null)
                {
                    returnValue = Convert.ToInt32(gridDataItem.GetDataKeyValue("RegionId"));
                }
            }

            return returnValue;
        }

It appears that the left grid is refreshing for some unknown reason.  There is no rebind() being called on the left grid when the Add link is clicked on the right grid.  So why is my left grid refreshing which I assume is the reason row, that is in update mode, is no longer selected?
Kostadin
Telerik team
 answered on 14 Mar 2013
1 answer
73 views
Hi,

I've noticed a simple issue with RadButton. This is reproducable even on the overview page of its demo. Click in the button and hold, then drag the mouse out of the button and release. The "pressed" style of the button gets stuck on. Not a showstopper but it gets visually confusing if a user happens to click a few buttons inaccurately. I was using IE9 when this happened. Is there a known fix or workaround for this?

Thanks,
Ross

Danail Vasilev
Telerik team
 answered on 14 Mar 2013
1 answer
58 views
Hi,
I have given the row data inside the item-template as given below
<%
Databinder.Eval(Container."empId")

How can I get its value in code behind
Shinu
Top achievements
Rank 2
 answered on 14 Mar 2013
0 answers
83 views
Hi,

    I want to copy a Radchart image in button click event using client side code (Asp.net). That code will run all the browser. Can you help me? If you can means please reply asap.
 Note:
        I don't want save  a radchart image only copy & paste it.

Regards
Palaniappan. R
Palaniappan
Top achievements
Rank 1
 asked on 14 Mar 2013
10 answers
212 views

Hi Telerik,

We implemented a customized SharePoint 2007 site for our client and decided to use RadEditor for their content managed fields, the editor version is 5.3.2.0. Recently they reported issues with hyperlinks. I managed to replicate the issue they described and decided to try the trial latest version -5.8.10.0- to see whether it has been addressed or not. Unfortunately the problem still exists.


Here are the steps and I attached a screenshot for each step using a simple example.
1. Type some text on the first line and press enter
2. Type some more text on the new line

3.      3. Select the first line, open the hyperlink manager and bind the text with a URL – You’ll notice cursor jumps to the start of the second line

4.      4. Switch to HTML view, you’ll see anchor markup expands to the second line too

5. Switch back to Design view and you’ll see the second line repeated.

I could not replicate the issue on my dev environment using the old version or the trial version but it occurs on my desktop, so I’m a little puzzled.  I also tried the scenario on your demo page “http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx” and it does not occur there.  It also looks fine on Firefox 3.6.18.

We use MOSSLinkManager and our configuration file is as follows;

<configuration>

<property name="AllowThumbGeneration">True</property>

<property name="ConvertToXhtml">True</property>

<property name="EnableDocking">False</property>

<property name="ShowHtmlMode">True</property>

<property name="ShowPreviewMode">False</property>

<property name="ToolbarMode">ShowOnFocus</property>

<property name="ToolsWidth">680px</property>

<property name="NewLineBr">false</property>

<property name="SpellDictionaryLanguage">en-GB</property>

<property name="ImagesPaths">

<item>/SiteCollectionImages</item>

</property>

</configuration>

 
The dev box (issue doesn’t exist): Windows 2008 R2, using IE8 8.0.7600.16385

The desktop (issue exists): Windows 7, using IE8 8.0.7600.16385

Thanks for your help,
Regards,
Naz

Rumen
Telerik team
 answered on 14 Mar 2013
3 answers
80 views
I specify the format in my radcalendar to be mm/dd/yyyy.  In Ie is first displays as one format then quickly changes to the desired format.  Seems like it is doing this client side/  anyway to fix that?
Kostadin
Telerik team
 answered on 14 Mar 2013
1 answer
121 views
Hi.. I am using radgrid in my program.. I need to retrieve the leave type from the table to delete the record. 

    If e.CommandName = "Delete" Then
            Dim ParameterCol As New ParameterCollection
            Dim LeaveType = TryCast(e.Item, GridDataItem).GetDataKeyValue("CodeHRLeaveType").ToString()

            ParameterCol.Add("UserID", Master.LoginUser)
            ParameterCol.Add("EmployeeID", ddlEmpName.SelectedValue)
            ParameterCol.Add("LeaveType", LeaveType.ToString)
            ds = TESTING.HrLeaveRecordDelete(ParameterCol)
        End If

but there is an error with the dim leavetype line.. Is the the right way to retrieve the value??
Shinu
Top achievements
Rank 2
 answered on 14 Mar 2013
7 answers
226 views
I have a probleme with TimeLine View
I use Telerik v 2012.3.1205

My scheduler is group by ressources.
I want to display a whole month with TimeLine View ; so I configured my scheduler with this lines :

this.RadScheduler1.Width = new Unit(3000);
this.RadScheduler1.TimelineView.NumberOfSlots = 336;
this.RadScheduler1.TimelineView.SlotDuration = TimeSpan.FromHours(2);
this.RadScheduler1.TimelineView.TimeLabelSpan = 2;
this.RadScheduler1.TimelineView.ColumnHeaderDateFormat = @"dd";
this.RadScheduler1.TimelineView.StartTime = new TimeSpan(0, 0, 0);



The result is capture n°1 (01_NoProblem) ...
with, for example, Red appointment from 12/25 to 12/28
All is right.

But :
I don't want to see the "non workable" hours...so, in the RadScheduler1_TimeSlotCreated method, I have the

folowing lines :
if (e.TimeSlot.Start.TimeOfDay < new TimeSpan(8, 0, 0)
|| e.TimeSlot.Start.TimeOfDay >= new TimeSpan(18, 0, 0))
{
    e.TimeSlot.Control.Style.Add(HtmlTextWriterStyle.Width, "0px");
}
else
{         ...        }

Problem : the Appointments don't appear correctly. (cf. caprture n° 2)
For exmaple, the Red appointment start from  12/20 to 12/23


I suspect the HTML style (Width, "0px") is the problem ... or not ?

How can I achieve this ?

Thanks in advance
Plamen
Telerik team
 answered on 14 Mar 2013
1 answer
156 views
I am developing an MDI-like interface similar to your demo...

http://demos.telerik.com/aspnet-ajax/window/examples/radwindowandmdi/defaultcs.aspx

It would be great if Telerik could create some "snap" functionality into Rad Window, similar to the window snap functionality availalble in Windows 7+. I would like to be able to drag a rad window to the side of it's container and then have some way of "snapping" it so that it occupies 100% height and 50% width, left or right. It would also be cool if you could drag the window to the top or bottom of its container and then snap it their as well  50% height, top or bottom and 100% width). I'm not sure why the Windows folks didn't include vertical snap, but maybe there's some technical issue.

Anyhow, allowing users to quickly size windowsby snapping them for side by side (or top/bottom) display would really be useful for many MDI type implementations.

I imagine the Rad Window already has client-side capabilities for detecting when one of the window edges has reached its container boundary. They key would be providing users with some sort of visual cue that they can "snap" the window to that particular boundary (left/right and, ideally, top/botom).

Of course, it would probably be necessary to provide some sort of toggle property so users could turn this functionality on/off, or perhaps an enumeration property... like  SnapBehaviors="EnableSnapVertical, EnableSnapHorizontal, EnableSnapLeft... etc.)
Marin Bratanov
Telerik team
 answered on 14 Mar 2013
2 answers
169 views

I have 3 levels
Top Level - Client Job   
2nd Level - JobTask
3rd Level  - TaskStockRequirments  

The ClentId for the TopLevel is achieved through :-

Protected Sub SqlTopLevel_Clients_Selecting(sender As Object, e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlTopLevel_Clients.Selecting
If hdnClientId.Value = "" Then hdnClientId.Value = "1"
e.Command.CommandText = "SELECT * FROM bm_ClientJob Where ClientId = " & CStr(hdnClientId.Value)
End Sub

and this is ok and the Level 2 is displayed OK but I can't understand why Level 3 doesn't appear.

<%-- CLIENT JOBS HIERARCHICAL GRIDS --%>
 <telerik:RadSlidingPane ID="rspClientJobs" Title="Client Jobs" runat="server" Height="650px">
 
     <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
         <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="grdClientJobs">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="grdClientJobs"></telerik:AjaxUpdatedControl>
                 </UpdatedControls>
             </telerik:AjaxSetting>
         </AjaxSettings>
     </telerik:RadAjaxManager>
 
     <telerik:RadGrid ID="grdClientJobs"    OnPreRender="grdClientJobs_PreRender" ShowStatusBar="True"
         DataSourceID="SqlTopLevel_Clients" runat="server"
         AutoGenerateColumns="False" PageSize="7"
         AllowSorting="True" AllowPaging="True" GridLines="None" CellSpacing="0">
         <PagerStyle Mode="NumericPages"></PagerStyle>
         <MasterTableView DataSourceID="SqlTopLevel_Clients" DataKeyNames="JobId" AllowMultiColumnSorting="True" HierarchyLoadMode="Client" Width="100%">
 
             <DetailTables>
 
                 <telerik:GridTableView DataKeyNames="JobId" DataSourceID="SqlLevel2_ClientJobs" Width="100%"
                     runat="server">
                     <ParentTableRelation>
                         <telerik:GridRelationFields DetailKeyField="JobId" MasterKeyField="JobId">
                         </telerik:GridRelationFields>
                     </ParentTableRelation>
 
                     <%--LEVEL 3 GRID TABLE - JOBTASKS COLUMNS--%>
 
                    <DetailTables>
 
                         <telerik:GridTableView DataKeyNames="TaskId" DataSourceID="SqlLevel3_ClientJobTasks" Width="100%"
                             runat="server">
                             <ParentTableRelation>
                                 <telerik:GridRelationFields DetailKeyField="TaskId" MasterKeyField="TaskId"></telerik:GridRelationFields>
                             </ParentTableRelation>
                             <Columns>
                                 <telerik:GridBoundColumn SortExpression="Requirement" HeaderText="Requirement" HeaderButtonType="TextButton"
                                     DataField="Requirement" UniqueName="Requirement">
                                 </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn SortExpression="Supplier" HeaderText="Supplier" HeaderButtonType="TextButton"
                                     DataField="Supplier" UniqueName="Supplier">
                                 </telerik:GridBoundColumn>
                                  <telerik:GridBoundColumn SortExpression="Amount" HeaderText="Amount" HeaderButtonType="TextButton"
                                     DataField="Amount" UniqueName="Amount">
                                 </telerik:GridBoundColumn>                                                  
                                  <telerik:GridBoundColumn SortExpression="Units" HeaderText="Units" HeaderButtonType="TextButton"
                                     DataField="Units" UniqueName="Units">
                                 </telerik:GridBoundColumn>                                                  
                              </Columns>
                             <SortExpressions>
                                 <telerik:GridSortExpression FieldName="TaskName" SortOrder="Descending"></telerik:GridSortExpression>
                             </SortExpressions>
                         </telerik:GridTableView>
                     </DetailTables>
 
                    <%--LEVEL 2 GRID TABLE - CLIENT JOB COLUMNS--%>
                             <Columns>
                                 <telerik:GridBoundColumn SortExpression="TaskId" HeaderText="Task Id" HeaderButtonType="TextButton"
                                     DataField="TaskId" UniqueName="TaskId">
                                 </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn SortExpression="TaskSeqNo" HeaderText="Seq No" HeaderButtonType="TextButton"
                                     DataField="TaskSeqNo" UniqueName="TaskSeqNo">
                                 </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn SortExpression="TaskName" HeaderText="Name" HeaderButtonType="TextButton"
                                     DataField="TaskName" UniqueName="TaskName">
                                 </telerik:GridBoundColumn>
                             </Columns>
                             <SortExpressions>
                                 <telerik:GridSortExpression FieldName="TaskName" SortOrder="Descending"></telerik:GridSortExpression>
                             </SortExpressions>
                 </telerik:GridTableView>
             </DetailTables>
             <%--TOP LEVEL CLIENT COLUMNS--%>
                    <Columns>
                         <telerik:GridBoundColumn SortExpression="JobId" HeaderText="JobId" HeaderButtonType="TextButton"
                             DataField="JobId" UniqueName="JobId">
                         </telerik:GridBoundColumn>
                         <telerik:GridBoundColumn SortExpression="StartDate" HeaderText="Date Start" HeaderButtonType="TextButton"
                             DataField="StartDate" UniqueName="StartDate" DataFormatString="{0:D}">
                         </telerik:GridBoundColumn>
                         <telerik:GridBoundColumn SortExpression="JobName" HeaderText="Name" HeaderButtonType="TextButton"
                             DataField="JobName" UniqueName="JobName">
                         </telerik:GridBoundColumn>
                     </Columns>
         </MasterTableView>
     </telerik:RadGrid>
 
   <%--HIERARCHICAL GRIDS SQL DATA SOURCES--%>
 
     <asp:SqlDataSource ID="SqlTopLevel_Clients" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>"
         ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM bm_ClientJob Where ClientId = @ClientId"
         runat="server">
     </asp:SqlDataSource>
 
     <asp:SqlDataSource ID="SqlLevel2_ClientJobs" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>"
         ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM bm_JobTask where JobId = @JobId Order By TaskSeqNo"
         runat="server">
         <SelectParameters>
             <asp:SessionParameter Name="JobId" SessionField="JobId" Type="Int32"></asp:SessionParameter>
        </SelectParameters>
     </asp:SqlDataSource>
 
     <asp:SqlDataSource ID="SqlLevel3_ClientJobTasks" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>"
         ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM bm_TaskStockRequirement where TaskId = @TaskId"
         runat="server">
         <SelectParameters>
             <asp:SessionParameter Name="TaskId" SessionField="TaskId" Type="Int32"></asp:SessionParameter>
         </SelectParameters>
     </asp:SqlDataSource>


Any ideas please?

nick chance
Top achievements
Rank 1
 answered on 14 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?