Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
89 views
Hello,
I am using RadDatapager with RadListview in my website. I need to asgin RadDatapager skin in server side. Is it possible to asgin skin in server side . if possible, How can i do this?

Thanks
Nahid
Nahid
Top achievements
Rank 1
 answered on 18 Dec 2010
3 answers
77 views

Hi,
            I am using RadGrid whenever i click add button (am using image buttons) am getting Insert items at the botttom of the grid.In that am getting Insert and cancel image buttons. Am using that images from GridEditCommandColumn . Initially am using Inline editimg, now i want to remove that inline editing but still i need add.If i remove GridEditCommand Column how i ll get images for Insert and cancel.Pls help me to do this.

Thanks,
John

 

john
Top achievements
Rank 1
 answered on 18 Dec 2010
1 answer
35 views
Hi 

Clients have reported a strange problem with Excel output from a grid; can anyone help?
It is serious because it is not obvious to the user that it has happened, so they see erroneous data, rather than an error message...

If a line of output in excel has an empty cell, then the content of the cell immediately below it moves up
to fill the space, as if all the columns are independent.  The context is that the file is downloaded, then opened 
on mac using Excel in Office for Mac 2011.

I could try writing a space character instead of of a null value but I am not sure that is the right answer.

The output is fine on PC, and also fine in the pdf version opened on Mac

Help!

Thanks

Clive

PS:
Mac OS: 10.6.5
Website server: windows server 2003, iis6, asp.net 4.0,   RadAjax version is Q2 2009
Daniel
Telerik team
 answered on 17 Dec 2010
1 answer
47 views
Resolved.
Greg
Top achievements
Rank 1
 answered on 17 Dec 2010
2 answers
79 views
I am using the following code to select the parent row. I need to do this when the item is expanded but it's working only on collapse How do I make work on expand.
Private Sub RadGrid1_ItemCommand([source] As Object, e As Telerik.WebControls.GridCommandEventArgs) Handles RadGrid1.ItemCommand
   If e.CommandName = RadGrid.ExpandCollapseCommandName Then
      Dim item As GridItem
      For Each item In e.Item.OwnerTableView.Items
          If item.Expanded  Then
            item.Selected = True
          End If
      Next item
   End If
End Sub 'RadGrid1_ItemCommand 

Alternately, does or can Telerik provide an option to do this. When a Parent row in a Grid Hierchy is expanded automacally select the row if row selection is tuened on (multiple or single)
Pierre
Top achievements
Rank 1
 answered on 17 Dec 2010
1 answer
142 views
hello,

I have been trying to include the telerik jquery libraries.
I realize by running on sharepoint I have to turn Assembly
references into the full assembly name with version info and
key number. so as a result I have changed my script references as in the code block below.
Keep in mind that this code runs in a master page, and that the page works when
I comment out the the script references. Otherwise I get the error which I posted below this
code block. Perhaps I am writing the reference incorrectly? Thanks for any help
<asp:ScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true"
        >
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI, version=2010.1.309.35, Culture=Neutral, PublicTokenKey=121fae78165ba3d4" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI, version=2010.1.309.35, Culture=Neutral, PublicTokenKey=121fae78165ba3d4" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI, version=2010.1.309.35, Culture=Neutral, PublicTokenKey=121fae78165ba3d4" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
             
        </Scripts>
    </asp:ScriptManager>
    

