Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
135 views
Is there anyway to display a PopOut Datagrid? There is an option to have a PopOut Editform for update/insert/delete, what i want to do is show additional data in a datagrid when someone clicks on a row.
Yavor
Telerik team
 answered on 14 May 2009
3 answers
371 views
I realize this question has been asked numerous times before and I've done my best to go through each forum post that asked a similar question, I've done various google searches, and I've even given my best shot to achieve my desired result.  Unfortunately, I haven't been successful in achieving my desired result. 

What I'm trying to do is set the height of the grid to be 100% of the remaining space of its parent container.  Here's a screenshot of what my page looks like:

http://img56.imageshack.us/img56/5597/data.jpg

As you can see, there is a few pixels below the grid that is not being utilized.  I'm aware that 100% height is relative to its parent container and I've setup the CSS to accommodate that requirement:

html, body, form  
    margin0px
    padding0px
    height: 100%; 
 
html { bordersolid 1px red; } 
body { bordersolid 1px blue; } 
form { bordersolid 2px orange; } 
         
#contentts  
{              
    width800px;  
    height: 100%;             

For simplicity, I've replaced the various server controls in my screen shot w/ an empty div that consumes about the same amount of height.  Here's what the markup looks like:

<div id="contents"
    <div style="height: 100px; border: solid 1px black;"
        Filter Controls go here 
    </div> 
    <rad:RadGrid ID="itemizedChargeTypeGrid" runat="server" DataSourceID="itemizedChargeTypeODS"         
            Height="500px" PagerStyle-AlwaysVisible="true" AutoGenerateColumns="false" 
            AllowPaging="true" AllowSorting="true" PageSize="50">             
        <ClientSettings Scrolling-AllowScroll="true" Scrolling-UseStaticHeaders="true" /> 
        <MasterTableView DataKeyNames="ItemizedChargeTypeID, FacilityID, LoadBatchID">             
            <Columns>   
                <rad:GridBoundColumn DataField="RV" Visible="false" ReadOnly="true"  
                    ForceExtractValue="Always" />                                       
                <rad:GridEditCommandColumn UniqueName="Edit" ItemStyle-HorizontalAlign="Center"  
                    HeaderStyle-Width="50px" />                                                                                                                                          
                <rad:GridBoundColumn DataField="ChargeCode" UniqueName="ChargeCode" 
                    HeaderText="Charge Code" ReadOnly="true" ForceExtractValue="Always" 
                    HeaderStyle-HorizontalAlign="Center" />                         
                <rad:GridBoundColumn DataField="Description" UniqueName="Description" 
                    HeaderText="Description" ReadOnly="true" ForceExtractValue="Always" 
                    HeaderStyle-HorizontalAlign="Center" />                         
                <rad:GridBoundColumn DataField="RevenueCode" UniqueName="RevenueCode" 
                    HeaderText="Revenue Code" ForceExtractValue="Always" 
                    HeaderStyle-HorizontalAlign="Center" />                                                 
                <rad:GridCheckBoxColumn DataField="Inferred" UniqueName="Inferred" 
                    HeaderText="Inferred" ReadOnly="true" ForceExtractValue="Always" 
                    ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" />                        
                <rad:GridCheckBoxColumn DataField="Active" UniqueName="Active" ReadOnly="true" 
                    HeaderText="Active" ItemStyle-HorizontalAlign="Center"  
                    HeaderStyle-HorizontalAlign="Center" />                         
            </Columns> 
        </MasterTableView> 
    </rad:RadGrid>                         
</div>
<rad:RadAjaxManager runat="server">
    <AjaxSettings>
        <rad:AjaxSetting AjaxControlID="itemizedChargeTypeGrid">
            <UpdatedControls>
                <rad:AjaxUpdatedControl ControlID="itemizedChargeTypeGrid"
                    LoadingPanelID="loadingPnl" />
            </UpdatedControls>
        </rad:AjaxSetting>
    </AjaxSettings>
</rad:RadAjaxManager>  
<rad:RadAjaxLoadingPanel ID="loadingPnl" runat="server" BackColor="White"
        MinDisplayTime="1000" Transparency="50" CssClass="loading" />                                                                  


When the HTML above is rendered, the grid itself is wrapped in a div w/ an ID similar to <gridID>GridPanel or something similar.  Upon inspection, this is due to my utilization of the RadAjaxManager (at least that's what I've concluded). 

The RadAjaxManager itself doesn't expose any css related properties where I can specify the div that it renders to have a height of 100%.  W/ a little jQuery, I tried something like:

$("#itemizedChargeTypeGrid").parent().css("height", "100%")

which stretched the parent container of the grid to be 100%; however, the data w/ in the grid itself still remained a fixed height.  Upon reviewing the markup emitted by the RadGrid, I noticed the data was rendered in a div w/ an id similar to <gridID>_GridData.  And so I thought, why not set the height of the class of that element to be 100%. 

After doing so, the grid stretched; however, it appeared scrollbar functionality was lost.  Forgive me for a long winded explanation, but ultimately my question is:

How can I get the grid to dynamically stretch vertically to fit the remainder of its parent container while retaining the ability to have records not immediately visible to be scrolled into view? 
Dimo
Telerik team
 answered on 14 May 2009
4 answers
179 views
Ok, today I upgraded to version Q1 2009 and my skins are not working.  It was a custom version of the sunset skin you created.  What is the easiest way to get my skin back?  Also, where are your skins for the MENU and RADGRIDS????  so I can seen the new look and if I have to then use one of your defualt skins.

P.S. This is totally uncool!
Dimo
Telerik team
 answered on 14 May 2009
1 answer
93 views
Does anybody know how to accomplish this?
I am currently working with the Drop and Drag function of the radGrids.  My problem is when the drop grid is empty, the "Drop Zone" is small and is easily missed, I want to highlight the MasterTable when they mouse over where they can drop it.

Is there anyway of making the "Drop Zone" bigger?

Thanks
Dimo
Telerik team
 answered on 14 May 2009
1 answer
162 views
I have a grid with gridtemplatecolumns and each column has an item template of a label and and edit template of a textbox. HEre is my column:
<telerik:GridTemplateColumn DataField="contact_name" HeaderText="Contact Name"  
                                            UniqueName="contact_name"
    <ItemTemplate> 
      <asp:Label ID="Label1" runat="server"  Text='<% #Eval("contact_name") %>'</asp:Label>                                     
                                      
   </ItemTemplate> 
    <EditItemTemplate> 
      <asp:TextBox ID="contact_name" runat="server" Text='<%#Eval("contact_name") %>'  Width="200px"></asp:TextBox> 
        <font color="blue">*</font> 
          <asp:RequiredFieldValidator ID="contactnameRequiredFieldValidator"  
                runat="server" ControlToValidate="contact_name"  Display="Dynamic"                                                    ErrorMessage="required"></asp:RequiredFieldValidator> 
     </EditItemTemplate> 
 </telerik:GridTemplateColumn> 

 The data it is retrieving has a tab in it, so for example "contact_name" is made up of first_name last_name (tab) contact_type
and in the edititemtemplate textbox, the tab is there, but in the label, the tab is not there. Does labels render tabs? And if not, is there another control I can use for the ItemTemplate to show the tabs?

Thanks,
Laura
Dimo
Telerik team
 answered on 14 May 2009
1 answer
48 views
While researching switching modes in the grid I found this Page:
http://www.telerik.com/help/aspnet-ajax/grddistinguisheditinsertmodeonitemcreateditemdatabound.html

At the bottom of the page there is a link called "this topic" which points you to solving a related problem. It's dead.
Bad Link: http://www.telerik.com/help/aspnet-ajax/switching-insert-add-modes.html

The page you want it to point ot is:
http://www.telerik.com/help/aspnet-ajax/grdswitchinginsertaddmodes.html

I really never know what route to take to notify you guys of things I come across, so feel free to delete this after you point it to the right place...

Chris
Dimo
Telerik team
 answered on 14 May 2009
0 answers
109 views

I struct in a problem of updating  in Rad Schedular..
i insert a appointment in the databse SQL Server. in that i take the Id of appointment byusing " e.Appointmnets.ID" and store it in the db..
like
.aspx file

 

<

telerik:RadScheduler runat="server" ID="RadScheduler1" Width="99%" TimeZoneOffset="03:00:00"

 

 

 

 

 

OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"

 

 

 

 

 

OnAppointmentDelete="RadScheduler1_AppointmentDelete"

 

 

 

 

 

DataEndField="End" DataKeyField="ID" DataRecurrenceField="RecurrenceRule"

 

 

DataRecurrenceParentKeyField="RecurrenceParentID" DataStartField="Start"

 

 

DataSubjectField="Subject" HoursPanelTimeFormat="htt" ValidationGroup="RadScheduler1" style="left: -1px; top: 16px" Height="397px" >

 

 

 

 

 

<TimelineView UserSelectable="False" />

 

 

</telerik:RadScheduler>

.aspx.cs

 

 

protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)

 

