Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
125 views
All -

I am attempting to Ajaxify a portion or our application and have hit a wall with the PanelBar control.  I have wired up the Item_Click event and would like the event to be an ajax event.  The PanelBar control exists in a content page inside a master page.  No matter what I try, the event is a traditional postback.  The first place I went to investigate the behavior was the Telerik examples and, sure enough, all of the Telerik examples exhibit the same flicker (Postback).  I've tried adding the control to a RadAjaxManagerProxy and also setting the RegisterWithAjaxManager property to true.  Neither have any noticeable affect.  Is there something painfully obvious that I'm missing?

Any help is greatly appreciated.

Jeff


Simon
Telerik team
 answered on 23 Oct 2009
3 answers
109 views
Match type1 -("My Number")

Hi ..
i am using radtree view in my web page.
 I am adding the nodes manually. I have to bind the No of records for corresponding match. I will be getting the d
ata from stored procedure  for corresponding Match type 1 to Match type 7.
Can i add rad treenode text side by my database Numbers.

Match type1 -("My Number")
Match type1 -("My Number")
Match type2 -("My Number")
Match type3 -("My Number")
Match type4 -("My Number")
Match type5 -("My Number")
Match type6 -("My Number")
Match type7 -("My Number").

Here i am adding Match Type1 as template field. When user clicks on that link it navigates to another page.
How can i do this.

Please give some suggetions.
How can i do ?


<
td width="50%" > 
                    <rad:RadTreeView ID="RadTreeView1" runat="server" DragAndDropBetweenNodes="true" Skin="Vista">  
                     
                     <Nodes> 
                        <rad:RadTreeNode runat="server" Text="Matching Types" Expanded="true">  
                         <Nodes> 
                          <rad:RadTreeNode runat="server" Text="Match Type1" NavigateUrl="../Modules/Search Results.aspx" 
                           ToolTip="click here to see results of this search for  the match type fot this decedent."  > 
                                                     
                          </rad:RadTreeNode> 
                          <rad:RadTreeNode runat="server" Text="Match Type2" NavigateUrl="../Modules/Search Results.aspx" 
                           ToolTip="click here to see results of this search for  the match type fot this decedent." />                         
                          <rad:RadTreeNode runat="server" Text="Match Type3" NavigateUrl="../Modules/Search Results.aspx" 
                           ToolTip="click here to see results of this search for  the match type fot this decedent." /> 
                          <rad:RadTreeNode runat="server" Text="Match Type4" NavigateUrl="../Modules/Search Results.aspx" 
                           ToolTip="click here to see results of this search for  the match type fot this decedent." /> 
                          <rad:RadTreeNode runat="server" Text="Match Type5" NavigateUrl="../Modules/Search Results.aspx" 
                           ToolTip="click here to see results of this search for  the match type fot this decedent." /> 
                          <rad:RadTreeNode runat="server" Text="Match Type6" NavigateUrl="../Modules/Search Results.aspx" 
                           ToolTip="click here to see results of this search for  the match type fot this decedent." /> 
                          <rad:RadTreeNode runat="server" Text="Match Type7" NavigateUrl="../Modules/Search Results.aspx" 
                           ToolTip="click here to see results of this search for  the match type fot this decedent." />                                          
                         </Nodes> 
                        </rad:RadTreeNode>                      
                     </Nodes>                    
                    </rad:RadTreeView> 
                </td> 
Simon
Telerik team
 answered on 23 Oct 2009
2 answers
203 views
Hi guys,

1)
When using an Itemtemplate, shouldn't the selected item keep the text it has in the list?
            <ItemTemplate> 
                <div class="rcbItem"> 
                    <%#Eval("RefereeFirstName") & " " & Eval("RefereeMidName") & " " & Eval("RefereeLastName")%> 
               </div> 
            </ItemTemplate> 

Now, in the combobox list you get the full names of the referees, while the selected item only displays the first name.

When binding the data I have stated:
combo.DataTextField = "RefereeFirstName"
so in a way this might be normal, but I would think the itemtemplate should override it for the selected item as well as the others.

Not setting the DataTextField only results in the classic system.data.datarowview text being displayed instead.
So, in order to get all the names for the selected item, what would you do?

