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

hi telerik team
how i can bind telerik tree whit WebServiceSettings and passed other parameter that
for example

 

 <telerik:RadTreeView  
            ID="RadTreeView1" runat="server" 
            Width="100%"   SkinID="TreeTelerik" 
            LoadingStatusPosition="AfterNodeText" 
           > 
               
            <ExpandAnimation Type="InQuad" /> 
            <CollapseAnimation Type="InOutBack" /> 
            <WebServiceSettings Path="TreeContent.asmx" Method="GetTreeViewContent"  /> 
            <Nodes> 
                <telerik:RadTreeNode Text="root node" Value="0" ExpandMode="WebService"    
                    Selected="True"  /> 
            </Nodes> 
        </telerik:RadTreeView> 
and webservice
using System;  
using System.Web;  
using System.Collections;  
using System.Collections.Generic;  
using System.Collections.Specialized;  
using System.Configuration;  
using System.Data;  
using System.Data.SqlClient;  
using System.Threading;  
using System.Web.Script.Services;  
using System.Web.Services;  
using System.Web.Services.Protocols;  
using Telerik.Web.UI;  
 
[ScriptService]  
public class TreeContent : WebService   
{  
      
    [WebMethod]  
    public RadTreeNodeData[] GetTreeViewContent(RadTreeNodeData node, object context)  
    {  
        IDictionary<stringobject> contextDictionary = (IDictionary<stringobject>)context;  
        DataTable productCategories = GetNodeContent(node.Value);  
 
        List<RadTreeNodeData> result = new List<RadTreeNodeData>();  
 
        foreach (DataRow row in productCategories.Rows)  
        {  
            RadTreeNodeData itemData = new RadTreeNodeData();  
            itemData.Text = row["strMenuName"].ToString();  
            itemData.Value = row["MenuId"].ToString();  
 
            if (Convert.ToInt32(row["ChildrenCount"]) > 0)  
            {  
                itemData.ExpandMode = TreeNodeExpandMode.WebService;  
            }  
            result.Add(itemData);  
        }  
        return result.ToArray();  
    }  
      
