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

Is it possible to do the above? Currently i have a splitbutton as the last object in my toolbar. Where all of this is inside a radwindow.
Problem is, when i click on the splitbutton, the dropdown width exceeds the size of the radwindow causing misalignment.
I tried to change the size of the dropdown by doing so: $(".RadToolBarDropDown").css("width", "150px !important");
but to no avail.

To make sure i'm selecting the correct element, i used this: $(".RadToolBarDropDown").css("border", "1px solid red !important");
and the element is highlighted with red border. Why is it possible to set the border but not the width?

Currently, what i can do is just hardcode the width. I wanted to set the size dynamically. Is it possible?

Regards,
Dexter
Princy
Top achievements
Rank 2
 answered on 11 Dec 2012
3 answers
183 views
Hello,
I'm working with the ComboBox inside the RadGrid as ItemTemplate in GridTemplateColumn.
The ComboBox is filled dynamically when capturing information.
The RadGrid is filled from code in RadGrid_1_NeedDataSource with a DataTable returned from a query to SQL Server.

The problem I have is that sometimes the Combobox is displayed correctly, but most of the time is shown incorrectly as a TextBox or as an empty space, and to display information does not respect the Combobox format.
I searched the reason but I know why this is done.
I have another RadGrid with Combobox and the same function, but different SQL table and it works perfectly.
I would greatly appreciate if you can help me.
Thanks.
Andrey
Telerik team
 answered on 11 Dec 2012
1 answer
202 views
Hi,
i would that when i push the radbutton into radlistview, the postback must not start.

I load a list of generic in radlistview datasource from page_load with this code:

Private Sub Carica_risultati(ByVal _str1 As String, ByVal _str2 As String)
    Dim lista As List(Of PropertyUtente) = Loadsearch.Search(_str1, _str2)
    RadListView1.DataSource = lista
    RadListView1.DataBind()
End Sub
 
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim _str1, _str2 As String
    _str1 = Request.QueryString("_str1")
    _str2 = Request.QueryString("_str2")
    Carica_risultati(_str1, _str2)
    Me.ClientScript.RegisterStartupScript(Me.GetType, "", "Height_Div();", True)
End Sub

so i would that when start this code:
Protected Sub RadButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
    Dim Button As RadButton = CType(sender, RadButton)
    Dim item As RadListViewDataItem = CType(Button.Parent, RadListViewDataItem)
    Response.Redirect("Card.aspx?_id=" & item.GetDataKeyValue("idutente"))
End Sub

I do not want to run the code again in page_load, Is possible?

Under there is asp code too

<telerik:RadListView ID="RadListView1" runat="server"  DataKeyNames="idutente"
                   ItemPlaceholderID="Contenitore" AllowPaging="True" Skin="Simple">
                   <LayoutTemplate>
                       <fieldset id="FieldSet1">
                           <legend>Risultati della ricerca:</legend>
                           <asp:PlaceHolder ID="Contenitore" runat="server"></asp:PlaceHolder>
                           <div style="clear: both">
                           </div>
                           <div>
                               <div style="float: left; margin-left: 30%;">
                               <telerik:RadButton ID="btnFirst" runat="server" Text="Prima" CommandName="Page" CommandArgument="First"
                               Enabled="<%#Container.CurrentPageIndex > 0 %>" Skin="Sunset">
                               </telerik:RadButton>
                               <telerik:RadButton ID="btnPrev" runat="server" Text="Precedente" CommandName="Page" CommandArgument="Prev"
                               Enabled="<%#Container.CurrentPageIndex > 0 %>" Skin="Sunset">
                               </telerik:RadButton>
                                   <span style="vertical-align: top; position: relative; top: 4px">Pagina
                                       <%#Container.CurrentPageIndex + 1 %>
                                       di
                                       <%#Container.PageCount %></span>
                               <telerik:RadButton ID="btnNext" runat="server" Text="Successiva" CommandName="Page" CommandArgument="Next"
                               Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" Skin="Sunset">
                               </telerik:RadButton>
                               <telerik:RadButton ID="btnLast" runat="server" Text="Ultima" CommandName="Page" CommandArgument="Last"
                               Enabled="<%#Container.CurrentPageIndex + 1 < Container.PageCount %>" Skin="Sunset">
                               </telerik:RadButton>
                               </div>
                           </div>
                       </fieldset>
                   </LayoutTemplate>
                   <ItemTemplate>
                       <fieldset style="float: left; width: 494px; height: 180px">
                           <legend>Categoria:
                               <%# CType(Container.DataItem, PropertyUtente).Desccategoria%>
                           </legend>
                           <table cellpadding="0" cellspacing="0" width="95%">
                               <tr>
                                   <td style="width: 80%;">
                                       <table cellpadding="5" cellspacing="0">
                                           <tr>
                                               <td style="width: 20%;">
                                                   Nome:
                                               </td>
                                               <td style="width: 80%; text-align:left; color:#D5842B">
                                                   <%# CType(Container.DataItem, PropertyUtente).utente%>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td style="width: 20%;">
                                                   Città:
                                               </td>
                                               <td style="width: 80%; text-align:left">
                                                   <%# CType(Container.DataItem, PropertyUtente).Desccomune%>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td style="width: 20%;">
                                                   Telefono:
                                               </td>
                                               <td style="width: 80%; text-align:left">
                                                   <%# CType(Container.DataItem, PropertyUtente).Telefono%>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td style="width: 20%;">
                                                   Cellulare:
                                               </td>
                                               <td style="width: 80%; text-align:left">
                                                   <%# CType(Container.DataItem, PropertyUtente).Cellulare%>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td style="width: 20%;">
                                                   Email:
                                               </td>
                                               <td style="width: 80%; text-align:left">
                                                   <%# CType(Container.DataItem, PropertyUtente).Email%>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                               </td>
                                               <td style="width: 100%; text-align:center">
                                                   <telerik:RadButton ID="RadButton1" runat="server" Text="Visualizza biglietto" Skin="Sunset"
                                                    OnClick="RadButton1_Click">
                                                   </telerik:RadButton>
                                               </td>
                                           </tr>
                                       </table>                                                   
                                   </td>
                                    <td style="vertical-align: top; text-align: right; width: 100px;">
                                       <asp:Image ID="Image1" runat="server" ImageUrl='<%# CType(Container.DataItem, PropertyUtente).imageprofile%>' Height="125px" Width="110px"/>
                                   </td>                            
                               </tr>
                           </table>
                       </fieldset>
                   </ItemTemplate>
               </telerik:RadListView>
