Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
Hi
I have a problem with the FileExplorer. In I use a template for my webapplication. When I look the site on firefox or chrome the fileexplorer works without problems. But in ie8 or 9 it doesn't work. I have attached some screenshots. My code looks so:
<telerik:RadFileExplorer Skin="Vista" ID="radfileexplorer" VisibleControls="AddressBox,ContextMenus,Grid,Treeview,Toolbar" Height="500px" Width="800px" runat="server">
<Configuration
ViewPaths="~/Uploads/Linkdaten"
UploadPaths="~/Uploads/Linkdaten"
DeletePaths="~/Uploads/Linkdaten"
/>
</telerik:RadFileExplorer>

I have found out, that the fileexplorer has a problem with my css-style. When I put the code in a new webform, it works fine.

Is there a possbility to define, that the fileexplorer should ignore all css from my page?

Thank you for the help!
Dobromir
Telerik team
 answered on 12 Jul 2012
7 answers
244 views
Hi,

I am having one request.
I need to set / change Rad Dock Title Bar height using javascript in both Collapsed or expanded position.
I can do this using CSS but my requirement is little different. I need to show and hide some of the title bar elements on click of a button using Javascript.

I tried this using div element and height do get chagned but the elements after dock are getting under it.
I want it as when the title bar height gets changed it should be relative as all other elements down page should move down by that height.

So here is the summary of the req.
1. Need to set / change Rad Dock Title Bar height using javascript in both Collapsed or expanded position.
2. When height gets set, the elements in line or below should get moved down by that height.

Expected early reply,
Thanks,
Avi
Dobromir
Telerik team
 answered on 12 Jul 2012
1 answer
248 views
This one is driving me insane and is probably a simple fix.  All i'm trying to do is foreach(griditem) and if that control is checked process it on a button click, but all the checkboxes are false. 

The GridView is created using AutoGenerateColumns, however in the aspx I push a checkbox column in before hand. Everything looks great just this always false is kiling me.


 foreach (GridDataItem gdItem in RoleNamePageNameAddGrid.MasterTableView.Items)
            {
                CheckBox chk = (CheckBox)gdItem.FindControl("CheckBoxAdd") as CheckBox;
                if(chk.Checked == true)
                {
                }


            }

<telerik:RadGrid ID="RoleNamePageNameAddGrid" runat="server">
        <MasterTableView DataKeyNames="PageDefn">
            <Columns>
                <telerik:GridTemplateColumn HeaderText="Update">
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBoxAdd" runat="server" AutoPostBack="false" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
    <telerik:RadButton ID="AddPageRoleAttachmentButton" runat="server" Text="Add" OnClick="AddPageRoleAttachmentButton_Click">
    </telerik:RadButton>

Joshua
Top achievements
Rank 1
 answered on 11 Jul 2012
10 answers
444 views
Hi,

I have a radgrid with custom FormTemplate and in this template I have a RadButton and a Radtextbox.

I want do click on RadButton and insert some text in RadTextbox.

How can I do it?

Thanks!

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"
    AllowAutomaticInserts="True" CellSpacing="0" GridLines="None" Skin="Black"
    style="height: 44px">
    <MasterTableView autogeneratecolumns="False" datasourceid="SqlDataSource1"
        CommandItemDisplay="Top" DataKeyNames="idExterno" EditMode="PopUp">
        <CommandItemSettings ExportToPdfText="Export to PDF">
        </CommandItemSettings>
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridBoundColumn DataField="idExterno"
                FilterControlAltText="Filter idExterno column" HeaderText="idExterno"
                SortExpression="idExterno" UniqueName="idExterno" DataType="System.Int32"
                ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Model" FilterControlAltText="Filter Model column"
                HeaderText="Model" SortExpression="Model" UniqueName="Model">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="indice"
                FilterControlAltText="Filter indice column" HeaderText="indice"
                SortExpression="indice" UniqueName="indice" DataType="System.Int32">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Height"
                FilterControlAltText="Filter Height column" HeaderText="Height"
                SortExpression="Height" UniqueName="Height">
            </telerik:GridBoundColumn>
        </Columns>
        <EditFormSettings InsertCaption="Add new Item" EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
            <FormTemplate>
                <telerik:RadButton ID="RadButton2" runat="server" onclick="RadButton2_Click"
                    Skin="Forest" Text="RadButton">
                </telerik:RadButton>
                <br />
                <telerik:RadTextBox ID="RadTextBox1" Runat="server" Skin="Web20">
                </telerik:RadTextBox>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False"></FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