2)
Another problem I'm getting related to using an itemtemplate is when adding an item dynamically:

combo.Items.Insert(0, New RadComboBoxItem("My Text", 0)) works fine in itself, the item is inserted. But it has no text in the list, while the text is displayed when the item is selected.

I am using Q1 2009.

Regards,
-DJ-


-DJ-
Top achievements
Rank 1
 answered on 23 Oct 2009
2 answers
571 views
Hi there.

I got a problem that the OnTextChanged-Event from the radEditor does not work as expected. I got this following Code-Snippet:
      <asp:Label SkinID="mailLabel" ID="lblMailRcp"  runat="server"   Font-Bold="true"  Text="<%$Resources:TextResources, ID_MAIL_TO%>" />&nbsp;</td><td width="650"><telerik:RadTextBox OnTextChanged="anyText_TextChanged" ID="txtMailTo" Font-Size="10" runat="server"  ReadOnly="true" Width="100%"  AutoPostBack="true"></telerik:RadTextBox> 
 
        <telerik:RadEditor ID="EditorMailBody" runat="server" EditModes="Design" OnTextChanged="anyText_TextChanged"  AutoPostBack="true" 
               Enabled="True" EnableResize="True" Language="de-DE"  
               ToolsFile="~/App_GlobalResources/NoTools.xml" Visible="True"                 
               Width="100%" Height="275" SkinID="EmailEditor"  
               ><Content /></telerik:RadEditor> 

This is within a RadAjaxPanel.

