Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
74 views
Hi,

I have a grid with many columns and the header is custom header..As Telerik does not support FrozenColumn with Custom headers so i am going for the next option that is ExpandCollapseColumns where user can click on the column he want to view and it expands and collpases accordingly..But i dont see any good expample.

Can you please help me with this as early as possible.

I just want a grid where colmns can be clicked for expanding and collapsing like the rows do.
Iana Tsolova
Telerik team
 answered on 30 May 2011
1 answer
90 views
Hello,

I've got a web form that opens a rad window. When the user closes the rad window the web form controls gets updated. This update takes a while so I'd like to have a loading panel display on the web form so that the user knows that something is happening.

Can you help with this?

-Dan
Svetlina Anati
Telerik team
 answered on 30 May 2011
3 answers
143 views
Hello guys.

Is there a way to use a different source for each column is a list view?

For example, I have a listview with 5 columns, I'll receive 5 tables from the database (dataset). I would like to set each column to get data from each database table.

Does anyone know how I do this?

Column 1     Column 2     Column 3     Column 4    Column 5
userA, idA    userB, idB    userC, idC   userD, idD  userE, idE
userF, idF    userG, idG   userH, idH    userI, idI
userJ, idJ                          userK, idK    userL, idL
userM, idM                        userN, idN
userO, idO                        userP, idP
userQ, idQ
userR, idR                        
userS, idS
userT, idT                        
                   
                                                            
Radoslav
Telerik team
 answered on 30 May 2011
2 answers
131 views
Good morning,

I wonder If somebody could help me with my issue.

What I need to achieve is change RadWindow border's opacity (not background) as it's in this example:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/listviewsliderwindowrotator/defaultcs.aspx?product=listview

The problem is when I choose some standard skin, e.g. skin="Hay", then the RadWindow border is without opacity.

For futher info please check images in the attachment.

Please help me to solve this issue.

Best regards

Vasssek
Vasssek
Top achievements
Rank 1
 answered on 30 May 2011
2 answers
69 views
OK here is the scenario. I have a website with a master page set up, and within one of the pages I am usin the grid control, which is set up to run off from partial postbacks. Everything works fine other then the control breaks out of the div that is set up to be a wrapper for the contentplaceholder, that is filled by the page with the grid. So to give you an idea here is a general idea of what i have below:

CSS:
#mainContentWrapper
{
     width:100%; 
    //No height is set intentionally to allow for dynamic div growth
}

Master Page:

<div id="mainContentWrapper">
    <contentplaceholder></contentplaceholder1>
</div>

Data Page:
<contentplaceholder>
    <telerik:radgrid></telerik:ragrid>
</contentplaceholder>

The problem is as soon as you do anything like change record display size from the client, it breaks out of the mainContentWrapper div instead of the forcing the div to expand like it should. This would work with any other functionality that isnt using the telerik controls so my assumption is that are some point in rendering the grid control is changed to be absolute and thus is placed above the div and will not adjust its size?
Radoslav
Telerik team
 answered on 30 May 2011
7 answers
162 views
Hello,

I have raddock inwhich usercontrols are loaded dynamically. On clicking the link button in the usercontrol data refreshes.

I want to animate (replace icon with some gif file till the time page is refreshing) the raddock itemcontent image while page is refreshing. Plz see attached image.

Can you plz suggest me that how can achieve this ?
Pero
Telerik team
 answered on 30 May 2011
1 answer
213 views
Hi,

We have a RadTreeView and inside its NodeTemplate we have a RadComboBox. In the Itemtemplate of RadComboBox we have a checkbox. AutoPostback property of checkbox is set to true but when I check the checkbox the page refreshes (a postback occurs but not an Ajax postback although RadTreeView is ajaxified using RadAjaxManager) but CheckedChanged event doesn't fire.

