Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
53 views
I would like to use RadScheduler in conjunction with a RadGrid.  Basically, I'd like to present events in the RadScheduler's Timeline View.  When a user clicks on a day in the Timeline view, I would like to load a list of all of the day's events in a RadGrid.

Is there a simple way to do this?
Peter
Telerik team
 answered on 09 Jan 2009
2 answers
144 views
i have a table that has atleast 20 columns so i want to be able to freeze certain column when i scroll to the right. say i want to freeze column 2 and 3 when i scroll over to the right to check out column 20 and more. thank you for your help
Dimo
Telerik team
 answered on 09 Jan 2009
6 answers
159 views
I am using Load on Demand with ShowMoreResults and I am binding to the combobox on the intitial Page_Load so the first page of results is in the combobox before a user actually requests them. I am pretty sure that this initial binding on the page_load is what is causing the problem, but it is necessary for my requirements.

When I click the more results button, the ItemsRequested event is fired off and I add more items to the combobox. When the results are finished being loaded into the combobox, I get the original first page of results with the second page after it, then the first page of results again.

Why am I getting these repeat items? How can I stop these repeat items from being added. It has something to do with the fact that I am making this initial load. I noticed when the ItemsRequested event gets called and I don't make that initial load, the combobox.items.count always starts off at 0 when the ItemsRequested event begins, but when I make that initial load, the count is always the size of my first page 100 when it begins.

Here is my aspx code for the combobox:
<telerik:RadComboBox ID="testDdl" runat="server" Width="350px" Height="200px" DataTextField="DocumentId" DataValueField="MainId" Skin="Outlook" AllowCustomText="true" ShowToggleImage="true" MarkFirstMatch="true" OnItemsRequested="TestDdl_ItemsRequested" EnableLoadOnDemand="true" ShowMoreResultsBox="true" /> 
 

Here is my page load event:

protected void Page_Load(object sender, EventArgs e)  
{  
   Documents testDocuments = new Documents();  
     
   for (int i = 0; i < 100; i++)  
   {  
      Document document = new Document();  
      document.DocumentId = i.ToString();  
      document.MainId = i;  
      testDocuments.Add(document);  
   }  
 
   testDdl.DataSource = testDocuments;  
   testDdl.DataBind();  

Here is my ItemsRequested event: 

protected void TestDdl_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)  
{  
   int myTotalRecordCount = 1000;  
 
   const int itemsPerRequest = comparisonSetPageSize;  
   int itemOffset = e.NumberOfItems;  
   int endOffset = itemOffset + itemsPerRequest;  
 
   if (endOffset > myTotalRecordCount)  
   {  
      endOffset = myTotalRecordCount;  
   }  
 
   e.EndOfItems = endOffset == myTotalRecordCount;  
 
   for (int i = itemOffset; i < endOffset; i++)  
   {  
      RadComboBoxItem newnewItem = new RadComboBoxItem(i.ToString(), i.ToString());  
 
      testDdl.Items.Add(newItem);  
   }  
 
   e.Message = "Items 1 - " + endOffset + " of " + myTotalRecordCount;  
Veselin Vasilev
Telerik team
 answered on 09 Jan 2009
2 answers
111 views
Clicking on the sort icon does nothing. Clicking on the header text works fine.

Grid markup:
<telerik:RadGrid ID="RadGrid1" runat="server" 
     AllowSorting="true" 
     AllowPaging="true" 
     AllowMultiRowSelection="true" 
     AutoGenerateColumns="false" 
     PageSize="25"
 
    <PagerStyle AlwaysVisible="true" Mode="NextPrev" /> 
 
    <MasterTableView> 
        <Columns> 
            <telerik:GridBoundColumn UniqueName="Description" DataField="Description" HeaderText="Message"
            </telerik:GridBoundColumn> 
 
            <telerik:GridBoundColumn UniqueName="Status" DataField="Status" HeaderText="Status"
                <HeaderStyle Width="80" /> 
            </telerik:GridBoundColumn> 
        </Columns> 
    </MasterTableView> 
     
    <ClientSettings> 
        <DataBinding Location="~/WebService.asmx" SelectMethod="GetData" /> 
        <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" /> 
        <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="300" /> 
    </ClientSettings> 
</telerik:RadGrid> 

Version 2008.3.1105.35. Browsers: all.
Rosen
Telerik team
 answered on 09 Jan 2009
1 answer
233 views
Has anyone successfully employed LINQ to search the Nodes collection for a substring in the node's text value?  I have a need to allow site visitors to search the node list without necessarily needing to know the full text of the node.

For example, if I have "Bob's Pizza" buried in the hierarchy, I'd like them to be able to search for "pizza" and select that node.  My thought was to use LINQ to query the collection for matches then allow the person to go from match to match.

Has anyone done this before?  Is it possible?

Josh
Atanas Korchev
Telerik team
 answered on 09 Jan 2009
1 answer
94 views
been working with your charts for a bit now, i have to say its very rigid to work with

i cant figure out how to display what each color in a pie chart corresponds to?

can someone please help me

http://www.scottgu.com/blogposts/chart/step2.png, look at the pie charts, i am trying to accomplish the same effect, as to show what each color corresponds to

the only reason i am suggesting Telerik for our company wide use, is because it actually works under web gardeners, but i have to say your framework isnot too smooth to work with

where can i find more help

Anyone can help me with this ?

Thanks,
Amir
Ves
Telerik team
 answered on 09 Jan 2009
1 answer
108 views
Hello,

I had a question i am creating a bar chart and and i have a Collection of keyValuepair of strings and double like so

I

ICollection<KeyValuePair<stringdouble>> topCompanies = new List<KeyValuePair<stringdouble>>(); 

now what i want to happen is for bar chart to show me the string value in KeyValuePair on xAxis and the double value on yAxies

now the yAxies is binding fine, but xAxis is not showing the string value its showing 1.2.3....

how can i accomplish this ?

Also to addition to this how can i apply .NET formattings to the double values like if i want 128.01 to display as $128.01 in chart?

Thanks,
Amir
Ves
Telerik team
 answered on 09 Jan 2009
1 answer
116 views

In a scenario where the rad editor is used as a replacement for the moss editor in list item editing, if you click edit on an item with two columns - title and a multiple lines of text column, make no changes to the text column thats using the rad editor control, but make a change to the title and click ok, the alert thats registered on the list will show that the text column has changed when it hasn't.

The reason seems to be that the guid in the first div element defined in the html of the control changes each time you click edit on the list item. 

Using the default moss editor this is NOT the case.

If i need to clarify this problem further please let me know.

Tom.
Stanimir
Telerik team
 answered on 09 Jan 2009
1 answer
202 views
Hi guys,

I need help with sorting a customised GridTemplateColumn. The column snippet is shown below:

<telerik:GridTemplateColumn UniqueName="NameCommandColumn" AllowFiltering="False"  
        ItemStyle-Width="150" HeaderStyle-Width="150" ShowSortIcon="true" > 
            <HeaderTemplate>Name</HeaderTemplate> 
            <ItemTemplate>               
                <asp:HyperLink ID="hlnkContactName" runat="server"></asp:HyperLink>  
                <asp:Label ID="lblContactName" runat="server"></asp:Label> 
            </ItemTemplate>          
        </telerik:GridTemplateColumn>    

The column is used to display names either as a hyperlink or a simple label depending on the user's access rights. The main problem I have is that the values for these controls are generated at RadGrid's Item_Created event where it concatenates 2 strings (i.e. GivenNames & Surname) and binds the final output to the controls. See snippet below:

        protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e) 
        {             
            if (e.Item is GridDataItem) 
            { 
                 
                //Check the user's permissions. if the user has edit permissions then allow edit.                 
                 
                if (SecurityHelper.IsAllowedTo("Modify","PhoneList")) 
                { 
                    #region Instantiate Name link 
                    HyperLink hlnkContactName = (HyperLink)e.Item.FindControl("hlnkContactName"); 
                    if (hlnkContactName != null
                    { 
                        Label lblContactName = (Label)e.Item.FindControl("lblContactName"); 
                        if (lblContactName != null
                            lblContactName.Visible = false
 
                        hlnkContactName.Attributes["href"] = "#"
                        hlnkContactName.Attributes["onclick"] = string.Format("return ShowForm('{0}')"
                            Constants.URL_PHONELISTEDITOR + "?" + Constants.QUERYSTRING_PARTYID + "=" + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["PartyId"].ToString()); 
                        hlnkContactName.Text = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GivenNames"].ToString() +" "
                            e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Surname"].ToString();  
 
                    } 
                    #endregion 
                } 
                else 
                { 
                    #region Instantiate Name Label 
                    Label lblContactName = (Label)e.Item.FindControl("lblContactName"); 
                    if (lblContactName != null
                    { 
                        HyperLink hlnkContactName = (HyperLink)e.Item.FindControl("hlnkContactName"); 
                        if (hlnkContactName != null
                            hlnkContactName.Visible = false
 
                        lblContactName.Visible = true
                        lblContactName.Text = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["GivenNames"].ToString() +" "
                            e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Surname"].ToString();  
                    } 
                    #endregion                    
                }
          }
     } 

What I would like to do, is to be able to sort the column by its final output. but I'm not sure how to go about doing it. Please help!

Regards

Jonathan
Shinu
Top achievements
Rank 2
 answered on 09 Jan 2009
3 answers
161 views
I have a ComboBox defined in a grid column as follows:

<telerik:GridTemplateColumn UniqueName="den_type_id" HeaderText="Den Type">  
    <ItemStyle Width="175" /> 
    <ItemTemplate> 
        <asp:Label Width="170" CssClass="gridDropDownLabel" runat="server" ID="lbl_den_type_id" Text='<%#DataBinder.Eval(Container.DataItem, "den_type_nm")%>' /> 
    </ItemTemplate> 
    <EditItemTemplate> 
        <telerik:RadComboBox Width="170" MarkFirstMatch="true" Skin="scSkin" EnableEmbeddedSkins="false" DataTextField="den_type_nm" DataValueField="den_type_id" DataSourceID="DenTypeDataSource" ID="dd_den_type_id" runat="server" SelectedValue='<%#Bind("den_type_id") %>' Text="Select a Type" /> 
    </EditItemTemplate> 
</telerik:GridTemplateColumn> 

I also have a function in the code behind that adds a row

    Private Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
        If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then  
            Dim item As GridEditableItem = e.Item  
            Dim combo As RadComboBox = item.FindControl("dd_den_ldr_id")  
 
            combo.Items.Insert(0, New RadComboBoxItem("Select a Den Leader", "0"))  
        End If  
    End Sub 

Is there a way to add an image to each item so that there's text + image? In the demos, they use ImagePath, but I can't figure out if this property is available when using the combobox in a grid column. Thanks.
Veselin Vasilev
Telerik team
 answered on 09 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?