Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
251 views
Hello,

 i have this javascript code

   function AccesDirectFicheCadre() { 
                var cb = $find("<%= AccesDirect_List.ClientID %>"); 
                var item = cb.get_selectedItem(); 
                 
                var id = item.get_attributes().getAttribute('Id'); 
           // Some other actions using "id", but "id" is ALWAYS undefined... :( 
            } 

With this :

   <telerik:RadComboBox  
                    runat="server" ID="AccesDirect_List"    OnClientItemsRequested="OnClientItemsRequested" 
 ShowDropDownOnTextboxClick="false" 
                 MarkFirstMatch="true"  
                 EnableVirtualScrolling="true" NoWrap="true" MaxHeight="210px" 
                    EnableLoadOnDemand="true"  
                    HighlightTemplatedItems="true" EnableViewState="false" 
                    OnItemDataBound="RadComboBox1_ItemDataBound"  
                    OnItemsRequested="RadComboBox1_ItemsRequested"> 
                </telerik:RadComboBox> 

and this
       protected void RadComboBox1_ItemDataBound(object sender, RadComboBoxItemEventArgs e) 
        { 
            //set the Text and Value property of every item 
            //here you can set any other properties like Enabled, ToolTip, Visible, etc. 
            e.Item.Text = ((DataRowView)e.Item.DataItem)["Nom"].ToString(); 
            e.Item.Value = ((DataRowView)e.Item.DataItem)["Id_Cadre"].ToString(); 
            e.Item.Attributes["Id"] = ((DataRowView)e.Item.DataItem)["Id_Cadre"].ToString(); 
        } 




The problem is that in my javascript function, the "id" is ALWAYS undefined, i'm unable to access the "Attribute" value i have set in the codebehind method.

How can i do this ?

Thank you
FAR
Top achievements
Rank 1
 answered on 24 Nov 2009
2 answers
129 views
Hi all,

I need to implement drap and drop funcitonality from the rad grid to rad scheduler.. it is working fine for me..but i need to have more fields in the edit form especially they should be drop down fields.

can any one please refer any article or the code to have custom drop down fileds in the edit form for a scheduler...

and also along this, i need to have a custom column date field for the mutli day view like Day1,Day2,Day3.... like so on not the dates..

how to go for this..

It's very urgent..
chaitanya elluri
Top achievements
Rank 1
 answered on 24 Nov 2009
1 answer
134 views
I am trying to figure out how I can include/reference a bound column from my master grid in a calculated column in my detail grid.  Is there a fairly straightforward way to accomplish this?  I have tried adding the name of the column from the master grid to the DataFields property in the detail grid's calculated column - no luck.

Any guidance on this would be most appreciated!

Thanks, Bruce
Veli
Telerik team
 answered on 24 Nov 2009
6 answers
158 views
Hi,
   
   I was using my custom skin for rad window, I need to reduce the size of the right,left and bottom border size to 3px.
