Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
871 views

Hi ,
I have a user control having a radCombobox Now I want to use the selectedvalue from this dropdown on an aspx page where I want to use this selected value as an input parameter to a function which fills a normal dropdown list on this page based on what the value was selected.
I have called this function in the onitemsrequested event of the normal dropdown.Now the problem is that it always takes null.
As a result the dropdown is blank irrespective of what I choose.

Please let me know how to achieve this,if this is not possible by onitemsrequested event,I do not want to create a new user control having both the things on one page.Instead i want the page to call usercontrol value.
I tried using public property concept.it does not work.

Here is the event definition.

  [
protected void ddlCommodity_itemRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
         string exchange1 = ExchangeType.Exchange;                               
         DataSet CommodityCodes = service.GetCommodities(exchange1);

        ddlCommodity.DataSource = CommodityCodes.Tables[0];
        ddlCommodity.DataTextField = "'ALL'";
        ddlCommodity.DataValueField = "'ALL'";
        ddlCommodity.DataBind();
    }


the property is
public string Exchange
    {
        get { return ddlExchangeType.SelectedValue;}
        set { ddlExchangeType.SelectedValue = value; }
    }
]

Abhishek
Top achievements
Rank 2
 answered on 18 Jan 2012
2 answers
426 views

Hi Telerik Team,

I want to open and Edit a Word Document Online means open the document in client browser Without save the document on user System

and when edit the document that would be saved on server.

So, Is there any tool available in Telerik Controls?

Below are the steps:

1. Browse a file using fileupload or  Select a file.

2. Use the file upload file and when hit on a button,the file needs to opened/edited something like an GoogleDoc. Or Open in Editor) without save on Client/User machine.

3 .User makes necessary changes and save the file on Server.

please reply ASAP and if possible send me the example. 

I am rally thankful to you.

Best Regrdas,

Ashish
Top achievements
Rank 1
 answered on 18 Jan 2012
1 answer
96 views
Hi ,
    I have tab-strip issue in IE 7 ,it works good in Firefox but not in IE 7.
    The issue is I have 3 pageviews and if i select one page view other two pageview tabs border should be solid but all the three tabs are showing the same behaviour and other issue is when i select a tab the text in the tab is going down. These issues are in IE 7 only, it works good in all other browsers. I am attaching my screenshoots down please solve the issue. This may be due to applying Skin to rad-tab-strip but the skin is mandatory.
Kate
Telerik team
 answered on 18 Jan 2012
2 answers
228 views
hi i set the RadSplitter height and width onload and onresize javascript event
initial loading(maximized browser) looking ok
if i resize the browser clicking of header of browser the Radsplitter height and width doesn't peoper
<telerik:RadSplitter  id="RadSplitter1" CssClass="Splitter"     runat="server" >
                <telerik:RadPane id="LeftPane" runat="server" width="22" Scrolling="None">
                    <telerik:RadSlidingZone id="SlidingZone1" runat="server" width="22"
                    DockedPaneId="Pane1"
                    ExpandedPaneId="Pane2"
                    >
 
                        <telerik:RadSlidingPane id="Pane2" title="Pane2" runat="server" width="150" minwidth="100">This pane is set to be initially expanded when the page is loaded. <br/><br/>Use the <b>ExpandedPaneId</b> property of the <b>RadSlidingZone</b> to control this behavior.</telerik:RadSlidingPane>
                         
                    </telerik:RadSlidingZone>
                </telerik:RadPane>
                <telerik:RadSplitBar id="RadSplitbar1" runat="server"></telerik:RadSplitBar>
                <telerik:RadPane id="MainPane" runat="server">Main Pane</telerik:RadPane>
        </telerik:RadSplitter>

my javascript on load and resize
var windowHight = $(window).height();
var windowWidth = $(window).width();
 
  var vvv = $find("ctl00_RadSplitter1");
 vvv.set_height(windowHight);
 vvv.set_width(windowWidth);



Dobromir
Telerik team
 answered on 18 Jan 2012
2 answers
142 views

Hi,