I set the data for RadTreeView on Page Load and Node Expand functions. And I set the data for RadComboBox on ItemsRequested method of RadComboBox since LoadOnDemand is set to true.

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelDefault" runat="server">
</telerik:RadAjaxLoadingPanel>
<fieldset>
    <div>
        <telerik:RadTreeView ID="TreeViewUnits" runat="server"
            OnNodeExpand="TreeViewUnits_NodeExpand"
            onnodecreated="TreeViewUnits_NodeCreated">
            <NodeTemplate>
                <asp:Literal ID="LtrName" runat="server" Text=""></asp:Literal>
                <%# DataBinder.Eval(Container, "Text") %>
                <telerik:RadComboBox runat="server" ID="ComboTags" Height="190px" Width="420px" EnableLoadOnDemand="true"
                    HighlightTemplatedItems="true" OnDataBound="ComboTags_DataBound" OnItemDataBound="ComboTags_ItemDataBound"
                    OnItemsRequested="ComboTags_ItemsRequested">
                    <HeaderTemplate>
                        <ul>
                            <li class="col1">Selected</li>
                            <li class="col2">Tag Name</li>
                        </ul>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <ul>
                            <li class="col1">
                                <asp:CheckBox ID="CheckTag" runat="server" AutoPostBack="True"
                                    oncheckedchanged="CheckTag_CheckedChanged" /></li>
                            <li class="col2">
                                <%# DataBinder.Eval(Container.DataItem, "Name") %></li>
                        </ul>
                    </ItemTemplate>
                    <FooterTemplate>
                        A total of
                        <asp:Literal runat="server" ID="LtrComboTagsCount" />
                        items
                    </FooterTemplate>
                </telerik:RadComboBox>
            </NodeTemplate>
        </telerik:RadTreeView>
    </div>
</fieldset>


protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        MyDataBindSections(TreeViewUnits);
    }
 
    RadAjaxManager ajax = RadAjaxManager.GetCurrent(this.Page);
    ajax.AjaxSettings.AddAjaxSetting(TreeViewUnits, TreeViewUnits, RadAjaxLoadingPanelDefault);
}
 
private void MyDataBindSections(RadTreeView radTree)
{
    List<Scope> scopes = SessionHandler.UserSession.Scopes;
 
    radTree.Nodes.Clear();
    foreach (Scope scope in scopes)
    {
        RadTreeNode node = GetUnitNode(scope.Unit, false);
        radTree.Nodes.Add(node);
    }           
}
 
public static RadTreeNode GetUnitNode(Unit unit, bool expand)
{
    RadTreeNode unitNode = new RadTreeNode();
    unitNode.Text = unit.Name;
    unitNode.Attributes.Add("NodeType", "Unit");
 
    RadTreeNode unitTagNode = new RadTreeNode();
    unitTagNode.Text = "Tags";
    unitTagNode.Attributes.Add("NodeType", "UnitTag");
    unitTagNode.Attributes.Add("UnitId", unit.Id.ToString());
    unitNode.Nodes.Add(unitTagNode);           
 
    if (expand)
    {
        AddChildUnits(unitNode, unit);
        unitNode.ExpandMode = TreeNodeExpandMode.ClientSide;
    }
    else
    {
        unitNode.ExpandMode = TreeNodeExpandMode.ServerSide;
    }
    return unitNode;
}
 
public static void AddChildUnits(RadTreeNode node, Unit unit)
{
    List<Unit> childUnits = unit.ChildUnits.ToList();
 
    RadTreeNode unitNodeFolder = new RadTreeNode();
    unitNodeFolder.Text ="Subunits( " + unit.ChildUnits.Count + " )";
    unitNodeFolder.Attributes.Add("NodeType", "UnitFolder");
    if (childUnits.Count > 0)
    {
        unitNodeFolder.Expanded = true;
    }
    node.Nodes.Add(unitNodeFolder);
 
    foreach (Unit childUnit in childUnits)
    {
        unitNodeFolder.Nodes.Add(GetUnitNode(childUnit, false));
    }
}
 
protected void TreeViewUnits_NodeExpand(object sender, RadTreeNodeEventArgs e)
{
    RadTreeNode node = e.Node;
 
    if (node.Attributes["NodeType"] != null)
    {
        if (node.Attributes["NodeType"] == "Unit")
        {
            UnitService service = new UnitService();
            Unit unit = service.GetUnit(int.Parse(node.Value));
 
            if (!unit.IsLeaf)
            {
                AddChildUnits(node, unit);
            }
        }
        node.Expanded = true;
    }
}
 
protected void ComboTags_DataBound(object sender, EventArgs e)
{
    RadComboBox comboTags = sender as RadComboBox;
    ((System.Web.UI.WebControls.Literal)comboTags.Footer.FindControl("LtrComboTagsCount")).Text =
        Convert.ToString(comboTags.Items.Count);
}
 
protected void ComboTags_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e)
{
    System.Web.UI.WebControls.CheckBox check =
        e.Item.FindControl("CheckTag") as System.Web.UI.WebControls.CheckBox;
    check.Attributes["TagId"] = ((Tag)e.Item.DataItem).Id.ToString();
}
 
protected void ComboTags_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
{
    UnitService service = new UnitService();
    RadComboBox comboTags = sender as RadComboBox;
    int unitId = 0; //Find unit id        
    comboTags.DataSource = service.GetTags(unitId);
    comboTags.DataBind();
}
 