</telerik:RadGrid>
Casey
Top achievements
Rank 1
 answered on 11 Jul 2012
0 answers
107 views
Hi,

I used following code to get the total item count to display on the footer:

int RowCount;
protected void RadGrid1_ItemEvent(object sender, GridItemEventArgs e)
{
    if (e.EventInfo is GridInitializePagerItem)
    {
         RowCount = (e.EventInfo as GridInitializePagerItem).PagingManager.DataSourceCount;
    } 
}
  
  
protected void grd_ItemDataBound(object sender, GridItemEventArgs e)
 
    if (e.Item is GridFooterItem) //Set footer text  
    {
        RadGrid grd = (RadGrid)sender;
        GridFooterItem footerItem = e.Item as GridFooterItem;
        footerItem["LastCol"].Text = "Count: " + RowCount.ToString(); 
    }
}


However, when I export the grid to the Excel, the count is show as 0 in excel file (Count: 0).
Is there any workaround on this issue?

Thanks

Lamk.
LamKhoa
Top achievements
Rank 1
 asked on 11 Jul 2012
8 answers
147 views
Have a major problem with RadWindows that are pinned.

When opening a RadWindow (either clientside or serverside) and pinning it caused the clients CPU usage for iexplore.exe to go up. When the window is not pinned the CPU usage will generally be 0, but as soon as we pin the windows the CPU can increase by as much as 8% and stay there until we unpin it.

Completely baffled by this behaviour. Just to test it wasn't something I introduced I created a very basic new web application, added simply the scriptmanager, radwindowmanager and 1 radwindow to the page. We added a simple page to load in the radwindow.

I then pinned the window and the CPU usage went up and stayed up, unpinned it and the CPU usage went down.

Heres the example we used...
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="TestRad._Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"  
            OutputCompression="AutoDetect"
        </telerik:RadScriptManager> 
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
            <Windows> 
                <telerik:RadWindow runat="server" VisibleOnPageLoad="true" Visible="true" Behavior="Maximize, Minimize, Pin" InitialBehavior="Pin" NavigateUrl="WebForm1.aspx"></telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 
    </div> 
    </form> 
</body> 
</html> 
 

...and the window to load...
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="TestRad.WebForm1" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
    hello world 
    </div> 
    </form> 
</body> 
</html> 
 

No code behind is on either form. Absolutely annoying.

We did some snooping and located a possible area where the issue is happening. Seems to be getting stuck in one of the telerik script resource files. We notice ValidateParameter was being called constantly after the pinning though we didn't have the time to debug fully.


Slav
Telerik team
 answered on 11 Jul 2012
2 answers
88 views
I am following the example for resource availability but I can't figure out how to store additional text fields (Phone, BookedBy) for the appointments. I don't need them as drop down selectable resources, I need simple text entry. Is there a  way to do this?

Here is my sql data:
    <asp:SqlDataSource ID="AppointmentsDataSource" runat="server" ProviderName="System.Data.SqlClient"
        ConnectionString="<%$ ConnectionStrings:MCHPEVENTS %>" SelectCommand="SELECT [SchedulingID], [Start], [End], [Subject], [BookedBy], [Phone], [RoomID] FROM [RS_Scheduling]"
        InsertCommand="INSERT INTO [RS_Scheduling] ([Start], [End], [Subject], [RoomID], [BookedBy], [Phone]) VALUES (@Start, @End, @Subject, @RoomID, @BookedBy, @Phone)"
        UpdateCommand="UPDATE [RS_Scheduling] SET [Start] = @Start, [End] = @End, [Subject] = @Subject, [RoomID] = @RoomID, [BookedBy] = @BookedBy, [Phone] = @Phone WHERE (SchedulingID = @SchedulingID)"
        DeleteCommand="DELETE FROM [RS_Scheduling] WHERE [SchedulingID] = @SchedulingID">
        <DeleteParameters>
            <asp:Parameter Name="SchedulingID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="SchedulingID" Type="Int32" />
            <asp:Parameter Name="Start" Type="DateTime" />
            <asp:Parameter Name="End" Type="DateTime" />
            <asp:Parameter Name="Subject" Type="String" />
            <asp:Parameter Name="RoomID" Type="Int32" />
            <asp:Parameter Name="BookedBy" Type="String" />
            <asp:Parameter Name="Phone" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="Start" Type="DateTime" />
            <asp:Parameter Name="End" Type="DateTime" />
            <asp:Parameter Name="Subject" Type="String" />
            <asp:Parameter Name="RoomID" Type="Int32" />
            <asp:Parameter Name="BookedBy" Type="String" />
            <asp:Parameter Name="Phone" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>