I am implementing an application using RadGrid, where I am using the following features:

  • Client-side binding
  • Paging mode NextPrevAndNumeric

I have a large amount of data (approximately 50k entries) and I found out that SQL server needs a large amount of data in order to sort all the selected data.

As I support filtering, users will use this option to reach the needed item instead of loading them all and using the pager.

According to these facts my idea is to:

  • Select the top 1000 hits
  • On the pager change the info section "rgInfopart" by using javaScript from
    • “1000 items in 100 pages” to
    • first 1000 items in 100 pages”.

The only problem is, that I cannot find the event late enough to bind the client function that does the needed job. I tried with the “OnDataBound” but on that time the number of available hits is not yet available.

function ModifyPagerInfo() {
    var hitsNo = $('.rgPagerCell .rgInfoPart strong span:first').html();
    if (1000 > hitsNo)
        $('.rgPagerCell .rgInfoPart strong span:first').html('first ' + hitsNo);
}

Does anyone knows if there is any event late enough in order to change the pager info.

Or there is any other possibility to reach the needed functionality?

Thank you,

Kristijan

Kristijan
Top achievements
Rank 1
 answered on 18 Jan 2012
2 answers
255 views
I would like to iterate through all of my TreeList items, but I can only seem to return the parent items and not the children. 

Here is the code I have so far:

foreach (TreeListDataItem i in notificationsTree.Items)
{
    string test21 = i.Cells[3].Text.ToString();
}
Abhishek
Top achievements
Rank 2
 answered on 18 Jan 2012
2 answers
102 views
When trying to use the Upgrade Wizard for an ASP.Net project with existing ASP.Net Ajax controls within VS2010 ( Ultimate 10.0.40219.1 SP1Rel ) the upgrade wizard does validate username and password but instead of Dev license ( as it always did ), it shows me that the account has a trial license o.0 !

I am trying to upgrade to 2011.3.1317.0 from 1305.40 (Dev).

Has always worked but I cannot figure out why the Upgrade Wizard does show me the wrong license type for the account.
My sub is good until June or July'12 ( just checked, but already can't remember ).

The installed VS Extensions version is Telerik WebUI VSExtension 2011.3.1305.0 and there are no visible updates available.

S.R.
Stephan Reisinger
Top achievements
Rank 1
 answered on 18 Jan 2012
0 answers
130 views
Hi all,
          I am new to rad Controls,I want to add the Rad Editor in SharePoint  DispForm.aspx
Siddiqali
Top achievements
Rank 1
 asked on 18 Jan 2012
1 answer
152 views
Inside my FormTemplate I have:

<asp:CheckBox ID="WidocznaCheckBox" runat="server" Text="Pokazuj w drzewie" CssClass="cbx" Checked='<%#Bind("Widoczna") %>'></asp:CheckBox>

But when I'm trying to add a new record to the RadTreeList, "Specified Cast Is not Valid" is thrown.

Using RadGrid It was possibile to write a small code-snippet:

if ((e.CommandName == RadGrid.InitInsertCommandName))
{
    e.Canceled = true;
    //Prepare an IDictionary with the predefined values 
    ListDictionary newValues = new ListDictionary();
 
    //set initial checked state for the checkbox on init insert 
    newValues["Widoczna"] = true
 
    //Insert the item and rebind 
    e.Item.OwnerTableView.InsertItem(newValues);
}

Is there for RatTreeList any similar or equivalent snippet?

Or any other solution?
Tsvetina
Telerik team
 answered on 18 Jan 2012
1 answer
107 views
Hi I'm having trouble with validating my RadTreeView. The data in the tree view is displayed from a SQL database table. This contains the following columns:

Category Id, CategoryName, Category, ParentCategoryId, SapProductCode, Company, Enabled. 

I have defined the maximum number of levels of this data to be 4. The loading and modification of nodes on the Tree View is working fine. I have a context menu that enables user to disable selected nodes (and their children). This is working fine.

However I have a button called Verify Tree Table. When this is pressed, I need to validate all the nodes in the tree view.

