Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
106 views
Hi people,
in the demo of TreeList it is written that "Its hybrid structure empowers you with the ability to visualize self-referencing data in a hierarchical view defining primary/foreign key relations and using identical objects for source."
I want to know if this control support non-self referencing data? Like

Code                 Chapter                Subchapter
----------------------------------------------------------
123456                12                          1234
456789                45                          4567
345678                34                          3456
124389                12                          1243

Here Chapter is the parent of subchapter.

12
     -1234
     -1243
45
     - 4567
34
    - 3456

Tell me can this control work for me?
Antonio Stoilkov
Telerik team
 answered on 07 Dec 2012
1 answer
154 views
Hi,

I have successfully deployed a test Silverlight application to SharePoint Online, which includes my trial Telerik controls. Specifically ChartView.

We do not however wish to develop future apps in Silverlight, for cross-browser/device compatibility reasons.

Am I able to use the ASP.Net versions of the same controls to develop ASP.Net applications or Webparts in SharePoint Online?

Note: SharePoint Online, not On-Premises.

Thanks,

Jason.
Stanimir
Telerik team
 answered on 07 Dec 2012
2 answers
106 views
Hi,
I have a grid in an editform of another grid. The datasource of the second grid is dependant on a datakeyvalue of the first grid. How do i do this in the NeedDataSource event of the second grid?
If I try and use the SelectedIndex I get nothing as first gris is in edit mode.
I am looking for something like below but unfortunately the row is not selected, just inedit mode:
Protected Sub UserNeedDatasource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs)
Dim DataKey As String = Me.Grid1.MasterTableView.DataKeyValues(Me.Grid1SelectedIndexes(0))("DataKeyName").ToString
Me.Grid2.DataSource = MyDataSource.GetData(DataKey)
end Sub

Any ideas?
Roger
Top achievements
Rank 1
 answered on 06 Dec 2012
6 answers
1.1K+ views
I want to know a way I can reload the RadGrid with the DataSource that it is originally loading from. Case Scenario would involve the user click on a button to refresh the RadGrid to return the original data from the database, because they don't want the updated changes on the RadGrid anymore. I've tried DataBind, but it does not do anything for me. Is there an event that I need to use to do what I need it to do?
I am using .ASPX and C#. Thanks in advanced.

 

protected void RadGrid1_Load(object source, GridNeedDataSourceEventArgs e)
{
    String ConnString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
    SqlConnection conn = new SqlConnection(ConnString);
    SqlDataAdapter adapter = new SqlDataAdapter();
    adapter.SelectCommand = new SqlCommand(@"SELECT columns FROM tables)", conn);
    DataSet myDataTable = new DataSet();
    conn.Open();
    try
    {
        adapter.Fill(myDataTable, "tables");
    }
    finally
    {
        conn.Close();
    }
    DataView myDataView = myDataTable.Tables["tabels"].DefaultView;
    RadGrid1.MasterTableView.DataSource = myDataView;
    RadGrid1.MasterTableView.DataBind();
}
Nancy
Top achievements
Rank 1
 answered on 06 Dec 2012
16 answers
200 views
Hi, I have a very annoying problem with my comboboxes that occurs not everytime but i would say ~5% of the time, testing on IE8 and FF 14.0.1. My scenario (using Q2 2012):

Im having 2 related comboboxes in a RadAjaxPanel which are filled once from a database. Each combobox filters each other since the first one contains the parents of the second. Im using server-side coding to do the filtering (by using item visibility, based on Parent (Attribute) property).

95%, everthing works like it should but i noticed that sometimes the filtering does not occur (selecting an element in the first combobox doesnt filter the second one at all...it visible items stays like there were). I though first that the postback was not occuring on those times but after investigation, it is (OnSelectedIndexChanged gets called and item visibility is set correctly for all items). It's just the displaying that dont get refreshed somehow. The only way I can do something is selecting something else in the first combobox and reselecting the one i really wanted (to force an index change)...then it filters.

I initially had AutoPostBack=True on both comboboxes and tried to put them to false and handle it on client-side (OnClientSelectedIndexChanged), like someone did on a forums. Problem still occuring ...but seems like less often so i kept it like that.

