Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
140 views
It appears that this is selecting parent Nodes as well if the value matches.  Is this a bug?

As a workaround, I am setting attributes only on nodes that have parents and then doing FindNodeByAttribute but would like to use the FindChildNodeByValue rather than the setup for appending attributes.  Is there an additional setting that is needed?
Yana
Telerik team
 answered on 09 Sep 2009
1 answer
173 views
Hi,
 I am using the Q1 2009 RAD AJAX control for ASP.NET. I hvae an odd problem when using a GridDropDownListColumnEditor to modify the width of the dropdownbox in edit mode. When the grid is not in edit mode the first row does not display a value for the field that is bound to the dropdown column. The value is correctly picked up in edit mode and in all the other rows. If i remove the column editor ID from the dropdown column all the values are displayed as expected.

The GridTextBoxColumnEditor works as expected.

Thanks

Chris

ASPX Code
<%@ Control Language="C#" AutoEventWireup="true"  
        CodeFile="TuteeTargetGrades.ascx.cs"  
        Inherits="usercontrols_TuteeTargetGrades" %> 
<%@ Import Namespace="System.ComponentModel"%> 
         
<%@ Register assembly="Telerik.Web.UI, Version=2009.1.311.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"  
        namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
<%@ Register assembly="AjaxControlToolkit, Version=1.0.20229.25335, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"  
        namespace="AjaxControlToolkit" tagprefix="cc1" %> 
 
<telerik:RadAjaxManagerProxy runat="server" ID="rampChild" > 
</telerik:RadAjaxManagerProxy> 
 
<telerik:RadAjaxLoadingPanel Runat="server" height="75px" width="75px"  
    ID="alpMain" Transparency="20" BackColor="White"  
    HorizontalAlign="Center" > 
    <br /> 
    <br /> 
    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
        style="border: 0px;" /> 
</telerik:RadAjaxLoadingPanel> 
 
<asp:UpdatePanel ID="updMain" runat="server"  UpdateMode="Conditional"> 
<ContentTemplate> 
<asp:Panel ID="pnlCommonList" runat="server" Width="100%"> 
    <span class="ec-smartpart" > 
        <telerik:RadGrid runat="server" ID="rgMaster" DataSourceID="dsMaster"  
        AutoGenerateColumns="false" AllowSorting="true"  
        onprerender="rgMaster_PreRender" AllowMultiRowEdit="true"  
        ondetailtabledatabind="rgMaster_DetailTableDataBind"  
        onitemcommand="rgMaster_ItemCommand"  
        onupdatecommand="rgMaster_UpdateCommand" 
        Skin="Sunset" oncancelcommand="rgMaster_CancelCommand" TableLayout="Auto"> 
             
            <MasterTableView Name="Master" DataSourceID="dsMaster" DataKeyNames="pupil_code" EditMode="InPlace"> 
                <DetailTables> 
                    <telerik:GridTableView Name="Detail" EditMode="InPlace" runat="server"  
                                        DataKeyNames="unique_id" DataSourceID="dsDetail" 
                                         AutoGenerateColumns="false" AllowAutomaticUpdates="true" 
                                         width="100%" TableLayout="Auto"> 
                        <ParentTableRelation> 
                            <telerik:GridRelationFields DetailKeyField="pupil_code" MasterKeyField="pupil_code" /> 
                        </ParentTableRelation> 
                        <Columns> 
                            <telerik:GridBoundColumn SortExpression="subject_code" HeaderText="Subject" HeaderButtonType="TextButton" 
                                                     DataField="subject_code" UniqueName="subject_code" ReadOnly="true" 
                                                     HeaderStyle-Width="5%"/> 
                            <telerik:GridBoundColumn SortExpression="set_code" HeaderText="Set" HeaderButtonType="TextButton" 
                                                     DataField="set_code" UniqueName="set_code  ReadOnly="true" 
                                                     HeaderStyle-Width="5%"/> 
                            <telerik:GridBoundColumn SortExpression="initials" HeaderText="Tutor" HeaderButtonType="TextButton" 
                                                     DataField="initials" UniqueName="initials  ReadOnly="true" 
                                                     HeaderStyle-Width="5%"/> 
                            <telerik:GridDropDownColumn SortExpression="prediction" HeaderText="Grade" HeaderButtonType="TextButton" 
                                                     DataField="prediction" UniqueName="prediction" DataSourceID="xsGrades"  
                                                     ListTextField="text" ListValueField="text" HeaderStyle-Width="5%"  
                                                     ColumnEditorID="GridDropDownListColumnEditor1" /> 
                            <telerik:GridBoundColumn SortExpression="comments" HeaderText="Comment" HeaderButtonType="TextButton" 
                                                     DataField="comments" UniqueName="comments" HeaderStyle-Width="80%" MaxLength="128"  
                                                     ColumnEditorID="GridTextBoxColumnEditor1"/> 
                             
                        </Columns> 
                         
                    </telerik:GridTableView> 
                </DetailTables> 
                <Columns> 
                    <telerik:GridTemplateColumn SortExpression="imageLink" DataField="imageLink" UniqueName="imageLink 
                                        HeaderStyle-Width="5%"> 
                        <ItemTemplate> 
                            <div style="display:block"> 
                                <img src='../<%# DataBinder.Eval(Container.DataItem,"imageLink") %>' width="75px" height="100px"/> 
                            </div> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn SortExpression="imageLink" DataField="imageLink" UniqueName="details 
                                            HeaderStyle-Width="10%"> 
                        <ItemTemplate> 
                            <div> 
                                <%# DataBinder.Eval(Container.DataItem,"NAME") %><br /> 
                                <%# DataBinder.Eval(Container.DataItem,"yeargroup") %><br /> 
                                <%# DataBinder.Eval(Container.DataItem,"house") %><br /> 
                            </div> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridEditCommandColumn ButtonType="PushButton" HeaderStyle-Width="85%" ItemStyle-HorizontalAlign="Left"/> 
                </Columns> 
            </MasterTableView> 
        </telerik:RadGrid> 
        <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" TextBoxStyle-Width="600px" runat="server">  
        </telerik:GridTextBoxColumnEditor>  
        <telerik:GridDropDownListColumnEditor ID="GridDropDownListColumnEditor1" DropDownStyle-Width="40px" runat="server"> 
        </telerik:GridDropDownListColumnEditor> 
    </span> 
