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

Is it possible to have a master table grid whereby the master grid is bound declaratively by a data source and then the detail table is bound programmatically? I cannot get this to work.

thanks
Shinu
Top achievements
Rank 2
 answered on 29 Jul 2009
3 answers
280 views
Hi Team,
I am using the version 2008.3.1125.35
this is the code i use to export 
                grid.Rebind();
                grid.ExportSettings.IgnorePaging = true;
                grid.ExportSettings.FileName = "Name";
                grid.ExportSettings.ExportOnlyData = true;
                grid.MasterTableView.ExportToExcel();
it exports the data in .xls format by default... i have excel 2007 installed in my machine
it also gives the warning messages as below

The file you are trying to open, <pagename>.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"

is there anything i can ovoid the format realted warning message? and also .xlsx file is very lighter than the .xls so we want to use the lighter version.

or is there any simple c# code i can write each row to excel file for telerik grid.

Thanks
-krishna

Saranya
Top achievements
Rank 2
 answered on 29 Jul 2009
2 answers
106 views
Hi,

I started using telerik scheduler by downloading trial version - 2008.3.1314.35. In this we will have time picker which allows us to select time from a list - like 9:00 am, 8:30 pm so on. Then I used telerik licenced version - 2008.1.619.35. This has manually entering start time and end time column. Is there any way that I could get automatic time picker in this version?

Thanks
Saranya
Saranya
Top achievements
Rank 2
 answered on 29 Jul 2009
1 answer
184 views
My client wants to be able to click on a part number to begin editing the record.  He also wants to be able to filter on the PartNumber field.

When I attempt to filter on the following column, I get the error "The query syntax is not valid., near keyword 'LIKE', line 6, column 6." (Using Entity Framework.

How do I get a LinkButton and filtering to work together?

Here's the code:

                    <telerik:GridTemplateColumn UniqueName="TemplateColumn4" AllowFiltering="True" Groupable="False" 
                        HeaderStyle-Width="55px" ItemStyle-Width="55px" Reorderable="False" ShowSortIcon="True">  
                        <ItemTemplate> 
                            <asp:LinkButton  runat="server" CausesValidation="false" CommandName="Edit" 
                                Text='<%#Eval("PartNumber") %>' /> 
                        </ItemTemplate> 
                        <HeaderStyle Width="55px"></HeaderStyle> 
                        <ItemStyle Width="55px"></ItemStyle> 
                    </telerik:GridTemplateColumn> 

Ken
kencox
Top achievements
Rank 1
 answered on 28 Jul 2009
1 answer
90 views
HI

I have this code in a button in an edit form template

           <asp:Button ID="btnUpdate" Text='<%# Iif (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>' 
 
                                        runat="server" CommandName='<%# Iif(TypeOf Container is GridEditFormInsertItem, "PerformInsert" , "Update" ) %>'>  
                                    </asp:Button> 
and it doesnt appear to be working as the button doesn't have any text or a command property. Please can you tell me what i'm doing wrong


many thanks
andieje
Top achievements
Rank 1
 answered on 28 Jul 2009
1 answer
204 views
I've created an asp.net user control that contains a HTML img tag and a RadContextMenu (see code below).  The user control is placed on a master page containing a number of content place holders.  Each place holder has a the user control contained within it.  Essentially, I have four instances of the user control sitting on a master page each with a RadContextMenu named titleBarContextMenu.  The img HTML element implements the OnClick event.  The Javascript is designed to show the context menu attached to the img HTML element the user just clicked.  The problem I'm having is the $find javascript command is finding the wrong RadContextMenu.  I used the Telerik samples as a guide on to make the context menu work.  Any ideas how I can find the correct RadContextMenu on the master page when the img HTML element is clicked?  Thanks in advance.

function

 

showMenu(e) {

 

 

var contextMenu = $find("<%= titleBarContextMenu.ClientID %>");

 

 

debugger;

 

 

if ((!e.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget))) {

 

contextMenu.show(e);

}

$telerik.cancelRawEvent(e);

}


<

 

table border="0" cellpadding="0" cellspacing="0" width="100%" style="height:24px; background-color:Transparent; white-space:nowrap; overflow:hidden; " >

 

 

<tr>

 

 

<td align="left" width="100%">

 

 

<asp:Label ID="paneTitleLabel" Font-Names="Arial" Font-Size="8pt" ForeColor="White" runat="server"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<img src="/Images/Options_Idol.png" onmouseover="this.src='/Images/Options_hover.png'" onclick="showMenu(event)" onmouseout="this.src='/Images/Options_Idol.png'" alt="Web Part Menu" width="25px" />

 

 

 

</td>

 

 

<td align="right" valign="top">

 

 

<telerik:RadToolBar ID="radToolBarTitle" Runat="server" EnableEmbeddedSkins="false"

 

 

Font-Names="Arial" Font-Size="8pt" ForeColor="White" BorderWidth="0px" AutoPostBack="true">

 

 

<ExpandAnimation Duration="600" Type="InOutCubic"></ExpandAnimation>

 

 

<CollapseAnimation Duration="900" Type="InElastic"></CollapseAnimation>

 

 

 

</telerik:RadToolBar>

 

 