Here's a trimmed down version of my code:

aspx
<telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server">
               <div class="EnterpriseNodes1">
                    <telerik:RadComboBox ID="RadComboBox1" runat="server" Skin="WebBlue" MarkFirstMatch="true" Visible="false" AllowCustomText="true" Filter="StartsWith" CssClass="combo1" NoWrap="True" OnItemDataBound="RadComboBox1_ItemDataBound" AutoPostBack="false" OnSelectedIndexChanged="RadComboBox1_OnSelectedIndexChanged" OnClientSelectedIndexChanged="RadComboBox1_OnClientSelectedIndexChanged">
                    </telerik:RadComboBox>
                    <br />
                    <telerik:RadComboBox ID="RadComboBox2" runat="server" Skin="WebBlue" MarkFirstMatch="true" Visible="false" AllowCustomText="true" Filter="StartsWith" CssClass="combo2" NoWrap="True" OnItemDataBound="RadComboBox2_ItemDataBound" AutoPostBack="false" OnSelectedIndexChanged="RadComboBox2_OnSelectedIndexChanged" OnClientSelectedIndexChanged="RadComboBox2_OnClientSelectedIndexChanged">
                    </telerik:RadComboBox>
                    <br />
    </div>
</telerik:RadAjaxPanel>

js
function RadComboBox1_OnClientSelectedIndexChanged(sender, args) {
    __doPostBack('RadComboBox1', '');
}
 
function RadComboBox2_OnClientSelectedIndexChanged(sender, args) {
    __doPostBack('RadComboBox2', '');
}

cs
protected void Page_Load(object sender, EventArgs e)
    {
 
        if (!IsPostBack)
        {
             RadComboBoxItem item = null;
 
            item = new RadComboBoxItem();
            item.Value = "1";
            item.Text = "Canada";
 
            RadComboBox1.Items.Add(item);
 
            item = new RadComboBoxItem();
            item.Value = "2";
            item.Text = "USA";
 
            RadComboBox1.Items.Add(item);
 
            item = new RadComboBoxItem();
            item.Value = "3";
            item.Text = "BC";
 
            RadComboBox2.Items.Add(item);
 
            item = new RadComboBoxItem();
            item.Value = "4";
            item.Text = "NB";
 
            RadComboBox2.Items.Add(item);
 
            item = new RadComboBoxItem();
            item.Value = "5";
            item.Text = "ON";
 
            RadComboBox2.Items.Add(item);
 
            item = new RadComboBoxItem();
            item.Value = "6";
            item.Text = "CAL";
 
            RadComboBox2.Items.Add(item);
 
            item = new RadComboBoxItem();
            item.Value = "7";
            item.Text = "FLA";
 
            RadComboBox2.Items.Add(item);
 
            item = new RadComboBoxItem();
            item.Value = "8";
            item.Text = "NY";
 
            RadComboBox2.Items.Add(item);
 
 
            RadComboBox1.Text = "";
            RadComboBox1.ClearSelection();
            RadComboBox1.Visible = true;
 
            RadComboBox2.Text = "";
            RadComboBox2.ClearSelection();
            RadComboBox2.Visible = true;
        }
 
     }

protected void RadComboBox1_OnSelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {  
 
        FilterNext(ref RadComboBox1, ref RadComboBox2);
        
    }
 