        private DataTable GetNodeContent(object categoryId)  
    {  
        SqlConnection connection = new SqlConnection(  
            ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);  
 
        SqlCommand selectCommand =  
            new SqlCommand(@"
    SELECT
        pc1.MenuId,
        pc1.strMenuName,
        ISNULL(pc2.ChildrenCount, 0) as ChildrenCount
    FROM Menu as pc1
    LEFT JOIN
        (
            SELECT   intmenuParentId, COUNT(*) AS ChildrenCount
            FROM     Menu
            Group By (intmenuParentId)
        ) as pc2
    ON
        pc1.MenuId = pc2.intmenuParentId
    WHERE pc1.intmenuParentId =@intmenuParentId and pc1.admin=@admin and pc1.content=@content
" 
,  
        connection);  
/*@"
    SELECT
        pc1.CategoryID,
        pc1.Title,
        ISNULL(pc2.ChildrenCount, 0) as ChildrenCount
    FROM ProductCategories as pc1
    LEFT JOIN
        (
            SELECT   ParentId, COUNT(*) AS ChildrenCount
            FROM     ProductCategories
            Group By (ParentId)
        ) as pc2
    ON
        pc1.CategoryId = pc2.ParentId
    WHERE pc1.parentId = @parentId
"*/ 
        selectCommand.Parameters.AddWithValue("intmenuParentId", categoryId);  
/********************************how i can pass parameter *********************************/ 
selectCommand.Parameters.AddWithValue("admin", stradmin);  
selectCommand.Parameters.AddWithValue("content", strcontent);  
/*****************************************************************/ 
 
        SqlDataAdapter adapter = new SqlDataAdapter(selectCommand); ;  
        DataTable productCategories = new DataTable();  
        adapter.Fill(productCategories);  
        return productCategories;  
    }  

how i can passed "stradmin" and "strcontent" in to webservices
thanks A lot team
hesam
Top achievements
Rank 1
 answered on 21 Jan 2009
1 answer
136 views
We are using telerik grid nested in a splitter. However, we constantly produced that the record displays would got collapsed on resizing the window.

We have sample screens and sample website for this problem. May anyone tell us how we can submit to telerik?

Thanks!
Gini
Serrin
Top achievements
Rank 1
 answered on 21 Jan 2009
0 answers
104 views
Hey guys, I'm learning how to make a VERY BASIC cms system here. All the examples use a datagrid to pull the information that RADEDITOR Submitted into the database. What would be the best way to render webpage content? Literal? And would I use a data reader to do that? Thanks
David
Top achievements
Rank 1
 asked on 21 Jan 2009
2 answers
99 views
I was the one who reported that the RadCompression module in build 1314 did not work with Medium Trust last week.

And so you released a new build 1316, and then yesterday 1319.

However, I found that both new builds (1316 and 1319) do not work at all with ASP.NET 3.5, but work fine with ASP.NET 3.5 SP1.

Then I submit another support ticket reporting this issue, and got this kind of response:

====
in order to use our RadScriptManager in .Net 3.5 environment you should use latest framework's service pack.

Please excuse us for the inconvenience.

====

This is not just an inconvenience!

I am building an application on top of ASP.NET 3.5 for clients, and it is not possible to ask all our clients to suddenly upgrade to SP1!!

Build 1314 works fine with 3.5, but not 1319?

I was just asking you guys to support RadCompression in medium trust, and all of a sudden you changed the system requirements to 3.5 SP1 only??

The new builds simply do not work, whether or not I choose to enable RadCompression.

This is just plain ridiculous.
SamVanity
Top achievements
Rank 2
 answered on 21 Jan 2009
3 answers
227 views
How do I get all values displayed in my grid so that I can pass them as parameters for a stored procedure?

I have a radgrid that displays ID(PK), courseID, Course, and StudentID.  I have a button outside of the grid called RegisterAll.  If RegisterAll is clicked I would like to pass all of the displayed rows as parameters to a stored procedure that will insert them into a table. 
Thanks
davidp
Top achievements
Rank 1
 answered on 21 Jan 2009
4 answers
212 views
  Hi,
  I'm working with ASP.NET 2.0, Windows [2000,XP,Server2003], Internet Explorer 6.0.2900.5512.xpsp_sp3_gdr.080814-1236, Telerik RadControls for ASP.NET AJAX Q3 2005 with Visual Studio 2005.  I have a huge self-referencing Oracle table, and I want a RadGrid with both SelfHierarchySettings and HierarchyLoadMode="ServerOnDemand".
  I can get the behavior I'd like with HierarchyLoadMode="Client" and the datasource and radgrid below.  And then when you click on the item whose ccattrseq=1, it expands and shows all its children (whose pid=1).  But the table, even too a depth of 2 is too big too load all at once, and what I really want is to have HierarchyLoadMode="ServerOnDemand".  I've tried and tried, but all I get is no children when I click on expand.
  I've read these articles, but I don't think they're doing what I need:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/separate-scrolls-for-inner-tables-in-hierarchical-grid.aspx
http://www.telerik.com/community/code-library/aspnet-ajax/grid/select-items-in-hierarchy-depending-on-selection-in-inner-levels.aspx
 The closest article I could find doing what I need was here (but it isn't ASP.NET AJAX forums).  The poster seemed to be satisfied that he'd found, but I can't re-create it with the details provided:
http://www.telerik.com/community/forums/aspnet/grid/self-hierarchy-problems.aspx#719305

      <asp:SqlDataSource ID="OracleTest" runat="server" ConnectionString="Data Source=testville;Persist Security Info=True;User ID=testuser;Password=testpassword;Unicode=True"
          ProviderName="System.Data.OracleClient" SelectCommand='SELECT "CCATTRSEQ","SECTION","VALSTR", "PID" FROM "CCATTRIBUTES" WHERE "PID"=1 OR "PID"=-1'>
      </asp:SqlDataSource>

    <telerik:RadGrid ID="TopLevelNodes" Skin="Outlook" runat="server" PageSize="5"
      AllowSorting="True" BackColor="#E0E0E0" DataSourceID="OracleTest"
      OnColumnCreated="TopLevelNodes_ColumnCreated" OnItemCreated="TopLevelNodes_ItemDataBound"
      OnNeedDataSource="TopLevelNodes_NeedDataSource" AutoGenerateColumns="False"
      EnableAJAX="True" GridLines="None" Width="321px" CellPadding="1" Height="200px">
        <ClientSettings EnablePostBackOnRowClick="True">
            <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
        <MasterTableView
          HierarchyLoadMode="Client" DataKeyNames="CCATTRSEQ,PID,SECTION"
          DataSourceID="OracleTest">
          <SelfHierarchySettings ParentKeyName="PID" KeyName="CCATTRSEQ" />
          <SortExpressions>
            <telerik:GridSortExpression FieldName="VALSTR" SortOrder="Descending" />            
          </SortExpressions>
          <Columns>
            <telerik:GridClientSelectColumn  UniqueName="column">
              <HeaderStyle Width="27px" />
            </telerik:GridClientSelectColumn>
            <telerik:GridExpandColumn Visible="True" >
              <HeaderStyle Width="27px" />
            </telerik:GridExpandColumn>                                                           
            <telerik:GridBoundColumn DataField="VALSTR" HeaderText="Section" SortExpression="VALSTR"
              UniqueName="VALSTR">
              <ItemStyle Wrap="True" />
                <HeaderStyle Width="70px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CCATTRSEQ" HeaderText="CCATTRSEQ" SortExpression="CCATTRSEQ"
              UniqueName="CCATTRSEQ" Display="False">
              <ItemStyle Wrap="False" />
            </telerik:GridBoundColumn>            
            <telerik:GridBoundColumn DataField="SECTION" HeaderText="Section Number" SortExpression="SECTION"
              UniqueName="SECTION" Display="False">
              <ItemStyle Wrap="False" />
            </telerik:GridBoundColumn>                        
            <telerik:GridBoundColumn DataField="PID" HeaderText="PID" SortExpression="PID"
              UniqueName="PID" Display="False">
              <ItemStyle Wrap="False" />
            </telerik:GridBoundColumn>                        
          </Columns>
            <ExpandCollapseColumn UniqueName="ExpandColumn1">
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <RowIndicatorColumn>
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
        </MasterTableView>
        <SelectedItemStyle BackColor="#C00000" />
        <AlternatingItemStyle BackColor="Silver" />
        <HeaderContextMenu EnableTheming="True" Skin="Outlook">
            <CollapseAnimation Duration="200" Type="OutQuint" />
        </HeaderContextMenu>
        <FilterMenu EnableTheming="True" Skin="Outlook">
            <CollapseAnimation Duration="200" Type="OutQuint" />
        </FilterMenu>
    </telerik:RadGrid>

 
Georgi Krustev
Telerik team
 answered on 21 Jan 2009
1 answer
61 views
I use the editor and my own fileupload which causes a postback

I want to insert the object I upload at the insertion point in the editor, but the problem is that it gets lost, or the focus gets lost upon the postback.

Is there a way on the client that I could retreive the insert position, store it in a variable and then restore it after the post back or when I do the insert?
Rumen
Telerik team
 answered on 21 Jan 2009
1 answer
168 views
I have one column 'Comments' that contains little/large amounts of data, no matter what I do
I can't seem to force the grid to be a particular size, the grid has paging and page one it may
take 80% of space on next page, where data column 'Comment's has quite a few and it wraps
around it will enlarge the grid and have vertical scrollbar?

Would like to find the attribute or secret to make the grid be, for example 500px height and it
stays there. Have tried quite a few setting and this is what it looks like now, glad I found out
how to paste things so it does not take a HUGE amount of space in the posting!

<

 

rad:radgrid id="dgReport" runat="server" skin="Office2007" AutoGenerateColumns="False" GridLines="None"

 

 

AllowPaging="True" AllowSorting="True" Width="100%" Height="400px" PageSize="14">

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

<MasterTableView Width="100%">

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</ExpandCollapseColumn>

 

 

<ItemStyle Wrap="False" />

 

 

<AlternatingItemStyle Wrap="False" />

 

 

<Columns>

 

 

<rad:GridBoundColumn HeaderText="MT" DataField="MT" UniqueName="MT"></rad:GridBoundColumn>

 

 

<rad:GridBoundColumn HeaderText="Job ID" DataField="Job #" UniqueName="Job ID"></rad:GridBoundColumn>

 

 

<rad:GridBoundColumn HeaderText="Organization" DataField="Organization" UniqueName="Organization"></rad:GridBoundColumn>

 

 

<rad:GridBoundColumn HeaderText="Work Type" DataField="Work Type" UniqueName="Work Type"></rad:GridBoundColumn>

 

 

<rad:GridBoundColumn HeaderText="Dictator" DataField="Dictator" UniqueName="Dictator" ></rad:GridBoundColumn>

 

 

<rad:GridBoundColumn HeaderText="QA Category" DataField="QA Status" UniqueName="QA Status"></rad:GridBoundColumn>

 

 

<rad:GridBoundColumn HeaderText="QA Proofer" DataField="QA Proofer" UniqueName="QA Proofer"></rad:GridBoundColumn>

 

 

<rad:GridBoundColumn HeaderText="QA Start" DataField="QAStart" UniqueName="QAStart"></rad:GridBoundColumn>

 

 

<rad:GridBoundColumn HeaderText="QA End" DataField="QAEnd" UniqueName="QAEnd"></rad:GridBoundColumn>

 

 

<rad:GridBoundColumn HeaderText="QA Minutes" DataField="QATotalMinutes" UniqueName="QATotalMinutes"></rad:GridBoundColumn>

 

 

<rad:GridBoundColumn HeaderText="MT Comments" DataField="MT Comments" UniqueName="Validation Comments">

 

 

<ItemStyle Width="400px" />

 

 

</rad:GridBoundColumn>

 

 

 

</Columns>

 

 

</MasterTableView>

 

Dimo
Telerik team
 answered on 21 Jan 2009
1 answer
135 views
I have a master page with three panes in it. One pane has a rad splitter bar. Randomly, the page that uses this master page stopped working, now I get the above error.
The radsplit bar code is:
 <telerik:RadSplitBar ID="radSplitBar1" runat="server" EnableResize="true" CollapseMode="Both" BorderStyle="None" Visible="true" />

Any idea why this would happen?

This error happens in System.Web PostProcessFoundBuildResult and the error code is CS0117.

Any hep would be appreciated.



Svetlina Anati
Telerik team
 answered on 21 Jan 2009
1 answer
125 views
Hello,

the next problem. I don't want to use the scrollbars of the radpane. I want to use the scrollbars of the browser.
But I have problems with the horizontal scrollbar, it don't expand on the full width of the content.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"  
Inherits="cari._Default"  ValidateRequest="false" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" style="margin:0px;" > 
<head id="Head1" runat="server"
    <title>Car-I Solutions</title> 
    <link rel="stylesheet" type="text/css" href="Styles/cari.css" /> 
</head> 
<body style="height:100%;margin:0px;"
    <script language="javascript"
            function UpdateCustomizationWindowValue() { 
    var element = document.getElementById("btnCustWindow"); 
    if(element == null) return; 
    element.value = (grid.IsCustomizationWindowVisible() ? "Schliesse" : "Zeige") + " Bearbeitungsfenster"; 
function ShowHideCustomizationWindow() { 
    if(grid.IsCustomizationWindowVisible()) 
        grid.HideCustomizationWindow(); 
    else grid.ShowCustomizationWindow();         
    UpdateCustomizationWindowValue(); 
        </script> 
        <script language="javascript" type="text/javascript"><!-- 
    // <!CDATA[ 
    function OnMoreInfoClick(element, keyValue) { 
        fzpopup.SetContentUrl('common/controllloader.aspx?control=fzdetail.ascx&fz_id=' + keyValue); 
        fzpopup.Show(); 
    } 
    //--></script
    <form id="form1" runat="server" style="height:100%;margin:0px;"
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"></telerik:RadAjaxManager> 
        <telerik:RadScriptManager id="RadScriptManager1" Runat="server" AsyncPostBackTimeout="600"
        </telerik:RadScriptManager> 
    <div style="height:100%;margin:0px;"
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1" UpdateMode="Conditional"
        <telerik:RadToolBar id="RadToolBar1" Runat="server" OnButtonClick="RadToolBar1_ButtonClick" 
            Skin="Office2007" style="width:100%"
            <Items>                 
                <telerik:RadToolBarButton runat="server" Text="Home"
                    <ItemTemplate> 
                        &nbsp;&nbsp;<asp:ImageButton runat="server" ID="btn_home" ImageUrl="~/images/Home16.png" OnClick="btn_home_Click" />&nbsp;&nbsp; 
                    </ItemTemplate> 
                </telerik:RadToolBarButton> 
                <telerik:RadToolBarButton runat="server" Text="Search"
                    <ItemTemplate> 
                        <asp:Panel runat="server" ID="pan_search" DefaultButton="btn_search"
                            &nbsp; 
                            <telerik:RadTextBox ID="tb_search" runat="server"
                            </telerik:RadTextBox>&nbsp; 
                            <asp:ImageButton runat="server" ID="btn_search" ImageUrl="~/images/Search16.png" OnClick="btn_search_Click" />&nbsp;&nbsp; 
                        </asp:Panel> 
                    </ItemTemplate> 
                </telerik:RadToolBarButton> 
                <telerik:RadToolBarButton runat="server" Text="LogInfo"
                    <ItemTemplate> 
                        <asp:LoginName ID="LoginName1" runat="server" />&nbsp; 
                        <asp:LoginStatus ID="LoginStatus1" runat="server" /> 
                    </ItemTemplate> 
                </telerik:RadToolBarButton> 
            </Items> 
            <CollapseAnimation Duration="200" Type="OutQuint" /> 
        </telerik:RadToolBar> 
        <telerik:RadSplitter ID="RadSplitter1" runat="server" Skin="Office2007" Width="100%" Height="95%" SplitBarsSize="">             
            <telerik:RadPane ID="splitpan_menue" runat="server" Height="95%" Width="200" Scrolling="None" >                 
                        <telerik:RadPanelBar ID="RadPanelBar_Funktionen" runat="server" PersistStateInCookie="True" Skin="WebBlue" Width="195px"
                            <Items> 
                                <telerik:RadPanelItem Text="Auswertungen" runat="server" Expanded="True"
                                    <Items> 
                                        <telerik:RadPanelItem runat="server"
                                            <ItemTemplate> 
                                                <telerik:RadTreeView ID="tv_auswertungen" runat="server" Skin="Office2007" OnNodeClick="NodeClick"
                                                    <Nodes> 
                                                        <telerik:RadTreeNode Text="Bestand" Expanded="True" Checkable="False" ExpandMode="ClientSide"
                                                            <Nodes> 
                                                                <telerik:RadTreeNode runat="server" Text="Bestandsliste" Value="reports/bestand_liste.ascx"></telerik:RadTreeNode> 
                                                                <telerik:RadTreeNode runat="server" Text="Bestand Ãœbersicht" Value="reports/rep_bestanduebersicht.ascx"></telerik:RadTreeNode> 
                                                                <telerik:RadTreeNode runat="server" Text="Bestands Auswertungen" Value="reports/rep_bestand_standtaggruppe.ascx"></telerik:RadTreeNode> 
                                                                <telerik:RadTreeNode runat="server" Text="Bestandsentwicklung" Value="webparts/wp_gwbestandentwicklung.ascx"></telerik:RadTreeNode> 
                                                                <telerik:RadTreeNode runat="server" Text="Bestands Bewertung" Value="reports/dispo/rep_bestandsbewertung.ascx"></telerik:RadTreeNode> 
                                                            </Nodes> 
                                                        </telerik:RadTreeNode> 
                                                        <telerik:RadTreeNode Text="Verkauf" Expanded="True" Checkable="False" ExpandMode="ClientSide"
                                                            <Nodes> 
                                                                <telerik:RadTreeNode runat="server" Text="Auslieferungsliste" Value="reports/rep_auslieferungsliste.ascx"></telerik:RadTreeNode> 
                                                                <telerik:RadTreeNode runat="server" Text="Auslieferungsübersicht" Value="reports/rep_ausluebersicht.ascx"></telerik:RadTreeNode> 
                                                                <telerik:RadTreeNode runat="server" Text="Auslieferungs Auswertungen" Value="reports/rep_ausliefer_auswertungen.ascx"></telerik:RadTreeNode> 
                                                                <telerik:RadTreeNode runat="server" Text="Verkauf nach Verkäufer" Value="reports/rep_auslverkaeufer.ascx"></telerik:RadTreeNode> 
                                                            </Nodes> 
                                                        </telerik:RadTreeNode> 
                                                    </Nodes> 
                                                </telerik:RadTreeView> 
                                            </ItemTemplate> 
                                        </telerik:RadPanelItem> 
                                    </Items> 
                                     
                                </telerik:RadPanelItem> 
                            </Items> 
                            <CollapseAnimation Duration="100" Type="None" /> 
                            <ExpandAnimation Duration="100" Type="None" /> 
                        </telerik:RadPanelBar> 
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward" /> 
            <telerik:RadPane ID="splitpan_content" runat="server" Scrolling="None" style="width:auto;"
                <telerik:RadAjaxLoadingPanel id="RadAjaxLoadingPanel1" Runat="server" height="75px" 
                    HorizontalAlign="Center" width="75px" MinDisplayTime="20" Transparency="30"
                    <img alt="wird aktualisiert" src="App_Themes/Aqua/GridView/Loading.gif" style="border: 0px;" /> 
                </telerik:RadAjaxLoadingPanel> 
                <asp:Panel ID="pan_content" runat="server" style="width:auto;margin:3px;"
                    </asp:Panel> 
            </telerik:RadPane> 
        </telerik:RadSplitter> 
        </telerik:RadAjaxPanel> 
    </div> 
    </form> 
</body> 
</html> 
 




It looks like:

screenshot

Can you understand my problem?
Thank you very much.

Regards
Reiner



Svetlina Anati
Telerik team
 answered on 21 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?