Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
252 views
I have an xml document formated like this that I am populating a grid with using Autogenerated columns.  the Google column does not show as a hyperlink.  is there a way to make the autogenerated hyperlink column?


<?xml version="1.0" encoding="utf-16" ?>
- <Users>
  <USER FirstName="Keith" MiddleName="A" LastName="Delman" Address1="" Address2="" City="Atlanta" State="Georgia" Zip="30301"  Google=http://www.google.com/search?hl=en&rls=GGLD,GGLD:2004-50,GGLD:en&q=%22Ted%20Slinkard%22+%22Oncology%22&spell=1 />
</Users>
Stuart Hemming
Top achievements
Rank 2
 answered on 22 Jul 2009
1 answer
119 views
Hi All

I am using Telerik 2009 version. I am using a telerik grid to bind some data. The grid i am binding uses some special formatting so for that i have made EnableEmbeddedSkins as "False" enableTheming as "False" and SKin="" and hence i am able to add some effects on my rows of telerik Grid. If i donot use Skin="" then i am getting ugly buttons in place of Expand Collapse button images and Filter menu Options  and if  i am using SKin as "" then i am getting the desired things(i.e images)

BUT the issue comes with the filter menu, i want to add skin to the filter menu and for that i have added EnableEmbeddedSkins as "True" enableTheming = "True" and SKin="Gray" but i am not getting any skins over there which is making the Filter Menu ugly(i.e without any skin) please help me for the same that how can i apply the skin without losing my color properties that i have set for the Grid.

Any Immediate help will be highly appreciated.. Thanks Ahead!!



Iana Tsolova
Telerik team
 answered on 22 Jul 2009
4 answers
316 views
Hi,

I would like to set EnableAjax to false on the AjaxManager but only when the request is triggered via the OnAjaxRequest property and not when every other Ajax request is called.

Example in the documentation states I can force a postback via:

function onRequestStart(sender, args) { 
            args.set_enableAjax(false); 
        }; 

This works fine but it will of course stop all my Ajax requests will it not?

I was hoping I could do:

function ajaxRequest() { 
            var ajaxManager = $find("<%= ajaxManager.ClientID %>"); 
            ajaxManager.set_enableAjax(false); 
        } 

or

protected void ajaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e) 
    { 
        ajaxManager.EnableAJAX = false; 
 
        // then call server side code 
    }  

but neither seem to work. The former because the event does not exist and the latter because it is too late in the page lifecycle to set enable ajax to false. Any ideas how I achieve this please?








Daniel
Telerik team
 answered on 22 Jul 2009
2 answers
629 views
Hi,

I am converting a regular asp:drodownlist to a rad ComboBox.  It is a year drop down that gets populated on a formula from the code behind.  However, I can't seem to get the SelectedValue from the ComboBox in the same way I can from the asp:dropdownlist.

Here is my code behind for populating the asp:dropdownlist:
private void BindYears() 
    { 
        DateTime firstyear = DateTime.Now.AddYears(-62); 
 
        for (int i = 0; i > -47; i--) 
        { 
            DateTime year = firstyear.AddYears(i); 
            ddlYear.Items.Add(new ListItem(year.Year.ToString())); 
        } 
 
        ddlYear.SelectedIndex = 0; 
    } 
I changed "ListItem" to "RadComboBoxItem" and the combobox populated correctly.  However, upon postback of the combobox value I got an error as if the 'Value' wasn't being read.