{

 

e.appointments.ID
//and some SQl query to store the data in Db
}
now whenever i update that same appointment  by using function

 

 

protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)

 

{

 

AppointmentInfo ai = FindById(e.ModifiedAppointment.ID);

 

ai.CopyInfo(e.ModifiedAppointment);

 

//some db query

}
its iD value is changed by itself
here the event has generated the new ID
please give some idea how to get the previous ID that i had stored in the db

so that i will update it in Databsae also

Adi
Top achievements
Rank 1
 asked on 14 May 2009
1 answer
187 views
I am currently working to implement a custom file browser that writes to a database instead of the file system. I have looked through the implementation that you have provided, but my requirements are a little difference (of course).

Unless I explicitly set the UploadPaths on the document manager for every path in the system, I am unable to upload any documents. I need to be able to specify the root path and allow users to work in that path without restriction once access has been granted. Here is the implementation of my provider:

Imports Microsoft.VisualBasic  
Imports Telerik.Web.UI.Widgets  
Imports SWBTS.HelpDesk.Data  
Imports SWBTS.HelpDesk.Data.Entities  
 
Namespace HelpDeskContentProvider  
    Public Class DatabaseAttachmentContentProvider  
        Inherits FileBrowserContentProvider  
        Dim _Repository As New Repository(System.Configuration.ConfigurationManager.ConnectionStrings("HelpDesk").ConnectionString)  
 
        Public Sub New(ByVal context As HttpContext, ByVal searchPatterns As String(), ByVal viewPaths As String(), ByVal uploadPaths As String(), ByVal deletePaths As String(), ByVal selectedUrl As StringByVal selectedItemTag As String)  
            MyBase.New(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)  
        End Sub 
 
        Public Overrides Function CreateDirectory(ByVal path As StringByVal name As StringAs String 
 
        End Function 
 
        Public Overrides Function DeleteDirectory(ByVal path As StringAs String 
            Throw New NotImplementedException("The deletion of folders is not supported. This must be done by your system database administrator.")  
        End Function 
 
        Public Overrides Function DeleteFile(ByVal path As StringAs String 
 
        End Function 
 
        Public Overrides Function GetFile(ByVal url As StringAs System.IO.Stream  
 
        End Function 
 
        Public Overrides Function GetFileName(ByVal url As StringAs String 
 
        End Function 
 
        Public Overrides Function GetPath(ByVal url As StringAs String 
 
        End Function 
 
        Public Overrides Function ResolveDirectory(ByVal path As StringAs Telerik.Web.UI.Widgets.DirectoryItem  
            Dim directories As DirectoryItem()  
            Dim currentFolder As FileFolder = _Repository.FileFolders.GetFolder(path)  
            If DisplayMode = FileBrowserDisplayMode.Tree Then 
                directories = GetSubFolders(currentFolder.FolderID)  
            End If 
            Return New DirectoryItem(currentFolder.FolderName, String.Empty, currentFolder.FolderID, currentFolder.FolderName, PathPermissions.Read And PathPermissions.Upload, GetFilesInFolder(currentFolder.FolderID), directories)  
        End Function 
 
        Public Overrides Function ResolveRootDirectoryAsList(ByVal path As StringAs Telerik.Web.UI.Widgets.DirectoryItem()  
            Dim folderTree As List(Of FileFolder) = _Repository.FileFolders.GetFolders()  
 
            Dim rootFolder As FileFolder = _Repository.FileFolders.GetFolder(path)  
            Return GetSubFolders(rootFolder.FolderID)  
        End Function 
 
        Public Overrides Function ResolveRootDirectoryAsTree(ByVal path As StringAs Telerik.Web.UI.Widgets.DirectoryItem  
            Dim folderTree As List(Of FileFolder) = _Repository.FileFolders.GetFolders()  
 
            Dim rootFolder As FileFolder = (From folder In folderTree Where folder.FolderID = path).Single()  
            Dim item As DirectoryItem = CreateDirectoryItem(rootFolder)  
 
            Return item  
        End Function 
 
        Public Overrides Function StoreBitmap(ByVal bitmap As System.Drawing.Bitmap, ByVal url As StringByVal format As System.Drawing.Imaging.ImageFormat) As String 
 
        End Function 
 
        Public Overloads Overrides Function StoreFile(ByVal file As Telerik.Web.UI.UploadedFile, ByVal path As StringByVal name As StringByVal ParamArray arguments() As StringAs String 
            Dim fileName As String = file.GetName()  
            Dim length As Integer = file.ContentLength  
            Dim contentType As String = file.ContentType  
            Dim extension As String = file.GetExtension()  
            Dim data(file.InputStream.Length) As Byte 
            Dim storagePath As String = StripSlashes(path)  
            file.InputStream.Read(data, 0, file.InputStream.Length)  
            Dim user As SystemUser = _Repository.Users.GetUser(My.User.Name.ToLower())  
 
            Dim newFileId As Integer 
            newFileId = _Repository.Files.CreateNewFile(fileName, extension, storagePath, length, contentType, data, user).FileID  
            Return "FileHandler.ashx?fileID=" & newFileId.ToString()  
        End Function 
 
        Private Function GetFilesInFolder(ByVal folderID As IntegerAs FileItem()  
            Dim files As List(Of FileItem) = New List(Of FileItem)  
            Dim fileList As List(Of DatabaseFileListItem) = _Repository.Files.GetFilesForFolder(folderID)  
            For Each FileItem As DatabaseFileListItem In fileList  
                Dim file As New FileItem(FileItem.FileName, FileItem.Extension, FileItem.ContentLength, String.Empty, "FileHandler.ashx?fileID=" & FileItem.FileID, String.Empty, PathPermissions.Read And PathPermissions.Delete)  
                files.Add(file)  
            Next 
            Return files.ToArray()  
        End Function 
 
        Private Function GetSubFolders(ByVal folderID As IntegerAs DirectoryItem()  
            Dim folders As New List(Of DirectoryItem)  
            Dim subFolders = _Repository.FileFolders.GetSubFolders(folderID)  
            For Each folder In subFolders  
                Dim folderItem As DirectoryItem = CreateDirectoryItem(folder)  
                folders.Add(folderItem)  
            Next 
            Return folders.ToArray()  
        End Function 
 
        Private Function CreateDirectoryItem(ByVal folderItem As FileFolder) As DirectoryItem  
            Dim folderName As String = folderItem.FolderName  
            Dim folderLocation As String = folderItem.FolderID  
            Dim folderFullPath As String = folderItem.FolderID  
            Dim folderTag As String = folderItem.FolderID  
            Dim files() As FileItem = GetFilesInFolder(folderItem.FolderID)  
            Dim directories() As DirectoryItem = GetSubFolders(folderItem.FolderID)  
            Dim permission As PathPermissions = PathPermissions.Delete Or PathPermissions.Read Or PathPermissions.Upload  
 
            Dim Item As New DirectoryItem(folderName, folderLocation, folderFullPath, folderTag, permission, files, directories)  
            Return Item  
        End Function 
 
        Private Function StripSlashes(ByVal path As StringAs String 
            path = path.Replace("/""")  
            Return path  
        End Function 
    End Class 
End Namespace 
 

Notice, for every directory item that I create, I set the permissions:
            Dim permission As PathPermissions = PathPermissions.Delete Or PathPermissions.Read Or PathPermissions.Upload  
 

However, this is ignored. If I set the permissions via code or declaritively, it works just fine.

<DocumentManager ContentProviderTypeName="HelpDeskContentProvider.DatabaseAttachmentContentProvider, App_Code" ViewPaths="1" UploadPaths="1" DeletePaths="1"/>  
 


Thanks for any tips or advice in what I'm missing.
Lini
Telerik team
 answered on 14 May 2009
2 answers
118 views
Hi...
I am opening a Rad pop up window for selecting some data on the click user control, when I do this for first time after building the project it works correctly. But when I again click on control to open pop window, the window opens with Directory Listing Error
So Please give me solution as early as possible.
Thanks in advance 
 


rahul
Top achievements
Rank 1
 answered on 14 May 2009
2 answers
97 views
http://brokerdealermatch.com/rbdconnection.aspx


if you notice the very first slide the text all looks fine but once it starts to scroll the text starts to look broken up...
Any Ideas what could be causing this?

Also I just noticed I tested this in IE7 and that is where the Text does not look good but in Firefox it looks just fine
Scott Griffin
Top achievements
Rank 1
 answered on 14 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?