</asp:Panel> 
</ContentTemplate> 
</asp:UpdatePanel> 
 
<asp:SqlDataSource ID="dsMaster" runat="server"  
    ConnectionString="<%$ ConnectionStrings:PassMainConnectionString %>"  
     
    SelectCommand="SELECT DISTINCT AL.PUPIL_CODE, N.SURNAME + ', ' +N.PREFERRED_NAME AS NAME, P.HOUSE_1 AS house, P.FORM AS yeargroup, '_layouts/ec/handlers/ImageHandler.ashx?nID=' + CAST(P.NAME_ID AS VARCHAR) AS imageLink FROM ASSESSMENT_HEADER AS AH INNER JOIN ASSESSMENT_LINES AS AL ON AH.UNIQUE_ID = AL.HEADER_ID INNER JOIN PUPIL AS P ON AL.PUPIL_CODE = P.CODE INNER JOIN NAME AS N ON N.NAME_ID = P.NAME_ID INNER JOIN _metisStaffView AS S ON AH.TUTOR_CODE = S.staffCode WHERE (AH.ACADEMIC_YEAR = (SELECT ACADEMIC_YEAR FROM _CURR_YEAR)) AND (P.ACADEMIC_YEAR = (SELECT ACADEMIC_YEAR FROM _CURR_YEAR AS _CURR_YEAR_1)) AND (AH.ASSESSMENT_Nr = 15) AND (P.GROUP_TUTOR = (SELECT CODE FROM STAFF WHERE (NAME_ID = (SELECT NAME_ID FROM EC_CONTACT_USER_FIELDS WHERE (UPPER(MetisLogon) = UPPER(RTRIM(REPLACE(UPPER(@MetisLogon), 'EPCOT\', '')))))))) ORDER BY yeargroup, NAME"  
    onselecting="dsMaster_Selecting"> 
    <SelectParameters> 
        <asp:Parameter Name="metisLogon" /> 
    </SelectParameters> 
</asp:SqlDataSource> 
<asp:SqlDataSource ID="dsDetail" runat="server"  
    ConnectionString="<%$ ConnectionStrings:PassMainConnectionString %>" SelectCommand="SELECT 
    al.unique_id , 
    exam_date , 
    tutor_code , 
    set_code , 
    subject_code , 
    pupil_code,  
    S.initials, 
    grade_1 AS prediction , 
    comments  
FROM 
assessment_header AH 
INNER JOIN assessment_lines AL 
    ON AH.unique_id = AL.header_id 
INNER JOIN pupil P 
    ON AL.pupil_code = P.code 
INNER JOIN name N 
    ON N.name_id = P.name_id 
inner join dbo._metisStaffView S 
    on tutor_code =S.staffCode 
WHERE 
    AH.academic_year = ( SELECT 
                             academic_year 
                         FROM 
                             _curr_year ) 
    AND P.academic_year = ( SELECT 
                                academic_year 
                            FROM 
                                _curr_year ) 
    AND AH.assessment_nr = 15 
    AND pupil_code = @Pupil_Code 