Here is the codebehind for pulling the values from the dropdowns: 
private int Month 
    { 
        get { return Convert.ToInt32(ddlMonth.SelectedValue); } 
        set { ddlMonth.SelectedValue = value.ToString(); } 
    } 
 
    private int Day 
    { 
        get { return Convert.ToInt32(ddlDay.SelectedValue); } 
        set { ddlDay.SelectedValue = value.ToString(); } 
    } 
 
    private int Year 
    { 
        get { return Convert.ToInt32(ddlYear.SelectedValue); } 
        set { ddlYear.SelectedValue = value.ToString(); } 
    } 
 
    public DateTime SelectedDate 
    { 
        get 
        { 
            try 
            { 
                DateTime selecteddate = Convert.ToDateTime(Month + "/" + Day + "/" + Year); 
                return selecteddate; 
            } 
            catch 
            { 
                throw new Exception("The date you selected is not valid"); 
            } 
        } 
        set 
        { 
            try 
            { 
                Month = value.Month; 
                Day = value.Day; 
                Year = value.Year; 
            } 
            catch (Exception ex) 
            { 
            } 
        } 
    } 

These worked fine for asp:dropdownlist and for statically configured radcomboboxes.  No on the dynamic "year" when using a radcombobox.

Stuck.  Any help would be appreciated.  Thanks.
joe
Joe
Top achievements
Rank 1
 answered on 22 Jul 2009
6 answers
549 views
Hi (again),

I have the following ListView definition:

<telerik:RadListBox ID="radListBoxGroups" runat="server" 
                                                    AllowDelete="false"  
                                                    AllowReorder="false" 
                                                    AllowTransfer="true" 
                                                    AllowTransferDuplicates="false" 
                                                    AllowTransferOnDoubleClick="true" 
                                                    CheckBoxes="false" 
                                                    SelectionMode="Multiple" 
                                                    TransferMode="Move" 
                                                    Height="300" 
                                                    Width="180" 
                                                    TransferToID="radListBoxGroupsSelected" 
                                                > 
                                                    <ButtonSettings Position="Right"  
                                                        RenderButtonText="false"  
                                                        ShowDelete="false"  
                                                        ShowReorder="false"  
                                                        ShowTransfer="true"  
                                                        ShowTransferAll="false"  
                                                        VerticalAlign="Middle" /> 
                                                </telerik:RadListBox> 
                                                <telerik:RadListBox ID="radListBoxGroupsSelected" runat="server" 
                                                    Height="300" Width="170"> 
                                                </telerik:RadListBox> 

And I use the following code to populate it:

            var query = from dg in _dataGroups 
                        join dgi in _originalDataGroupItems on dg.ID equals dgi.ParentDataGroup.ID into sr 
                        from x in sr.DefaultIfEmpty() 
                        select new { DataGroupID = dg.ID, IsEnabled = x != null, DataGroupName = dg.Name }; 
 
            foreach (var q in query) 
            { 
                RadListBoxItem radListBoxItem=new RadListBoxItem(q.DataGroupName,q.DataGroupID.ToString()); 
                radListBoxGroups.Items.Add(radListBoxItem); 
                if (q.IsEnabled) 
                { 
                    radListBoxItem.Selected = true;                  
                } 
            } 

I have traced through and some items are set to Selected==true, yet the ListView does not reflect this. The UI does not move items to the right-hand list and the SelectedItems collection returns Count==0.

What am I doing wrong?

Nathan J Pledger
Top achievements
Rank 2
 answered on 22 Jul 2009
3 answers
634 views
Hello, I have RadGrid which is populated from a data table and the columns for the grid are Autogenerated...since business logic prevents me from defining a telerik:GridHyperLinkColumn at design time how can I add a Hyperlink to a column that was auto generated. I would like it to appear like a design time telerik:GridHyperLinkColumn column where the columns data's text is hyperlinked  I also trap the grids ItemDataBound event and build the hyperlink dynamically using the data from other columns in the grid.

Thanks
Stuart Hemming
Top achievements
Rank 2
 answered on 22 Jul 2009
1 answer
114 views
Hi Telerik,

I have a radgrid with items say(Problem name, start_date, end_date, comments). The grid binds by joining two queries becoz in my table structure one table contains the Problem name and Problem Id (let's say <table_problem>) and another one with start_date, end_date and comments(let's say <table_date>) etc. I bind the grid by joining these two tables. When I double click on grid it would expand the record in edit mode and in edit mode the problem name should be dropdown and all others are textbox and the problem name should bind with problem id and problem name. So here I am unable to bind the dropdown. What ever the queries required for this table should insert/update/delete record in these two tables. So please help me. How to bind the dropdown and all other controls in edit mode.
This is very urgent. Please reply me soon.