Basically every node needs to have either a non-disabled child or a SapProductCode. I can't figure out the algorithm to do this.Let's use the below tree view as an example

HP --> Printer --> Printer Unit  --> Printer 1 (SapProductCode)
                                                --> Printer 2 (SapProductCode)
IBM --> Desktop --> Desktop Unit (SapProductCode)
       --> Laptop --> Laptop Unit (SapProductCode)
       --> Monitor --> Monitor Unit (SapProductCode)
SAMSUNG --> Monitor --> Monitor Unit (SapProductCode)

So if I disable HP-->Printer-->Printer Unit, then this node is invalid as there are no non-disabled child nodes below. If I disable HP--> Printer--> Printer Unit --> Printer 1 (SapProductCode), then this is valid as the parent node (HP-->Printer-->Printer Unit) has a valid child node.

The code I have so far is displayed below:

protected void VerifyTreeTableButton_Click(object sender, EventArgs e)
{
    string Message;
    string TempMessage;
    int StartPosition;
    int EndPosition;
    string Tier1;
    string Tier2;
    string Tier3;
    string Tier4;
    int IntDisabledChildNodes;
 
 
 
 
    VerifyMessageLabel.Text = "<br/><br/>";
    IList<RadTreeNode> AllNodes = RadTreeView1.GetAllNodes();
    for (int i = 0; i < AllNodes.Count; i++)
    {
        RadTreeNode Node = (RadTreeNode)AllNodes[i];
 
        if (Node.Attributes["Status"].ToString() == "Created")
        {
            if (!Node.HasControls() && Node.Attributes["SapProductCode"] == "NULL")
            {
                // Get the full path of the Node using &&& as a separator
                Message = Node.GetFullPath("&&&");
 
                if (Message.Contains("&&&"))
                {
                    StartPosition = Message.IndexOf("&&&");
                    //TempMessage = Message.Substring(0, StartPosition);
 
                    Tier1 = "<b>Tier 1:</b> " + Message.Substring(0, StartPosition);
                    TempMessage = Message.Substring(StartPosition + 3);
                    VerifyMessageLabel.Text = VerifyMessageLabel.Text + Tier1;
 
                    if (TempMessage.Contains("&&&"))
                    {
                        StartPosition = TempMessage.IndexOf("&&&");
                        //TempMessage = TempMessage.Substring(0, StartPosition);
 
                        Tier2 = "<b>Tier 2:</b> " + TempMessage.Substring(0, StartPosition);
                        TempMessage = TempMessage.Substring(StartPosition + 3);
                        VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>" + Tier2;
 
                        if (TempMessage.Contains("&&&"))
                        {
                            StartPosition = TempMessage.IndexOf("&&&");
 
 
                            Tier3 = "<b>Tier 3: </b> " + TempMessage.Substring(0, StartPosition);
                            TempMessage = TempMessage.Substring(StartPosition + 3);
                            VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>" + Tier3;
 
 
                            if (TempMessage.Contains("&&&"))
                            {
                                StartPosition = TempMessage.IndexOf("&&&");
                                Tier4 = "<b>Tier 4: </b> " + TempMessage.Substring(0, StartPosition);
                                VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>" + Tier4;
 
                            }
                            else
                            {
                                Tier4 = "<b>Tier 4:</b> " + TempMessage;
                                VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>" + Tier4 + "<hr/>";
 
                            }
                        }
                        else
                        {
                            Tier3 = "<b>Tier 3:</b> " + TempMessage;
                            VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>" + Tier3 + "<hr/>";
 
                        }
                    }
                    else
                    {
                        Tier2 = "<b>Tier 2:</b> " + TempMessage;
                        VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>" + Tier2 + "<hr/>";
                    }
                }
                else
                {
                    Tier1 = "<b>Tier 1:</b> " + Node.Text;
                    VerifyMessageLabel.Text = VerifyMessageLabel.Text + Tier1 + "<hr/>";
                }
                //VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>";
            }
 
        }
        if (Node.Attributes["Status"].ToString() == "Disabled & Modified")
        {
            IntDisabledChildNodes = 0;
 
            if (Node.Level > 0)
            {
                if (Node.Parent.Controls.Count >= 1)
                {
                    foreach (RadTreeNode node in Node.ParentNode.Nodes)
                    {
                        if (node.Attributes["Status"] == "Disabled & Modified")
                        {
                            IntDisabledChildNodes = IntDisabledChildNodes + 1;
 
 
                        }
 
 
                    }
                }
                // If the number of Disabled Child nodes are equal to the count
                // of the parent's child nodes, then this means that all child nodes
                // are disabled and therefore we need to flag the parent node
                if (IntDisabledChildNodes >= Node.Parent.Controls.Count)
                {
                    // Get the full path of the Node using &&& as a separator
                    Message = Node.GetFullPath("&&&");
 
 
 
                    if (Message.Contains("&&&"))
                    {
                        StartPosition = Message.IndexOf("&&&");
                        //TempMessage = Message.Substring(0, StartPosition);
 
                        Tier1 = "<b>Tier 1:</b> " + Message.Substring(0, StartPosition);
                        TempMessage = Message.Substring(StartPosition + 3);
                        VerifyMessageLabel.Text = VerifyMessageLabel.Text + Tier1;
 
                        if (TempMessage.Contains("&&&"))
                        {
                            StartPosition = TempMessage.IndexOf("&&&");
                            //TempMessage = TempMessage.Substring(0, StartPosition);
 
 
                            Tier2 = "<b>Tier 2:</b> " + TempMessage.Substring(0, StartPosition);
                            TempMessage = TempMessage.Substring(StartPosition + 3);
                            VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>" + Tier2;
 
 
                            if (TempMessage.Contains("&&&"))
                            {
                                StartPosition = TempMessage.IndexOf("&&&");
 
 
                                Tier3 = "<b>Tier 3: </b> " + TempMessage.Substring(0, StartPosition);
                                TempMessage = TempMessage.Substring(StartPosition + 3);
                                VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>" + Tier3;
 
 
                                if (TempMessage.Contains("&&&"))
                                {
                                    StartPosition = TempMessage.IndexOf("&&&");
                                    Tier4 = "<b>Tier 4: </b> " + TempMessage.Substring(0, StartPosition);
                                    VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>" + Tier4;
 
                                }
                                else
                                {
                                    Tier4 = "<b>Tier 4:</b> " + TempMessage;
                                    VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>" + Tier4 + "<hr/>";
 
 
                                }
 
                            }
                            else
                            {
                                Tier3 = "<b>Tier 3:</b> " + TempMessage;
                                VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>" + Tier3 + "<hr/>";
 
 
                            }
 
 
 
                        }
                        else
                        {
                            Tier2 = "<b>Tier 2:</b> " + TempMessage;
                            VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>" + Tier2 + "<hr/>";
                        }
                    }
                    else
                    {
                        Tier1 = "<b>Tier 1:</b> " + Node.Text;
                        VerifyMessageLabel.Text = VerifyMessageLabel.Text + Tier1 + "<hr/>";
                    }
                    //VerifyMessageLabel.Text = VerifyMessageLabel.Text + "<br/>";
 
 
 
                }
 
 
            }
 
 
        }
 
 
    }
    if (VerifyMessageLabel.Text != "<br/><br/>")
    {
        VerifyErrorMessage.Visible = true;
        VerifyErrorMessage.Text = @"There are some nodes which have no children and have no Product / Contract / Function Location. Or they are disabled and their
                              parent nodes have no other non-disabled children.
                              Please correct these and reverify";
 
        VerifyCancelButton.Visible = false;
        ModalPopupExtender2.Show();
    }
    else
    {
        VerifyErrorMessage.Visible = true;
        VerifyErrorMessage.Text = @"All nodes verified successfully. Do you want to submit these changes to the database?";
        VerifyCancelButton.Visible = true;
        ModalPopupExtender2.Show();
 
    }
 
}
Can anybody help me with this verification code? I'd prefer to perform all of this in server side code.

Any help appreciated!

Thanks,
Gavin
Top achievements
Rank 1
 answered on 18 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?