ORDER BY subject_code, S.initials"  
     
    UpdateCommand="UPDATE ASSESSMENT_LINES SET GRADE_1 = @prediction, COMMENTS = RTRIM(@comments) WHERE (UNIQUE_ID = @unique_id)"  
    onupdating="dsDetail_Updating"> 
    <SelectParameters> 
        <asp:SessionParameter Name="Pupil_Code" SessionField="Pupil_Code" Type="String" /> 
    </SelectParameters> 
    <UpdateParameters> 
        <asp:Parameter Name="prediction" /> 
        <asp:Parameter Name="comments" /> 
        <asp:Parameter Name="unique_id" /> 
    </UpdateParameters> 
</asp:SqlDataSource> 
 
 
<asp:XmlDataSource ID="xsGrades" runat="server"  
    DataFile="~/usercontrols/Grades.xml" > 
</asp:XmlDataSource> 


XMLDataSource XML
<?xml version="1.0" encoding="utf-8" ?> 
<grades> 
    <grade text="-"/> 
    <grade text="S"/> 
    <grade text="A"/> 
    <grade text="B"/> 
    <grade text="C"/> 
    <grade text="D"/> 
    <grade text="E"/> 
    <grade text="U"/> 
</grades> 



Pavel
Telerik team
 answered on 09 Sep 2009
4 answers
134 views
Hello,