private void FilterNext(ref RadComboBox cbCurrent, ref RadComboBox cbNext)
     {
         if (cbCurrent.Text == "Canada")
         {
             for (int i = 0; i <= cbNext.Items.Count - 1; i++)
             {
                 if (cbNext.Items[i].Text == "BC" || cbNext.Items[i].Text == "NB" || cbNext.Items[i].Text == "ON")
                 {
                     cbNext.Items[i].Visible = true;
                     //WriteLog("true " + cbNext.Items[i].Text);
                 }
                 else
                 {
                     cbNext.Items[i].Visible = false;
                     //WriteLog("false " + cbNext.Items[i].Text);
 
                 }
             }
         }
 
         if (cbCurrent.Text == "USA")
         {
             for (int i = 0; i <= cbNext.Items.Count - 1; i++)
             {
                 if (cbNext.Items[i].Text == "CAL" || cbNext.Items[i].Text == "FLA" || cbNext.Items[i].Text == "NY")
                 {
                     cbNext.Items[i].Visible = true;
                     //WriteLog("true " + cbNext.Items[i].Text);
                 }
                 else
                 {
                     cbNext.Items[i].Visible = false;
                     //WriteLog("false " + cbNext.Items[i].Text);
                 }
             }
         }
 
         cbNext.DataBind();
     }

For those who want to test it out...please spend time on selection changing.. I usually need  to spend like 2-3min to making it fail.

Please help and TIA
Martin Roussel
Top achievements
Rank 1
 answered on 06 Dec 2012
5 answers
141 views
The PivotGrid looks like a very useful tool. We've been doing this kind of thing by hand all the time for our clients, and it would be great to simplify it! There are a few things that would be nice to see.

Cell Alignment: The ability to control the alignment of cells. Numeric values are typically right-aligned, but there doesn't seem to be a way to control the alignment. We haven't experimented with applying CSS styles; it may be possible with that, but should be right in the structure of the tool.

Export: Having the ability to export to Excel or PDF would be very useful.

Fields Window; When we design forms with any kind of filtering options, the filtering items are usually grouped at the top with the data showing below. There isn't any layout that really suits this approach however; a layout that is wide but not very high would be ideal.
Derek
Top achievements
Rank 1
 answered on 06 Dec 2012
0 answers
53 views
Hi

I need help with RadTabStrip. I have 4 tabs...Tab 1, Tab 2, Tab 3 and Tab4. By default the users see Tab 1. Once the user changes the Tab 1 to any other tab...I need to save the data from the 1st tab in database. 

If the users click Tab 3. If Tab 2 is missing information I need to redirect the user to Tab 2. 

Currently I am using TabClick Event to save the data in database if the user is coming from Tab 1..it also save some info for Tab 2. If Tab 2 is missing some information I display javascript alert and SetActiveTab  (i.e; ...set_selectedIndex(2) to 2...but the problem is I get redirected to Tab 3 first and then to Tab 2....how can i cancel Tab 3 redirect using server side code.

Jinisha
Jinisha
Top achievements
Rank 1
 asked on 06 Dec 2012
3 answers
67 views
hi,
how to hide columns by uisng ColumnElement?

Thanks & Regards
Anzar.M
Kostadin
Telerik team
 answered on 06 Dec 2012
4 answers
1.6K+ views
Hi,

I use a dynamically created RadGrid which means the column unique names are not always the same. I perform some data modification on ItemDataBound based on a columns unique name which works as expected if the column exists.
    protected void grvReport_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridDataItem) 
        { 
            GridDataItem item = ((GridDataItem)e.Item); 
            item["coltrainerList"].Text = item["coltrainerList"].Text.Replace(",", "<br/>"); 
        } 
        // Other unrelated stuff 
    } 

Of course, if the column does not exist I get an error alert "Cannot find a cell bound to column name 'coltrainerList'". I expected this also - but I am unsure of how to determine if it exists or not. I tried the following:
if (item["coltrainerList"] != null) item["coltrainerList"].Text = item["coltrainerList"].Text.Replace(",", "<br/>"); 




Unfortunately, I still get the error alert. I have looked through the GridDataItem functions and not found one that can check if a unique column name exists in order to avoid this error.

Have I missed something?

Cheers.
Bertha
Top achievements
Rank 1
 answered on 06 Dec 2012
4 answers
65 views
Hello Team;


I always send prospects to Telerik site to look at the products so they'll purchase their own license for our development. I've heard that people like the very top menu item "Product Families" the way the arrow shows and the animation and how it appears. I would like to ask the team if there is a sample to show how we can accomplish this type of menu that is more engaging.

Thanks!
..Ben
Ben Hayat
Top achievements
Rank 2
 answered on 06 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?