protected void TreeViewUnits_NodeCreated(object sender, RadTreeNodeEventArgs e)
{
    if (e.Node.Attributes["NodeType"] == "UnitTag")
    {
        e.Node.FindControl("ComboTags").Visible = true;
    }
    else
    {               
        e.Node.FindControl("ComboTags").Visible = false;
    }
    e.Node.FindControl("LtrName").Visible = true;
    ((System.Web.UI.WebControls.Literal)e.Node.FindControl("LtrName")).Text = e.Node.Text;
}
 
protected void CheckTag_CheckedChanged(object sender, EventArgs e)
{
    System.Web.UI.WebControls.CheckBox check =
        sender as System.Web.UI.WebControls.CheckBox;
    int unitId = 0; //Find unit id
    int tagId = int.Parse(check.Attributes["TagId"]);
    UnitService service = new UnitService();
    if (check.Checked)
    {
        //service.AddTag(unitId, tagId);
    }
    else
    {
        //service.RemoveTag(unitId, tagId);
    }
}

How can I fire CheckedChanged event and also enable Ajax on checkbox click?

Thank you.
Dimitar Terziev
Telerik team
 answered on 30 May 2011
3 answers
85 views
Hello I am new to telerik radwindows so I may not be asking the question the right way...pls forgive.
But I have requirements to update our application to allow toggling of clients/people. The current application (I'm told uses "scope" to designate when a user selects a client then maps clientid, name, etc to session memory for updates to db. I need to update application to allow for a main page where listing all clients and allow for user to select a client in a radwindow with the scope/memory data, do db updates, then be able to minimize that radwindow and select another clientid and updates......more same

I think I would just call radwindow and give it the clientid as the name. ? Right? Also how do I load the "scope" and memory to toggle and make sure my radwindow has the right client info when I do db updates?

Any help is appreciated

Main Window/User home page
Left side                            Right side content display
Navigator Panel            Client ID, Name of Client, etc

  • Client 1
  • Client 2
  • Client 3
  • Cielnt 4
Marin Bratanov
Telerik team
 answered on 30 May 2011
2 answers
70 views
Hi All,
I have a rad grid which is having a Check box Column and Text box in Item Template. I am changing the value in the grid then go the second page by page index changing. when i come back to first page my previous tyeped values are reseting. I want to insert the whole grid value by one submit button.. Can any one give me the best solution for the above problem..

kasi
Top achievements
Rank 1
 answered on 30 May 2011
1 answer
165 views
Hi,

Just started using your RadGrid for ASP.net here at work and have a table with about 500,000 rows that I am testing with.  Sorting/Paging/Filtering all works fine and I am able to build a custom linq query to only return the rows i need to be displayed...but, I'm not having any luck doing that with grouping as I need to return the entire resultset for radgrid to group correctly.

As the rows increase in the database table, so does the time it takes for the page to load when grouped or when performing any type of grouping, i'm using the following code for testing, and currenly have PageSize set to 10, as per the default.

Protected Sub RadGrid1_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
    Dim db As New TrackerDataContext
    db.Log = New System.Diagnostics.DebuggerWriter
    Dim query = From p In db.posts
                Where p.parentid = 0
                Select p
    If String.IsNullOrWhiteSpace(RadGrid1.MasterTableView.FilterExpression) = False Then
        query = query.Where(RadGrid1.MasterTableView.FilterExpression)
    End If
    For Each exp As GridSortExpression In RadGrid1.MasterTableView.SortExpressions
        query = query.OrderBy(String.Format("{0} {1}", exp.FieldName, exp.SortOrder.ToString))
    Next
    Dim start As Integer = RadGrid1.CurrentPageIndex * RadGrid1.PageSize
    Dim max As Integer = RadGrid1.PageSize
    RadGrid1.AllowCustomPaging = True
    'we always need count
    RadGrid1.VirtualItemCount = query.Count
    If isGrouping Or RadGrid1.MasterTableView.GroupByExpressions.Count > 0 Then
        start = 0
        max = RadGrid1.VirtualItemCount
        RadGrid1.AllowCustomPaging = False
    End If
    RadGrid1.DataSource = query.Skip(start).Take(max)
End Sub

Private isGrouping As Boolean = False
Protected Sub RadGrid1_GroupsChanging(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridGroupsChangingEventArgs) Handles RadGrid1.GroupsChanging
    isGrouping = True
    If e.Action = GridGroupsChangingAction.Ungroup AndAlso RadGrid1.MasterTableView.GroupByExpressions.Count = 1 Then
        isGrouping = False
    End If
End Sub

Is there any way to improve the performance?

Take Care
Pavlina
Telerik team
 answered on 30 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?