<telerik:RadContextMenu ID="titleBarContextMenu" runat="server" Skin="Vista" OnItemClick="titleBarContextMenu_ItemClick">

 

 

<Targets>

 

 

<telerik:ContextMenuControlTarget ControlID="radToolBarTitle" />

 

 

</Targets>

 

 

<Items>

 

 

</Items>

 

 

</telerik:RadContextMenu>

 

 

</td>

 

 

</tr>

 

</

 

table>

 


Telerik sample code:
http://www.telerik.com/help/aspnet-ajax/menu_contextmenus.html
Kurt Boeckman
Top achievements
Rank 1
 answered on 28 Jul 2009
0 answers
172 views
Hi, we are getting an error on file upload to certain folders. We have 10 folders we are setting up right now as follows -

           Dim folderstring1 As String = "~/images"
                Dim folderstring2 As String = "~/pdf"
                Dim folderstring3 As String = "~/MOC"
                Dim folderstring4 As String = "~/Fellows"
                Dim folderstring5 As String = "~/AnnualMeeting"
                Dim folderstring6 As String = "~/banners"
                Dim folderstring7 As String = "~/C3Summit"
                Dim folderstring8 As String = "~/crest"
                Dim folderstring9 As String = "~/Uploads"
                Dim folderstring10 As String = "~/Admin/WordTemplates"

                RadFileExplorer1.Configuration.ViewPaths = New String() {folderstring1, folderstring2, folderstring3, folderstring4, folderstring5, folderstring6, folderstring7, folderstring8, folderstring9, folderstring10}
                RadFileExplorer1.Configuration.DeletePaths = New String() {folderstring1, folderstring2, folderstring3, folderstring4, folderstring5, folderstring6, folderstring7, folderstring8, folderstring9, folderstring10}
                RadFileExplorer1.Configuration.UploadPaths = New String() {folderstring1, folderstring2, folderstring3, folderstring4, folderstring5, folderstring6, folderstring7, folderstring8, folderstring9, folderstring10}

                RadFileExplorer1.DataBind()

When we try to upload to folderstring4, we get a 'cannot write to the target folder' error. On the server, that folder has accounts ASPNET, NETWORK, and NETWORK SERVICE all set with FULL CONTROL - so this should work fine. For some reason, the other folders work OK. Any thoughts out there?


Karl Wilkens
Top achievements
Rank 1
 asked on 28 Jul 2009
2 answers
165 views
Hi,
I have a RadGrid which displays all records in 'InPlace' edit mode.  One of the columns in the grid is a GridDropDown column. Since I cannot add a FooterTemplate to this column directly, I do the following in the ItemDataBound event:

if (e.Item is GridFooterItem)
{
   GridFooterItem footer = (GridFooterItem)e.Item;
   RadComboBox radComboStatus = new RadComboBox();
   radComboStatus.ID = comboId;
   .
   .

   footer["DisplayStatus"].Controls.Add(radComboStatus);
            
}


This allows me to display the combo box in the footer. However, I am not able to access this control on the serverside during a postback (caused by a button in the footer of some other column). I am able to access other controls in the footer that were added during design time using the footertemplate.

Thanks in advance for you help

TJ
Tushar Jain
Top achievements
Rank 1
 answered on 28 Jul 2009
4 answers
106 views
public class Details 
{ 
        public Int64 ID 
        { 
            get; 
            set; 
        } 
 
        public Contact Contact 
        { 
            get; 
            set; 
        } 
} 
 
public class Contact 
{ 
 
        public string Title 
        { 
            get; 
            set; 
        } 
 
        public string FirstName 
        { 
            get; 
            set; 
        } 
} 

I am binding the List<Details> object to grid. And I am having the below code in Grid Edit Template(popup). While editing its working fine. But during "AddNew" it showing error for "Contact".

<asp:TextBox ID="txtFirstName" Text='<%#  Eval("Contact.FirstName") %>' CssClass="txtBox" 
                                        runat="server"></asp:TextBox> 


Kindly give me a solution.

Pavlina
Telerik team
 answered on 28 Jul 2009
1 answer
118 views

As documented:

"There is no universal mechanism for grouping when custom paging is allowed. The reason for this is that with the custom paging mechanism you fetch only a part of the whole information from the grid data source. Thus, when the grouping event is triggered, the grid is restricted in operating with a limited subset of the entire available data and is not able to group the items accurately. Furthermore, the aggregate functions as Count, Sum, etc. (covering operations with the whole set of grid items) may return incorrect results.

Grouping with custom paging is still possible, but it has several limitations:

  • The data that the grid binds to has to be sorted. If it is not, you may see different members of a group "grouped" to different pages when they appear at different locations in the data source.
  • The aggregate functions will not work correctly for groups that span several pages. There is no way to calculate aggregate values for the entire group when we only work with a single page of data. It is best not to use aggregate functions at all when using grouping together with custom paging. If aggregates are important to you, reduce the data source size and disable custom paging."

Hint:
It would be possible if there were an event (like the NeedDataSource) which is called "NeedGroupTotals" or similiar which provides the needed EventArgs to perform an extra call to the database.

Pavlina
Telerik team
 answered on 28 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?