Andrey
Telerik team
 answered on 11 Dec 2012
1 answer
646 views
HI,
I have the rad grid in which i have the edit item template. The aspx is as follows:
<telerik:RadGrid ID="radgrid1" runat="server" 
        EnableViewState="true" ShowStatusBar="true" AllowAutomaticUpdates="false"
        ShowFooter="True" 
        OnInsertCommand="radgrid1_InsertCommand" OnUpdateCommand="radgrid1_UpdateCommand"
        OnNeedDataSource="radgrid1_NeedDataSource"  >
        <MasterTableView DataKeyNames="ProductNumber" AutoGenerateColumns="false" EditMode="InPlace"
            CommandItemDisplay="TopAndBottom" CommandItemSettings-AddNewRecordText="Add New Purchase Order">           
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton">
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" ConfirmDialogHeight="100px"
                    ConfirmDialogWidth="220px">
                </telerik:GridButtonColumn>
                  
<telerik:GridTemplateColumn DataField="ProductNumber" HeaderText="Product Number" UniqueName="ProductNumber"
                    Visible="true">
                    <InsertItemTemplate>
                        <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text="">
                        </telerik:RadTextBox>
                    </InsertItemTemplate>
  
<EditItemTemplate>
<telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text='<%# Eval("ProductNumber") %>'>
</telerik:RadTextBox>
</EditItemTemplate>
  
                    <ItemTemplate>
<telerik:RadTextBox ID="RadtxtPrdNumber" ReadOnly="true" runat="server" Text='<%# Eval("ProductNumber") %>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>

In the update command, i am trying to access the column as below:
GridEditableItem editedItem = e.Item as GridEditableItem;
               //Get the primary key value using the DataKeyValue.      
               string ProductID = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ProductNumber"].ToString();
               //Access the textbox from the edit form template and store the values in string variables.   
               string strProductNumbervalue = (editedItem["RadtxtPrdNumber"].Controls[0] as RadTextBox).Text;

I am getting the error as "Cannot find a cell bound to column name 'RadtxtPrdNumber', when the code hits "string strProductNumbervalue".
How to fix this?
Thanks
Shinu
Top achievements
Rank 2
 answered on 11 Dec 2012
3 answers
99 views
HI,

I have added the radgrid and have the insert command. I do not have the ajax added to the page. when a new item is added, item.extractvalues count is empty. How to retrieve the inserted values.
Below is the current code:
<telerik:RadGrid ID="radgrid1" runat="server" EnableViewState="true"
        ShowFooter="True" 
        OnInsertCommand="radgrid1_InsertCommand" 
        OnNeedDataSource="radgrid1_NeedDataSource">
  
        <MasterTableView DataKeyNames="ProductNumber" AutoGenerateColumns="false" EditMode="InPlace"
            CommandItemDisplay="TopAndBottom" CommandItemSettings-AddNewRecordText="Add New Item">           
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton">
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" ConfirmDialogHeight="100px"
                    ConfirmDialogWidth="220px">
                </telerik:GridButtonColumn>
                  
                <telerik:GridTemplateColumn DataField="ProductNumber" HeaderText="Product Number" UniqueName="ProductNumber"
                    Visible="true">
                    <InsertItemTemplate>
                        <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text="">
                        </telerik:RadTextBox>
                    </InsertItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text="">
                        </telerik:RadTextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <telerik:RadTextBox ID="RadtxtPrdNumber" ReadOnly="true" runat="server" Text="" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
  