And my second query was
     I was not displaying the icon at the top, but i was not able to get the tilte text to the start of the page.( means I was getting an unnecesary space over there.
   Help me out on this 2 issues.

Thanks,
Nagendra
nagendra d
Top achievements
Rank 1
 answered on 24 Nov 2009
1 answer
200 views
Hi,

I am trying to "Ajaxify' my Radgrid. This page works without the RadAjaxPanel but not with?

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> 
 
        <script type="text/javascript"> 
            //<![CDATA[
            function openWin() {
                var oWnd = radopen("ColumnsPopup.aspx", "RadWindow1");
            }
            function OnClientClose(oWnd, args) {
                __doPostBack('__Page', 'PostbackFromJs');
            }
            //]]> 
        </script> 
 
    </telerik:RadCodeBlock> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
    <telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false" 
        ReloadOnShow="true" runat="server" Skin="Sunset"> 
        <Windows> 
            <telerik:RadWindow ID="RadWindow1" Behaviors="Close" OnClientClose="OnClientClose" 
                NavigateUrl="ColumnsPopup.aspx" runat="server"> 
            </telerik:RadWindow> 
        </Windows> 
    </telerik:RadWindowManager> 
  
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"> 
    </telerik:RadAjaxLoadingPanel> 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px"> 
        <input value="Open Popup" type ="button" onclick="openWin();" /> 
    <asp:Button ID="Button1" runat="server" Text="pdf" /> 
    <telerik:RadGrid ID="ResultsGrid" runat="server" EnableHeaderContextMenu="True" GridLines="None" 
        PageSize="3" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" 
        AllowMultiRowSelection="True"> 
        <ExportSettings ExportOnlyData=true IgnorePaging=false  Pdf-AllowAdd=true > 
            <Pdf PageHeight="11in" PageWidth="36in" /> 
             
        </ExportSettings> 
        <MasterTableView AutoGenerateColumns="true"> 
            <Columns> 
                <telerik:GridClientSelectColumn> 
                </telerik:GridClientSelectColumn> 
            </Columns> 
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
        </MasterTableView> 
        <ClientSettings AllowColumnsReorder="True"> 
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
    </telerik:RadAjaxPanel> 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
        SelectCommand="SELECT * FROM [Customers]"></asp:SqlDataSource> 
    <div> 
    </div> 
    </form> 
</body> 
</html> 
 

this is the code behind:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
        BindGrid() 
        ResultsGrid.DataBind() 
    End Sub 
 
    ''' <remarks></remarks> 
    Protected Sub BindGrid() 
        Dim sqlconnection As SqlConnection = New SqlConnection(SqlDataSource1.ConnectionString) 
        sqlconnection.Open() 
        Dim ds As DataSet = New DataSet() 
        Dim da As SqlDataAdapter = New SqlDataAdapter("select * from customers", sqlconnection) 
        da.Fill(ds) 
        ResultsGrid.DataSource = ds 
    End Sub 
 
 
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click 
        ResultsGrid.MasterTableView.ExportToPdf() 
    End Sub 


thanks

Dirk
Pavlina
Telerik team
 answered on 24 Nov 2009
1 answer
117 views
Hi,

I created a custom tool for insertion of YouTube embed code.
pasteHtml works perfect but how do I refresh the editor screen after the pasteHtml command?

When I switch to Code and the back to Design then the screen is updated with the movie placeholder.

Thanks,
Marc
Rumen
Telerik team
 answered on 24 Nov 2009
5 answers
617 views
hello,
we are using templates with radwindowmanager.
After update from version 1125 to 1314 we have radwindow problems.
The confirmation popup is shown correctly, after a button is pressed (cancel) we get a error message
(no sourcecode for this error available). In Version 1125 all works correctly.

Codesnippet:

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" InitialBehavior="None" Modal="True">
        <ConfirmTemplate>
            <div class="windowpopup radconfirm">
                <div class="dialogtext">
                    {1}
                </div>
                <div>
                    <a onclick="$find('{0}').callBack(true);" class="radwindowbutton" href="javascript:void(0);">
                        <span class="outerspan"><span class="innerspan">##LOC[OK]##</span> </span></a>
                    <a onclick="$find('{0}').callBack(false);" class="radwindowbutton" href="javascript:void(0);">
                        <span class="outerspan"><span class="innerspan">##LOC[Cancel]##</span> </span>
                    </a>
                </div>
            </div>
        </ConfirmTemplate>
        <AlertTemplate>
            <div class="windowpopup radalert">
                <div class="dialogtext">
                    {1}
                </div>
                <div>
                    <a onclick="$find('{0}').close();" class="radwindowbutton" href="javascript:void(0);">
                        <span class="outerspan"><span class="innerspan">##LOC[OK]##</span> </span></a>
                </div>
            </div>
        </AlertTemplate>
    </telerik:RadWindowManager>
Georgi Tunev
Telerik team
 answered on 24 Nov 2009
1 answer
102 views
First question is, is there a way to set which mode you want the editor to start in server side? I want my editor to come up in preview mode by default.

Second question, when in html or preview mode I want to be able to define a toolgroup that is not in read only mode, aka my print button for example. should be useable in all modes.
Princy
Top achievements
Rank 2
 answered on 24 Nov 2009
1 answer
79 views
Hi,

I'm having a problem with the RadAjaxManager that is very odd.

I have a page that attempts to send an alert message to the browser using

RadAjaxManager1.Alert("alert message text") 

but the message never shows up in Internet Explorer. In Firefox, the message appears, but then the controls on the page dissappear.

This page is loaded in a modal RadWindow. In Firefox, when the RadWindow is closed, the grayed out overlay on the main page never goes away. If I reload the page, it reloads the main page's header content, but not the content of the main RadWindow control that houses the main content.

The only way to get the content to re-appear is to close Firefox and then open it again.

This all worked fine before upgrading to the Q3-2009 release, and yes, I have the 'official' release, not the Beta.

Any help would be greatly appreciated.

Thanks,

Charlie
Pavel
Telerik team
 answered on 24 Nov 2009
1 answer
158 views
I'm using a Line chart, and when the values I pass in are all 0's then I see both positive and negative values on the Y axis.  I'm trying to  prevent this so that all I see are positive values. 

I've tried setting IsZeroBased="true" and MinValue="0" but neither seem to take effect unless I set AutoScale="false".  I have no idea what the values might be so I really need the autoscale feature.  I do know that they'll never be negative.


here's the "Y AXIS" portion of my markup:

  <YAxis IsZeroBased="true" >
            </YAxis>

Thanks...

--Matt



Giuseppe
Telerik team
 answered on 24 Nov 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?