Thanks,
Monalisa
Pavlina
Telerik team
 answered on 22 Jul 2009
1 answer
101 views
Hello

In my AdvancedInsertTemplate i have :
<tr> 
 <td> 
  <asp:Label ID="Label2" AssociatedControlID="CB_Groupe" runat="server" CssClass="inline-label">Groupe :</asp:Label> 
 </td> 
 <td> 
  <telerik:RadComboBox runat="server" ID="CB_Groupe" DataTextField="Text" DataValueField="Key" 
    Width="230px" Skin="Black" SelectedValue='<%# Bind("GroupeID") %>' 
    DataSource="<%# GetAvailableUsers(Container) %>"> 
  </telerik:RadComboBox> 
 </td> 
</tr> 
 
<tr> 
 <td> 
  <asp:Label ID="Label5" AssociatedControlID="CB_Forfait" runat="server" CssClass="inline-label">Formule :</asp:Label> 
 </td> 
 <td> 
  <telerik:RadComboBox runat="server" ID="CB_Forfait" DataSourceID="ForfaitsDataSource"
    DataTextField
="FormuleComplete" DataValueField="comptes_groupes_id" Width="230px" Skin="Black"
    SelectedValue='<%# Bind("ForfaitID") %>'> 
  </telerik:RadComboBox> 
 </td> 
</tr> 
 

When i want to add a control parameter on the ForfaitsDataSource (AccessDataSource). I haven't the access to the control because the control is in the AdvancedInsertTemplate.

<asp:AccessDataSource runat="server" ID="GroupesDataSource" DataFile="~/App_Data/bdd.mdb" 
  SelectCommand="SELECT * FROM [groupes]"> 
</asp:AccessDataSource> 
<asp:AccessDataSource runat="server" ID="StudiosDataSource" DataFile="~/App_Data/bdd.mdb" 
  SelectCommand="SELECT * FROM [studios] ORDER BY [Ordre]"></asp:AccessDataSource> 
<asp:AccessDataSource runat="server" ID="ForfaitsDataSource" DataFile="~/App_Data/bdd.mdb" 
  SelectCommand="SELECT [comptes_groupes_id], [id_groupe], [id_tarif], [nb_heures_restantes], [Studio]&', '& [duree]&'h, Backline : '&[comptes_groupes].[backline]&' , '& [nb_heures_restantes]&'h restante(s)' as [FormuleComplete]  from [comptes_groupes], [tarifs_studios], [studios] where [id_tarif] = [tarifs_studios_id] and [studios].[id] = [id_studio]"> 
 <SelectParameters> 
   (ControlParameter here ?) 
 </SelectParameters> 
</asp:AccessDataSource> 




I want, when the id_groupe is changed, the ForfaitsDataSource filter the SQL request (in the ForfaitsDataSource SelectCommand : "(...) AND id_groupe = (id_groupe selected in the control)" )

Any ideas ?

Thanks in advance :)
Peter
Telerik team
 answered on 22 Jul 2009
1 answer
936 views
Hello Telerik,

We have a rad grid control on a page. When the large amount of data is to be displayed, following error is thrown:

Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.

Please provide the solution for this as soon as possible.

Thanks
Mira
Telerik team
 answered on 22 Jul 2009
6 answers
160 views
Hi,

My scenario has two types, 'Type2' and 'Type3', that extends from 'Type1'. I'm trying to set a 'Type1' list with 'Type2' and 'Type3' objects as a DataSource to grid and i'm getting the following exception message:

"Unable to cast object of type 'Type2' to type 'Type3'."

Is this a bug or i missed something ?

Thanks.
Josemi
TriZetto
Top achievements
Rank 1
 answered on 22 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?