Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
325 views
I am trying to get the selected value of a DropDownList which is created in GridTemplateColumn.

<telerik:GridTemplateColumn HeaderText="Style" UniqueName="STYLE">
    <ItemTemplate>
        <asp:DropDownList runat="server" ID="ddl_style" AppendDataBoundItems="true" AutoPostBack="true" >
            <asp:ListItem Text="a" Value="1"></asp:ListItem>
            <asp:ListItem Text="b" Value="2"></asp:ListItem>
            <asp:ListItem Text="c" Value="3"></asp:ListItem>
        </asp:DropDownList>
    </ItemTemplate>
</telerik:GridTemplateColumn>

I set the selectedvalue on itemDataBound,

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
 
    If TypeOf e.Item Is GridDataItem Then
        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
        Dim ddl As DropDownList = DirectCast(item("STYLE").FindControl("ddl_style"), DropDownList)
        ddl.SelectedValue = ViewState("styleId")
        ddl.DataBind()
    End If
 
End Sub

This does get fired when a change is made in the DropDownList, however it is alos the previous value (i check prior to setting it again).  Also this does not seem like the best place for me to check this, as this is where i set the selectedValue.

Any help on this would be much appreciated.
Pavlina
Telerik team
 answered on 19 Jul 2010
1 answer
112 views
Hi Stanimir,
 Can you tell me if it's possible to configure the editor so that any images added to the page are set with left aligned? It looks as though when an image is loaded into the page that the 'Remove Alignment' option is selected.

Thanks,
Jason.
Stanimir
Telerik team
 answered on 19 Jul 2010
1 answer
100 views
VS2008 2010.1.706.35  IE8

I’m populating RadComboBox in RadGrid OnRowSelected() on client side.

// load address types for the related combo
 
            function SetAddressCombo(){
 
  
 
                var grid = $find("<%=RadContactMailings.ClientID %>");
 
                var combo = grid.get_masterTableView().get_dataItems()[g_lastRowIndex].findControl("RadCmbAddressType");                   
 
  
 
                combo.clearItems();
 
                $.each(g_addrType, function(i) {
 
                    var comboItem = new Telerik.Web.UI.RadComboBoxItem();
 
                    var text = g_addrType[i].substring(0, g_addrType[i].indexOf("="));
 
                    var value = g_addrType[i].substring(g_addrType[i].indexOf("="));
 
                    comboItem.set_text(text);
 
                    comboItem.set_value(value);
 
                    combo.get_items().add(comboItem);
 
                });
 
            }
 
  
 
<telerik:GridTemplateColumn UniqueName="AddressType" HeaderText="Address Type">
 
                        <ItemTemplate></ItemTemplate>                          
 
                        <EditItemTemplate>
 
                            <telerik:RadComboBox runat="server" ID="RadCmbAddressType" width="99%" MaxDropDownItems="25"
 
                                DataSource='<%# (new string[] {Eval("Address.Type").ToString()}) %>'
 
                                CollapseAnimation-Type="None" ExpandAnimation-Type="None" Skin="WebBlue"
 
                                OnClientBlur="OnAddressTypeClientBlur" OnClientFocus="OnAddressTypeFocus" OnClientDropDownOpened="OnAddressTypeOpened" >                
                            </telerik:RadComboBox>
 
                        </EditItemTemplate>                    
 
</telerik:GridTemplateColumn>

The dropdown is filled, but the height is not dynamically sized.

Veli
Telerik team
 answered on 19 Jul 2010
3 answers
175 views
I was unable to find any mention of this, but when using the latest official release and adding a "Label" property to a combobox, the width will not display correctly in Chrome.  About 158 pixels seems to be the minimum width that will be displayed. Larger widths work as expected.  For instance, the following
<%@ Page Language="C#" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<script runat="server">  
</script> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">  
    </telerik:RadScriptManager> 
        <telerik:RadComboBox ID="RadComboBox1" runat="server" Width="60" DropDownWidth="60" Skin="Default" Label="Label">  
            <Items> 
                <telerik:RadComboBoxItem runat="server" Text="item1" Value="1" /> 
                <telerik:RadComboBoxItem runat="server" Text="item2" Value="2" /> 
                <telerik:RadComboBoxItem runat="server" Text="item3" Value="3" /> 
            </Items> 
        </telerik:RadComboBox> 
    </form> 
</body> 
</html> 

renders a correct width of 60 pixels in IE, but Chrome defaults to ~158 pixels (attached screenshots). I've tried several settings without any luck. Is there a workaround?
Kalina
Telerik team
 answered on 19 Jul 2010
31 answers
438 views
After saving the flash content in my RichContent column, the flash is not visible.

Version 1.1 of RadEditor for MOSS 
Sharepoint 2007 in french
Stanimir
Telerik team
 answered on 19 Jul 2010
2 answers
194 views
I tried to put a bmp image in the radToolBar, but I didn't see how to set the transparent color of the image. (The image have a pink background that I don't want to see).

Sébastien
Sébastien
Top achievements
Rank 1
 answered on 19 Jul 2010
1 answer
85 views
Hi Guys,

quick question on the feasibility of this idea:

I have a very nice radgrid on my page, i am using c# in vs 2005.

What i would like to do is create a button or clickable link on each row of bound data. This forms a "details" tab which will retrieve further details of the selected row.

I have currently got the query working to retrieve these details, but this is based on a button on the main page - not in the rad grid. from a user experience, they have to select a row in my radgrid, then nav to the details button.

It would be much more user friendly if they could perform the whole operation in the radgrid.

Is this possible, or is there a better way of achieving this?

Many thanks
Tsvetoslav
Telerik team
 answered on 19 Jul 2010
2 answers
101 views
Hi There. Is there any chance to make the final layout of raddatapager to look like the image attached? Thank you very much for your help.

elais
Top achievements
Rank 1
 answered on 19 Jul 2010
1 answer
133 views
Hello,

Please advise how i can copy & print the chart in asp.net using the RadChart 2010?

Thanks
Ves
Telerik team
 answered on 19 Jul 2010
1 answer
135 views
Hi
I have a Telerik RadGrid and I want to change the cells of a column if the column name is a certain value.

For example if the column name is 'date_comparison_1' the I do not want any cells to contain a minus number.

So what I was hoping to do was...

Protected

 

Sub rgChangeRequests_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.WebControls.GridItemEventArgs) Handles rgChangeRequests.ItemDataBound

 

 


 

 

If

 

e.Item.ItemType = Telerik.WebControls.GridItemType.Header Then

 

 

 

 

 

'If e.Item.ItemType = ListItemType.Header Then

 

 

 

 

 

Dim dg As DataGrid = TryCast(sender, DataGrid)

 

 

Dim col As DataGridColumn

 

 

Dim index As New Integer

 

 

 

 

 

For index = 0 To dg.Columns.Count - 1

 

 

If (col.HeaderText = "'date_comparison_1") Then

 

 

 

 

 

End If

 

 

 

 

 

Next

 

 

 

 

 

End If

 

 

 

 

 

 

End Sub

But I get an Object Reference error pointing to this line ...

 

For

 

index = 0 To dg.Columns.Count - 1

 



Any ideas?

thanks

Princy
Top achievements
Rank 2
 answered on 19 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?