error
File Not Found.   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at System.Web.UI.AssemblyCache.Load(String assemblyName)
   at System.Web.UI.ScriptManager.RemoveDuplicates(List`1 scripts)
   at System.Web.UI.ScriptManager.RegisterScripts()
   at System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
umar okeeffe
Top achievements
Rank 1
 answered on 17 Dec 2010
1 answer
78 views
I have a screen that allows the exporting of grid. When the page first loads, I do not bind the grid to save loading time (there is a bunch of search criteria at the top). Now, I have an export and search button the user can click, but if they click export before the data is bound, I get an error stating the datssource needs to be set first.

What am I missing here?
mpaul
Top achievements
Rank 1
 answered on 17 Dec 2010
2 answers
525 views
Hi.
I got this error when i tried to edit the row in a hierarchical grid. I have one nested grid where i changed the UnitPrice value in ItemDataBound event. I need do divide the value to get the right currency. (If i do not, than i can do edit action in the nested grid without getting the error.) I have found in the forum other thread with the same error but it does not solve my case. The code i use is:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
       {
           if (e.Item is GridDataItem)
           {
               LoadTransAndDetailValues(e);
           }           
       }
 
private void LoadTransAndDetailValues(GridItemEventArgs e)
       {
           var item = e.Item as GridDataItem;
           if (e.Item.DataItem is Detail)
           {               
               var detail = e.Item.DataItem as Detail;                           
               double? unitPrice = detail.UnitPrice;
               item["UnitPrice"].Text = (unitPrice.HasValue && unitPrice.Value != 0) ?    (unitPrice.Value / 100.00).ToString() : "";
           }          
       }
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" GridLines="None" ShowGroupPanel="True" ShowStatusBar="True"
        Culture="Norwegian, BokmÃ¥l (Norway)" AutoGenerateColumns="False" Width="620px" onitemcommand="RadGrid1_ItemCommand" onitemdatabound="RadGrid1_ItemDataBound" AllowAutomaticUpdates="True"
        onneeddatasource="RadGrid1_NeedDataSource" onupdatecommand="RadGrid1_UpdateCommand">
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="TransId" EditMode="InPlace">
    <RowIndicatorColumn><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn>
        <DetailTables>
            <telerik:GridTableView runat="server" AllowPaging="False" DataKeyNames="DetailId" AllowFilteringByColumn="false" EditMode="InPlace" DataSourceID="DetailDataSource">
            <ParentTableRelation><telerik:GridRelationFields DetailKeyField="TransId" MasterKeyField="TransId"/></ParentTableRelation>
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <Columns>                   
                <telerik:GridBoundColumn  UniqueName="JourneyTime" HeaderText="Tur" DataField="JourneyTime" ReadOnly="true" SortExpression="JourneyTime" AllowFiltering="true" ShowFilterIcon="false" AutoPostBackOnFilter="true" >
                <HeaderStyle Width="30px"></HeaderStyle><ItemStyle HorizontalAlign="Right" /></telerik:GridBoundColumn>            
                <telerik:GridBoundColumn  UniqueName="RouteName" HeaderText="Rute" DataField="RouteName" ReadOnly="true" SortExpression="RouteName" AllowFiltering="true" ShowFilterIcon="false" AutoPostBackOnFilter="true" >
                <HeaderStyle Width="50px"></HeaderStyle></telerik:GridBoundColumn>            
                <telerik:GridNumericColumn  UniqueName="TariffNr" DataType="System.Int32" HeaderText="Billettkode" DataField="TariffNr" SortExpression="TariffNr">
                <HeaderStyle Width="30px"></HeaderStyle><ItemStyle HorizontalAlign="Right"/></telerik:GridNumericColumn>                            
                <telerik:GridNumericColumn  UniqueName="DetailCount" DataType="System.Int32" HeaderText="Antall" DataField="DetailCount" SortExpression="DetailCount">
                <HeaderStyle Width="30px"></HeaderStyle><ItemStyle HorizontalAlign="Right"/></telerik:GridNumericColumn>                                            
                <telerik:GridNumericColumn  UniqueName="UnitPrice" HeaderText="Pris"  DataField="UnitPrice" DataType="System.Double" SortExpression="UnitPrice">
                <HeaderStyle Width="40px"></HeaderStyle><ItemStyle HorizontalAlign="Right"/></telerik:GridNumericColumn>                             
                <telerik:GridEditCommandColumn CancelText="Avbryt" EditText="Endre" InsertText="Sett inn" UpdateText="Oppdater" UniqueName="EditColumn"><HeaderStyle Width="105px"></HeaderStyle><ItemStyle HorizontalAlign="Right" /></telerik:GridEditCommandColumn>          
            </Columns>
            <EditFormSettings>
                <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
            </EditFormSettings>
            </telerik:GridTableView>
        </DetailTables>
    <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
    <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
    <Columns>
            <telerik:GridBoundColumn FilterControlWidth="95%" DataField="TransDate" DataType="System.DateTime" HeaderText="Dato" ReadOnly="True" SortExpression="TransDate" UniqueName="TransDate" ShowFilterIcon="false" AutoPostBackOnFilter="true">
        <HeaderStyle Width="140px"></HeaderStyle></telerik:GridBoundColumn
        <telerik:GridBoundColumn FilterControlWidth="95%" DataField="UserNr" DataType="System.Int32" HeaderText="Brukernr." ReadOnly="True" SortExpression="UserNr" UniqueName="UserNr" ShowFilterIcon="false" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith">
        <HeaderStyle Width="100px"></HeaderStyle><ItemStyle HorizontalAlign="Right"/></telerik:GridBoundColumn>       
        <telerik:GridBoundColumn FilterControlWidth="95%" DataField="TicketNr" DataType="System.Int32" HeaderText="Billettnr." ReadOnly="True" SortExpression="TicketNr" UniqueName="TicketNr" ShowFilterIcon="false" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith">
        <HeaderStyle Width="100px"></HeaderStyle><ItemStyle HorizontalAlign="Right"/></telerik:GridBoundColumn>                                  
        <telerik:GridBoundColumn FilterControlWidth="95%" DataField="AnnulComment" HeaderText="Annullerings kommentar" SortExpression="AnnulComment" UniqueName="AnnulComment" ShowFilterIcon="false" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith">
        <HeaderStyle Width="200px"></HeaderStyle></telerik:GridBoundColumn>                 
        <telerik:GridEditCommandColumn CancelText="Avbryt" EditText="Endre" InsertText="Sett inn" UpdateText="Oppdater" UniqueName="EditColumn">
        <HeaderStyle Width="105px"></HeaderStyle><ItemStyle HorizontalAlign="Right" /></telerik:GridEditCommandColumn>     
        <telerik:GridButtonColumn CommandName="Annul" Text="Annuller" UniqueName="AnnulColumn"><HeaderStyle Width="50px"></HeaderStyle></telerik:GridButtonColumn>            
    </Columns>
    <NoRecordsTemplate><div>Det er ingen elementer Ã¥ vise</div></NoRecordsTemplate>       
    </MasterTableView>
    <ClientSettings EnableRowHoverStyle="true">                       
        <Resizing AllowColumnResize="true"/>
        <ClientEvents OnRowDblClick="RowDblClick" />
        <Selecting AllowRowSelect="true"/>
    </ClientSettings>
    <SortingSettings EnableSkinSortStyles="False" SortedAscToolTip="Sortert stigende" SortedDescToolTip="Sortet synkende" SortToolTip="Klikk her for Ã¥ sortere" />           
    </telerik:RadGrid>
    
   <asp:LinqDataSource ID="DetailDataSource" runat="server" ContextTypeName="MtbsLinq.MtbsDataContext"
        TableName="Details" Where="TransId == @TransId" EnableUpdate="True">
        <WhereParameters>
            <asp:ControlParameter ControlID="RadGrid1" Name="TransId" PropertyName="SelectedValue" Type="Int32" DefaultValue="0"/>
        </WhereParameters>
    </asp:LinqDataSource>       
</asp:Content>
Martin
Telerik team
 answered on 17 Dec 2010
1 answer
154 views
I have a contact form that has three RadComboBox's on it that are not showing correctly. I have tried with several different skins and have the same problem. I think this is most likely a style-sheet issue but have been unable to find anything that would cause this. I have attached screenshots of what the page looks like and the code for the form is below. 

<table cellpadding="5" cellspacing="5" style="width: 400px; border-right: 1px solid #B0B0B0; border-left: 1px solid #B0B0B0">
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">Vipre Antivirus Product *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadComboBox ID="RadComboBoxVipreSuite" Skin="Simple" runat="server">
            <Items>
                <telerik:RadComboBoxItem Text="Vipre Business Premium" />
                <telerik:RadComboBoxItem Text="Vipre Business" />
            </Items>
        </telerik:RadComboBox>
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">First Name *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadTextBox ID="RadTextBoxFirstName" Skin="Simple" Width="200px" runat="server" />
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">Last Name *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadTextBox ID="RadTextBoxLastName" Skin="Simple" Width="200px" runat="server" />
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">Company Name *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadTextBox ID="RadTextBoxCompanyName" Skin="Simple" Width="200px" runat="server" />
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <span style="text-align: right">Phone Number</span>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadTextBox ID="RadTextBoxPhoneNumber" Skin="Simple" Width="200px" runat="server" />
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">Email Address *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadTextBox ID="RadTextBoxEmailAddress" Skin="Simple" Width="200px" runat="server" />
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <span style="text-align: right">City</span>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadTextBox ID="RadTextBoxCity" Skin="Simple" Width="200px" runat="server" />
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">Country *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadComboBox ID="RadComboBoxCountry" Skin="Simple" Width="200px" runat="server">
            <Items>
                <telerik:RadComboBoxItem Text="" />
                <telerik:RadComboBoxItem Value="us" Text="United States" />
                <telerik:RadComboBoxItem Value="ca" Text="Canada" />
                <telerik:RadComboBoxItem Value="al" Text="Albania" />
                <telerik:RadComboBoxItem Value="ai" Text="Anguilla" />
                <telerik:RadComboBoxItem Value="ag" Text="Antigua and Barbuda" />
                <telerik:RadComboBoxItem Value="ar" Text="Argentina" />
            </Items>
        </telerik:RadComboBox>
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <strong style="text-align: right">Num of Users *</strong>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <telerik:RadComboBox ID="RadComboBoxNumOfUsers" Skin="Simple" Width="200px" runat="server">
            <Items>
                <telerik:RadComboBoxItem Text="" />
                <telerik:RadComboBoxItem Text="1-24" />
                <telerik:RadComboBoxItem Text="25-49" />
                <telerik:RadComboBoxItem Text="50-99" />
                <telerik:RadComboBoxItem Text="100-249" />
                <telerik:RadComboBoxItem Text="250-499" />
                <telerik:RadComboBoxItem Text="500-999" />
                <telerik:RadComboBoxItem Text="1000-2499" />
                <telerik:RadComboBoxItem Text="2500-4999" />
                <telerik:RadComboBoxItem Text="5000+" />
            </Items>
        </telerik:RadComboBox>
    </td>
</tr>
<tr>
    <td style="width: 200px; text-align: right;">
        <span style="text-align: right">Do you resell computer software?</span>
    </td>
    <td valign="top" style="width: 200px; text-align: left">
        <asp:RadioButtonList ID="RadioButtonListResell" Width="200px" runat="server">
            <asp:ListItem Selected="True">No</asp:ListItem>
            <asp:ListItem>Yes</asp:ListItem>
        </asp:RadioButtonList>
    </td>
</tr>
<tr>
    <td colspan="2" style="text-align: right; width: 320px">
        <asp:Button ID="ButtonRequestQuote" runat="server" Text="Request Your Quote" />
    </td>
</tr>
</table>
Kalina
Telerik team
 answered on 17 Dec 2010
4 answers
755 views
Hi All,

This seems to be a simple question. I need to autoselect the first row in the data grid after the rebind() function. Here is the section of the RadGrid

<

 

 

ClientSettings>

 

 

 

<ClientEvents OnRowDblClick="DataGridRowDblClicked" />

 

 

 

<Scrolling AllowScroll="true" ScrollHeight="235px" />

 

 

 

<Selecting AllowRowSelect="true" />

 

 

 

</ClientSettings>
Thanks,
E.

 

Marin
Telerik team
 answered on 17 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?