Thanks

http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceavailability/defaultvb.aspx 
Darren
Top achievements
Rank 1
 answered on 11 Jul 2012
3 answers
132 views
Hello everyone,

I want to partially generate an HTMLchart in codebehind.
Here is what i got :

ASPX :
<telerik:RadHtmlChart ID="CHT_samples" runat="server">
</telerik:RadHtmlChart>

in my .CS file :
AxisItem o_xItem = new AxisItem();
i_gridLines =9;
for (i_incrementA = 0; i_incrementA < i_gridLines; i_incrementA++)
{
       // Add the mold number as the X label
       o_xItem = new AxisItem();
       o_xItem.LabelText = "#" + o_sampling.LST_MOLDS[i_incrementA].NUM;
       CHT_SAMPLESCHART.PlotArea.XAxis.Items.Add(o_xItem);
}

This is working perfectly, i get the labels on my chart.
But when i create a serie and decide to add data ...

LineSeries o_xMax = new LineSeries();   
o_xMax.Name = "Max";
 
CHT_SAMPLESCHART.PlotArea.Series.Add(o_xMax);
CHT_SAMPLESCHART.PlotArea.Series[0].Items.Add(16.85m);

I get 2 points on my chart : one for "16" and the other for "85".
Is this a bug or am i doing it wrong ? Or both ? :p

Many thanks.
Framework 4.0 - WS2008R2 - VS2010

EDIT :
http://demos.telerik.com/aspnet-ajax/htmlchart/examples/databinding/staticitems/defaultcs.aspx
This is the same when i try to reproduce your static example :(
Slav
Telerik team
 answered on 11 Jul 2012
0 answers
125 views
I'm currently trying to export my Grid when the filters / sorting have been applied.  After reading around, it seems that I can't get that filtered / sorted data back unless in a function like PreRender.  There I can manually loop through each item in the grid and stuff them into an object to send to my custom export utility.

I have a custom javascript button that is running a custom fireCommand which triggers the ItemCommand function to fire off. Following the ideas from this post: http://www.telerik.com/community/forums/aspnet/grid/how-to-get-filter-data.aspx I am setting a flag in the fireCommand when my CommandName is matches the proper condition.  Then in PreRender, I call my own export function when the flag is true and this is where I'm running into issues.  Event Viewer kicks back: Server cannot set content type after HTTP headers have been sent.  

Essentially this is what my custom export function is doing to serve up the file: 
Response.Clear();
Response.AddHeader("Content-Type", "application/pdf");
Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName + ".pdf" + ";);
Response.Flush();
Response.BinaryWrite(downloadBytes);
Response.Flush();
Response.End(); 

So is there a way I can access the sorted / filtered data to use in an export of my own?  Or is there any way to suppress whatever is firing off with Http Headers?


Philip
Top achievements
Rank 1
 asked on 11 Jul 2012
1 answer
60 views
Hello,

Here is my code

   <td align="right" width="20%"><asp:label id="LblID" runat="server" CssClass="BodyCopy" Visible="False"> ID: </asp:label>
                                   <asp:Label ID="lblReqField" runat="server" Text="*" ForeColor="Maroon" Font-Size="Medium" Visible="false"></asp:Label></td>
                                 
  <td align="left" width="30%"> 
                                   <asp:textbox id="TxtID" runat="server"  TextMode="SingleLine" Visible="false" MaxLength="10"></asp:textbox></td>

before using Rad Ajax manager, it is working fine and displaying in one row.

Now after adding the following Rad Ajax manager, ID and lblReqfield are displaying in two different rows but txtbox is displaying correct,
  <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="cmbPaymentTerms">
                <UpdatedControls>
             
                    <telerik:AjaxUpdatedControl ControlID="LblID" />
                     <telerik:AjaxUpdatedControl ControlID="lblReqField" />
                    <telerik:AjaxUpdatedControl ControlID="TxtID" />
                  
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RbSFDCException">
                <UpdatedControls>
           
                    <telerik:AjaxUpdatedControl ControlID="LblID" />
                     <telerik:AjaxUpdatedControl ControlID="lblReqField" />
                    <telerik:AjaxUpdatedControl ControlID="TxtID" />
                 
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
       </telerik:RadAjaxManager>
Casey
Top achievements
Rank 1
 answered on 11 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?