Now my event-handler (opened by every radtextbox and the radeditor) looks this way:
protected void anyText_TextChanged(object sender, EventArgs e) 
        { 
            if (sender is RadTextBox) 
            { 
                RadTextBox selBox = (RadTextBox)sender; 
                switch (selBox.ID) 
                { 
                    case "txtMailTo": 
                        _currentEmail.Recipient = selBox.Text; 
                        break; 
                    case "txtMailSubject": 
                        _currentEmail.Subject = selBox.Text; 
                        break; 
                    case "lblMailSender": 
                        _currentEmail.Sender = selBox.Text; 
                        break; 
                } 
            } 
            else if (sender is RadEditor) 
            { 
                RadEditor selBox = (RadEditor)sender; 
                switch (selBox.ID) 
                { 
                    case "EditorMailBody": 
                        _currentEmail.Body = selBox.Text; 
                        break; 
                } 
            } 
            _currentEmail.UpdateEmail(); 

Now the following happens:
When I change a Text in RadTextbox and leave it the event is fired and anyText_Changed is run (like expected)

But when I change the text in the RadEditor nothing happens.
When after editing some Text in the RadEditor I change the Text of a radTextbox and then reactivate the radEditor (by clicking into it) the event from the Textbox AND from the radEditor is fired (jumping into the else if - part)

So it looks like the OnTextChanged-Event from radEditor does not initiate a Postback.

Any clue?
LeBear
Top achievements
Rank 1
 answered on 23 Oct 2009
7 answers
557 views
                            <telerik:RadGrid runat="server" AllowPaging="True" ID="grdAddedFlyerItems" OnNeedDataSource="grdAddedFlyerItems_NeedDataSource" 
                                Width="375px" OnRowDrop="grdAddedFlyerItems_RowDrop" AllowMultiRowSelection="true" 
                                PageSize="7" AutoGenerateColumns="false">  
                                <MasterTableView DataKeyNames="ItemID" Width="100%" EditMode="InPlace">  
                                    <EditFormSettings> 
                                        <EditColumn UniqueName="EditCommandColumn1" ButtonType="imageButton" CancelText="Cancel this action" 
                                            UpdateText="Save changes" EditText="Edit record" CancelImageUrl="~/App_Themes/Default/Buttons/notapprovedicon.gif" 
                                            UpdateImageUrl="~/App_Themes/Default/Buttons/saveicon.gif">  
                                        </EditColumn> 
                                    </EditFormSettings> 
                                    <Columns> 
                                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" 
                                            EditImageUrl="~/App_Themes/Default/Buttons/editicon.gif">  
                                            <ItemStyle CssClass="nowrap" /> 
                                            <HeaderStyle Width="10px" /> 
                                        </telerik:GridEditCommandColumn> 
                                        <telerik:GridButtonColumn ButtonType="ImageButton" ConfirmText="Remove this item from added items?" 
                                            CommandName="RemoveItem" Text="Remove Item" UniqueName="DeleteColumn" ImageUrl="~/App_Themes/Default/Buttons/recyclebin_small.gif">  
                                            <HeaderStyle Width="10px" /> 
                                        </telerik:GridButtonColumn> 
                                        <telerik:GridBoundColumn DataField="ItemCompany" HeaderText="Prefix" SortExpression="ItemCompany" 
                                            UniqueName="ItemCompany" ReadOnly="true">  
                                            <HeaderStyle Width="35px" /> 
                                            <ItemStyle CssClass="nowrap" /> 
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn HeaderText="Item Nbr" SortExpression="ItemNumber" DataField="ItemNumber" 
                                            UniqueName="ItemNumber" ReadOnly="true">  
                                            <HeaderStyle Width="65px" /> 
                                            <ItemStyle CssClass="nowrap" /> 
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description" 
                                            UniqueName="Description" ReadOnly="true">  
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridNumericColumn DataField="Price" HeaderText="Price" DataFormatString="{0:C}" 
                                            SortExpression="Price" UniqueName="Price" /> 
                                    </Columns> 
                                    <NoRecordsTemplate> 
                                        <div style="height: 30px; cursor: pointer;">  
                                            No items to view</div> 
                                    </NoRecordsTemplate> 
                                    <PagerStyle Mode="NumericPages" PageButtonCount="4" /> 
                                </MasterTableView> 
                                <ClientSettings AllowRowsDragDrop="True">  
                                    <Selecting AllowRowSelect="True" EnableDragToSelectRows="false" /> 
                                    <ClientEvents OnRowDropping="onRowDropping" /> 
                                </ClientSettings> 
                            </telerik:RadGrid> 
 


It works fine if I take out EditForms="InPlace" in the MasterTableView but it seems like there should be a way to customize these icons easily when using InPlace edit mode.

Thanks,
Andy
Sebastian
Telerik team
 answered on 23 Oct 2009
1 answer
136 views
I have a aspx page with the following markup. The issue i'm having is that the master table shows the expected records but the detail view always shows zero rows. If I manually set the session variable (Session["LoggerSN"] = "0050C230ED8B";) in the page load event than I get the rows I would expect in the detail view of the grid.

How/When does the SessionParameter get loaded for LoggerSN?

 <SelectParameters>
                <asp:SessionParameter Name="LoggerSN" SessionField="LoggerSN" Type="String"/>
            </SelectParameters>

What am I doing wrong???

<body>
    <form id="form1" runat="server">
    <div>
    
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
    
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false"    
            DataSourceID="LoggerDictionary" GridLines="None" AllowSorting="True" Skin="Vista"
                AllowPaging="True" AllowAutomaticUpdates="True" AllowAutomaticInserts="True"
                AllowAutomaticDeletes="True"
                ShowStatusBar="True" PageSize="15"><PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
<MasterTableView DataKeyNames="LoggerSN" DataSourceID="LoggerDictionary" AllowMultiColumnSorting="True" AllowAutomaticDeletes="true" AllowAutomaticUpdates="true"
                    AllowAutomaticInserts="true" CommandItemDisplay="Top">

    <DetailTables>
        <telerik:GridTableView  runat="server" DataKeyNames="LoggerSN" Width="100%"
            DataSourceID="RTDictionary" AllowAutomaticDeletes="True"  
            AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
            AutoGenerateColumns="True" HierarchyLoadMode="ServerBind">
            <RowIndicatorColumn Display="false">
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn Display="false">
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
        </telerik:GridTableView>
    </DetailTables>
    
    <ParentTableRelation>
        <telerik:GridRelationFields DetailKeyField="LoggerSN" MasterKeyField="LoggerSN"/>
    </ParentTableRelation>
    
    
<RowIndicatorColumn Visible="false">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn Visible="True">
<HeaderStyle Width="19px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="LoggerSN" HeaderText="LoggerSN"
            ReadOnly="True" SortExpression="LoggerSN" UniqueName="LoggerSN">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="SiteID" HeaderText="SiteID"
            SortExpression="SiteID" UniqueName="SiteID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LoggerDescription"
            HeaderText="LoggerDescription" SortExpression="LoggerDescription"
            UniqueName="LoggerDescription">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LoggerType" DataType="System.Int16"
            HeaderText="LoggerType" SortExpression="LoggerType" UniqueName="LoggerType">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DomainName" HeaderText="DomainName"
            SortExpression="DomainName" UniqueName="DomainName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="UTC_Offset" DataType="System.Int16"
            HeaderText="UTC_Offset" SortExpression="UTC_Offset" UniqueName="UTC_Offset">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DST_Adjustment" HeaderText="DST_Adjustment"
            SortExpression="DST_Adjustment" UniqueName="DST_Adjustment">
        </telerik:GridBoundColumn>
    </Columns>
</MasterTableView>
        </telerik:RadGrid>
    
        <asp:SqlDataSource ID="RTDictionary" runat="server"
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ConflictDetection="CompareAllValues"
            SelectCommand="SELECT LoggerSN, ModBusID, ChannelOrder, ChannelName, MinSeconds, Disabled FROM RealTimeDeviceDictionary WHERE LoggerSN = @LoggerSN">
            <SelectParameters>
                <asp:SessionParameter Name="LoggerSN" SessionField="LoggerSN" Type="String"/>
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="LoggerDictionary" runat="server"
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ConflictDetection="CompareAllValues"
            DeleteCommand="DELETE FROM [LoggerDictionary] WHERE [LoggerSN] = @LoggerSN"
            InsertCommand="INSERT INTO [LoggerDictionary] ([LoggerSN], [SiteID], [LoggerDescription], [LoggerType], [DomainName], [UTC_Offset], [DST_Adjustment]) VALUES (@LoggerSN, @SiteID, @LoggerDescription, @LoggerType, @DomainName, @UTC_Offset, @DST_Adjustment)"
            SelectCommand="SELECT [LoggerSN], [SiteID], [LoggerDescription], [LoggerType], [DomainName], [UTC_Offset], [DST_Adjustment] FROM [LoggerDictionary] WHERE ([LoggerType] = @LoggerType)"
            UpdateCommand="UPDATE [LoggerDictionary] SET [SiteID] = @SiteID, [LoggerDescription] = @LoggerDescription, [LoggerType] = @LoggerType, [DomainName] = @DomainName, [UTC_Offset] = @UTC_Offset, [DST_Adjustment] = @DST_Adjustment WHERE [LoggerSN] = @LoggerSN">
            <SelectParameters>
                <asp:Parameter DefaultValue="250" Name="LoggerType" Type="Int16" />
            </SelectParameters>
            <DeleteParameters>
                <asp:Parameter Name="LoggerSN" Type="String" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="SiteID" Type="String" />
                <asp:Parameter Name="LoggerDescription" Type="String" />
                <asp:Parameter Name="LoggerType" Type="Int16" />
                <asp:Parameter Name="DomainName" Type="String" />
                <asp:Parameter Name="UTC_Offset" Type="Int16" />
                <asp:Parameter Name="DST_Adjustment" Type="String" />
                <asp:Parameter Name="LoggerSN" Type="String" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="LoggerSN" Type="String" />
                <asp:Parameter Name="SiteID" Type="String" />
                <asp:Parameter Name="LoggerDescription" Type="String" />
                <asp:Parameter Name="LoggerType" Type="Int16" />
                <asp:Parameter Name="DomainName" Type="String" />
                <asp:Parameter Name="UTC_Offset" Type="Int16" />
                <asp:Parameter Name="DST_Adjustment" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
    
    </div>
    <telerik:RadAjaxManager runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    </form>
</body>
Iana Tsolova
Telerik team
 answered on 23 Oct 2009
1 answer
135 views
Hello,

 I am currently exporting a aspx page to excel using the below code. This page has multiple RadGrids on it with Headers and Footers. The Problem I am having is that when Exporting to Excel it is putting the Footer row ABOVE the rad grid instead of at the Bottom. Is there a way of correcting this or a work around? Thank you.

This is On Page Load of a GenerateReport.aspx Page which gets called by the ASPX page which is what I am trying to export to excel.

 
            Response.Clear()  
            Response.Charset = "" 
            ''set the response mime type for excel  
            Response.ContentType = "application/vnd.ms-excel" 
 
            HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=1.xls")  
 
            Dim sw As New StringWriter  
            Server.Execute(Session("ReportFile"), sw)  
 
            Response.Write(sw.ToString.Replace("<div", "<span").Replace("</div", "</span").Replace("<input id=""ctl00_PageContent", "<span id=""ctl00_PageContent"))  
            Response.End() 

This is one of the RadGrids currently on a aspx page which I am trying to export by doing the server.execute Above.

          
         <telerik:RadGrid ID="dgMonth" runat="server" ShowGroupPanel="False" RecordType="Deposit" AutoGenerateColumns="True" EnableEmbeddedskins="false" 
                RecordCountString="Total Record Count: {0}" Width="700px" RecordCountCssClass="" InsertMode="1"  InsertInDialogWindow="0" EnableAJAXLoadingTemplate="True"   
                DataActiveField="Active" BorderWidth="1px" ShowFooter="True"  GridLines="None" PagerStyleVisible="False" FooterStyle-BackColor="AliceBlue" > 
            <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" Visible="False"   /> 
            <ClientSettings AllowDragToGroup="True"></ClientSettings> 
            <MasterTableView CommandItemDisplay="Top" ShowHeader="True" Width="100%" DataKeyNames="MonthlyDate" ShowFooter="true" EditMode="InPlace">  
                 <EditFormSettings> 
                    <PopUpSettings ScrollBars="None"></PopUpSettings> 
                </EditFormSettings> 
                <CommandItemTemplate> 
                    <asp:LinkButton ID="lnkInsert" runat="server" Visible="false" CommandName="InitInsert" CausesValidation="false"> <img style="border:0px" alt="" src="../images/AddRecord.gif" />Add New Interim Deposit</asp:LinkButton> 
                </CommandItemTemplate> 
                <CommandItemSettings AddNewRecordImageUrl="AddRecord.gif" RefreshImageUrl="Refresh.gif">  
                </CommandItemSettings> 
                  <FooterStyle BackColor="White" ForeColor="Black" Font-Size="12pt"   
                        Font-Bold="False"   HorizontalAlign="Right" /> 
 
            </MasterTableView> 
            <HeaderContextMenu EnableEmbeddedSkins="False" EnableTheming="True">  
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
            </HeaderContextMenu> 
            <FilterMenu EnableEmbeddedSkins="False" EnableTheming="True">  
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
            </FilterMenu> 
        </telerik:RadGrid> 


Sebastian
Telerik team
 answered on 23 Oct 2009
1 answer
152 views

Hi ,

Is there any option to set custom sort image url?

I tried with SortAscImgUrl and SortDscImg url.

But i am getting the image with white Backgroud .Attached the Screen shot.

Is there any option to set custom url or any reffrence link

Thanks
senthil

Pavlina
Telerik team
 answered on 23 Oct 2009
6 answers
152 views
Hello,

I'm using version 2009.1.311.20 and IE 8. I would like to be able to change the position of the datepicker's popup, but can't figure out how to do it since the datepicker is in the RadGrid. If I could do it server side that would be fine as I am utilizing the item created event of the RadGrid and would like to place the code there.

Thanks,
Casey
Casey
Top achievements
Rank 1
 answered on 23 Oct 2009
1 answer
81 views
The Self Hierarchy grid's Child rows bound correctly if we bind the grid source in the Page Load event.
If we bind the Self  Hierarchy Grid in the button click event the child rows are bounded twice. The child rows first bound with the parent row and also bound as row which has no child records.
We used datatable as to bind the grid and rest of the things are same as explained in the below exmaple link
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/selfreferencing/defaultcs.aspx

Sebastian
Telerik team
 answered on 23 Oct 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?