</Columns>
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="true">
        </ClientSettings>
    </telerik:RadGrid>

protected void radgrid1_InsertCommand(object sender, GridCommandEventArgs e)
        {
              
                GridEditableItem item = e.Item as GridEditableItem;
                Hashtable values = new Hashtable();
                 
                item.ExtractValues(values);
  
}

How to fix this?
Thanks
Shinu
Top achievements
Rank 2
 answered on 11 Dec 2012
1 answer
147 views

I have 2 radMonthYearPicker(1 is for start Date another 1 is for end Date) I want to calculate the month different between this 2 date.

for my start Date, I set my month as oct and year 2012. for my end Date, I set my month as dec and year 2013

Base on this 2 RadMonthYearPicker, the month apart should be 14 month

The only code I can find out is RadMonthYearPicker.selectedDate

Princy
Top achievements
Rank 2
 answered on 11 Dec 2012
2 answers
108 views
Is there a page where I can look up what browsers and versions each major version of the controls supports?
Neil N
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 11 Dec 2012
2 answers
55 views
Background:  We've recently started receiving complaints from our users about very slow page load times on our web applications using Telerik controls in IE9.  After extensive troubleshooting,  we determined that the cause of the slow down was Symantec's IE add-on, Intrusion Prevention or Vulnerability Protection (depending on which version of the SEP client you're running).  When we disabled the add-on, page load times were instantaneous and when we re-enabled the add-on, page load times shot up to a very unacceptable 12-14 seconds.

I decided to run IE's profiler to determine what exactly was causing this slow down.  The load times for every Telerik script was about 10 times slower when the add-on was enabled than when it was disabled. 

Workaround Identified:  Since this slow down appeared to be directly related to the Telerik scripts, I decided to start toying around with the RadScriptManager's attributes.  As it turns out, setting EnableScriptCombine to false has resolved the issue and page load times are now back to instantaneous.

The idea of combining scripts into one to cut down on network traffic is great and I would like to be able to use that feature again someday which is why I am reporting this problem to you.  Hopefully, you can identify why the combined scripts aren't playing nice with the Symantec Intrusion Prevention add-on in IE9, but at least there is a workaround for now.
Christopher St. Clair
Top achievements
Rank 1
 answered on 10 Dec 2012
1 answer
134 views
i have a radgrid with one nested view. the nested view's edit mode is popup. the edit form type is template. how do i access a radComboBox control inside of the template using javascript?
Alex
Top achievements
Rank 2
 answered on 10 Dec 2012
1 answer
138 views
hi,

I have created something like below given example

<telerik:Radsplitter ID="RadSplitter1" runat="server" Height ="660px" Width ="100%" >
        <telerik:RadPane ID="LeftPane" runat="server" Scrolling="none">
            <telerik:RadSlidingZone ID="SlidingZone1" runat="server">
                <telerik:RadSlidingPane ID="RadSlidingPane1" Scrolling="Both" DockText="Filters" Title="Filters" runat="server"  >
               ................................
               </telerik:RadSlidingPane>
</telerik:RadPane>
        <telerik:RadSplitBar ID="Radsplitbar1" runat="server">
        </telerik:RadSplitBar>
        <telerik:RadPane ID="MiddlePane1" Scrolling="none" runat="server" Width ="100%" Height="100%">
<table id="mainTable" cellpadding="0" cellspacing="0" width="100%" style="height: 100%;width:100%;">
............. MAIN CONTENT (some control)
</tr>
    </table>               
            </telerik:RadPane>           
            </telerik:Radsplitter>

when i run this, and dock the RadSlidingPane the main content crosses the width and height of the MiddlePane1 as i have given scrolling="none" in MiddlePane1, it looks like the main content is inside the MiddlePane1 and as the scrolling is none i cant even reach to other part of main content,

I would like to see the content in the Middlepane1 to adjust the screen as i dock the RadSlidingPane. 3

Note:on a first hand i felt that should be because of controls inside MiddlePanel1 but as i would do some event changes i would see the main content adjusting with Middlepanel1 and entire screen fits fine, for your note i have given 100% to all the controls width
Vessy
Telerik team
 answered on 10 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?