Simulating a callback using code in documentation:
 $find("<%=RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest(eventArgs);
I have added this radajaxmanager in its own ajaxsettings with the updated controls in codebehind.

But I am unable to have the default loading panel displayed during this callback ?
Call back is working normally and this loading panel works perfectly for other controls ???

Am i missing something ?

Thanks for help.
CS

v 2009.2.826
Yavor
Telerik team
 answered on 09 Sep 2009
2 answers
88 views
I have a table and the width of the table is in % and in that i have radinput controls like raddatepicker,radnumbericbox and radtextbox.
and the width of these controla are also in %.
and when ever i enter the text lenth greater than the texbox length then its width automatically increase which destroyed the forms look and feel
how can i overcome from this problem.

and i need the width and height in % because i have to design my  in such a way that it can be fit in any resolution.

plz help me in this regard
Dimo
Telerik team
 answered on 09 Sep 2009
2 answers
92 views
I use Radcombobox in Radwindow with IE8, when I show Popup(using RadWindows) with contains RadCombobox. When i move mouse to RadCombobox and I can see the link in Parent Page like transparent.
How i can solve this problem .Please help me as impossible as.
Bruce Lam
Top achievements
Rank 1
 answered on 09 Sep 2009
6 answers
144 views
Hi

I entered few characters in the text field and then selected the text area and cut the selected text using the right click button of my mouse. When i change the focus of the mouse , the cut characters reaper on the text box.

I dont have this problem when i use the shortcut key Ctrl+x.

 Please help me with this problem.
Dimo
Telerik team
 answered on 09 Sep 2009
3 answers
123 views
Hello,

we need to open a modal window, but instead to have it centered, the windows should be positioned on the bottom of the window.
Some suggestions?

Thanks in advance

Fabrizio
Georgi Tunev
Telerik team
 answered on 09 Sep 2009
2 answers
123 views
Hi,

Is there a way to send a postback and do serverside code when the user expands the panel but no postback when the panel is collapsed. Now I use the event OnItemClick couse there are no OnExpand and OnCollapse but then there are allways a postback - no good.

On Expand I load stuff inside the panel but on collapse no such thing needs to be done.

/R
Raymond
Top achievements
Rank 1
 answered on 09 Sep 2009
11 answers
486 views
hi,

I am trying to change the text "Click here to sort" which appears when I hover over the title of the GridHyperLinkColumns in my radgrid. I want to keep the hover text, but change it to whatever I like, since my site is not in english. I accomplished something similar with the GridPagerItem to change the PageSizeLabel, but now I need to do the same for this.

For the GridPagerItem I am using the following code and it works, maybe what I need for the "Click here to sort" is something similar? :

protected void GridUltimosConteudos_ItemDataBound(object sender, GridItemEventArgs e)
{

    if (e.Item is GridPagerItem)
    {
        Label lblPageSize = (Label)e.Item.FindControl("ChangePageSizeLabel");
        lblPageSize.Text = "Itens por página:";
    }

}



Thanks!
Marta
Shinu
Top achievements
Rank 2
 answered on 09 Sep 2009
4 answers
86 views
hi,

I am facing a problem in exporting hierarchical grids to pdf: the generated doc doesn't include the data from the child grid.
Here is the scenario:
. 2 grids with "master-datails" relationship (<ParentTableRelation> set)
. expand the child grid, ok all data is there
. push the button that trigger the parentTable.MasterTableView.ExportToPdf() method, ok
. get the windows with the exported data in the right format, pagesize, etc.  but WITHOUT the expanded data from the child table.
What am I missing?
Thanks in advance for any help.
Flavio

Here is the code:
--- aspx----------------------------
<telerik:RadGrid ID="grwJobNTasks" runat="server"
  Width="100%"
  ShowStatusBar="true"
        AutoGenerateColumns="False"
        AllowSorting="True"
        AllowMultiRowSelection="False"
        AllowPaging="True"
  GridLines="None"
  meta:resourcekey="grwJobNTasksResource"
     EnableViewState="True"
  OnPdfExporting="grwJobNTasks_PdfExporting"
  OnDetailTableDataBind="grwJobNTasks_DetailTableDataBind"
  OnNeedDataSource="grwJobNTasks_NeedDataSource"
  SettingsChangedCallBack="CallBackFn"
        >
        <ExportSettings IgnorePaging="true" OpenInNewWindow="true">
            <Pdf PageHeight="210mm" PageWidth="297mm" PageTitle="Job 'n Tasks" AllowPrinting="true" />
        </ExportSettings>    
        <MasterTableView Width="100%" DataKeyNames="JobId" AllowMultiColumnSorting="True"
   HierarchyLoadMode="ServerOnDemand" CommandItemDisplay="None">
   <DetailTables>
                <telerik:GridTableView DataKeyNames="JobTaskId" Name="JobTasks" AllowPaging="true" ShowFooter="true"
     runat="server" Caption="Job's tasks" Width="100%" CommandItemDisplay="None">
     <ParentTableRelation>
      <telerik:GridRelationFields DetailKeyField="OwnerId" MasterKeyField="JobId" />
     </ParentTableRelation>
     <Columns>
      <telerik:GridBoundColumn DataField="TTGCode" HeaderText="TTG Code" UniqueName="TTGCode" />
      <telerik:GridTemplateColumn UniqueName="SuccessTemplateColumn" HeaderText="Result">
       <ItemTemplate>
        <asp:Label runat="server" ID="SuccessColumn"  Text='<%# GetSuccessLabel(Eval("Success")) %>'/>
       </ItemTemplate>
      </telerik:GridTemplateColumn>
      <telerik:GridBoundColumn DataField="StepError" HeaderText="Step Error" UniqueName="StepError" />
      <telerik:GridBoundColumn DataField="ErrorDesc" HeaderText="Error Description" UniqueName="ErrorDesc" />
      <telerik:GridTemplateColumn UniqueName="StartingTimeTemplateColumn" HeaderText="Starting Time">
       <ItemTemplate>
        <asp:Label runat="server" ID="StartingTimeColumn"  Text='<%# GetDateTimeLabel(Eval("StartingTime")) %>'/>
       </ItemTemplate>
      </telerik:GridTemplateColumn>
     </Columns>
    </telerik:GridTableView>
   </DetailTables>
   <Columns>
    <telerik:GridTemplateColumn UniqueName="JobTypeTemplateColumn" HeaderText="Job Type">
     <ItemTemplate>
      <asp:Label runat="server" ID="JobTypeColumn" Text='<%# JobTypes.Value((int)Eval("JobType")) %>'/>
     </ItemTemplate>
    </telerik:GridTemplateColumn>
    <telerik:GridBoundColumn DataField="StartDateTime" HeaderText="Schedule Time" UniqueName="StartDateTime"
     DataType="System.DateTime" DataFormatString="{0:G}" HtmlEncode="False" />
    <telerik:GridTemplateColumn UniqueName="StatusIdTemplateColumn" HeaderText="Result">
     <ItemTemplate>
      <asp:Label runat="server" ID="StatusIdColumn"  Text='<%# JobStatuses.Value((int)Eval("StatusId")) %>'/>
     </ItemTemplate>
    </telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn UniqueName="InsertByTemplateColumn" HeaderText="Insert By">
     <ItemTemplate>
      <asp:Label runat="server" ID="InsertByColumn"  Text='<%# GetUserDesc(Eval("InsertBy")) %>'/>
     </ItemTemplate>
    </telerik:GridTemplateColumn>
    <telerik:GridBoundColumn DataField="InsertDate" HeaderText="Insert Date" UniqueName="InsertDate"
     DataType="System.DateTime" DataFormatString="{0:G}" HtmlEncode="False" />
   </Columns>
   <NoRecordsTemplate>
    <%=(string)this.GetLocalResourceObject("NoData")%>
   </NoRecordsTemplate>
  </MasterTableView>
 </telerik:RadGrid>
--- c# ------------------------------

 protected void grwJobNTasks_Print(Object sender, EventArgs e)
 {

  grwJobNTasks.MasterTableView.ExportToPdf();
 } 

flavio raimondi
Top achievements
Rank 1
 answered on 09 Sep 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?