| <telerik:RadSplitter ID="radSplitter" runat="server"> |
| <telerik:RadPane ID="paneLeft" runat="server">Left Side</telerik:RadPane> |
| <telerik:RadSplitBar ID="splitBar" runat="server" width="20" CollapseMode="Forward" /> |
| <telerik:RadPane ID="paneRight" runat="server">Right Side</telerik:RadPane> |
| </telerik:RadSplitter> |
if (dlFile.Exists)
{
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment; filename=" + dlFile.Name);
Response.AddHeader(
"Content-Length", dlFile.Length.ToString());
Response.ContentType = ReturnExtension(dlFile.Extension.ToLower());
Response.TransmitFile(dlFile.FullName);
Response.End();
}
Thanks
I'm currently trying to build a form using several input fields and a RadImageEditor. The problem is the only way to save the picture is to call the client-side function "saveImageOnServer". This function though is called asynchronously, so sometimes the picture is hold in my Session, sometimes the button onSave - servermethod is called first and the Session is empty.
Is there any possiblity to ensure the image-save function is called first or to get the edited image inside the postback?

We are using the RadAsyncUpload control (version 2015.401.40) to upload files to an FTP server using FTPWebRequest.
This works without any problems when running on localhost or even on our development webserver where the FTP is hosted on the same network.
However when we update our live web site which Is hosted on a different network to the FTP the file no longer uploads.
We have watched the process and we can actually see the folder structure being created successfully on the FTP and for a very short time we can even see the file we have uploaded TestFile.pdf with a file size of 0kb (The actual file size is 81kb). After approx. 60 seconds we get the "operation has timed out error" and the TestFile.pdf document disappears from the FTP.
Not sure if this is a permissions issue as the upload inidcator is green and i can see the file inside the TempFolder inside the WebApplication.
Any help on this would be great, we are going round in circles on this one.
I'm following along with the "Grid - Hierarchy with Templates" example. There's a parent table, when the parent table row is expanded a template with several tabs is displayed, each tab contains a sub grid of the parent. For the most part my version of this example works great.
The example seems to use "a little magic" to communicate the data key for the parent rows to the controls in the NestedViewTemplate. An ASP Label's text is bound to the data key for the rows (it is set not visible). A reference to the magic Label is then used in the ObjectDataSource to fetch sub grid data as needed.
My issues relates to having to do some validation of data before new data is Inserted. To do the validation I need to know the parent table row's data key in the code behind from the magic Label. I know how to get the Label's for all rows such as in the code example below. My issue is figuring out which Label to take the key from as there's a Label for each row in the Parent table.
protected void BudgetAdjustmentItemRadGrid_InsertCommand(object sender, GridCommandEventArgs e)
{
Label dataKeyLabel = null;
int id = 0;
foreach (GridNestedViewItem item1 in ParentRadGrid.MasterTableView.GetItems(GridItemType.NestedView))
{
dataKeyLabel = (Label)item1.FindControl("DataKeyLabel");
if (dataKeyLabel != null)
{
id = Convert.ToInt32(dataKeyLabel.Text);
}
}
}
Maybe there's a better way to get the parent table row's data key. Let me know if you know one. I did find something that looked promising in the documentation. There's reference to a Parent Data Key and Detail Data Key such as below. However I can't find a working example of these settings. Furthermore my app won't compile when I attempt to use them.
<NestedViewSettings DataSourceID="SqlDataSource2"><telerik:ParentTableRelation MasterKeyField="CustomerID" DetailKeyField="CustomeriD"/></NestedViewSettings>
I have a radgrid which holds a table to be modified by the user.
The columns are ID (hidden as its the identity in the table), Name, Phone number, Address etc.
When I click the btnAdd button, i get the popup and it shows ID, Name and Phone number, Address etc.
All good, but I want to hide the ID, so the user cannot insert a value.
For the grid itself I use
Private Sub dgGrid_ColumnCreated(sender As Object, e As GridColumnCreatedEventArgs) Handles dgGrid.ColumnCreated
If e.Column.UniqueName <> "Actions" AndAlso e.Column.UniqueName <> "EditColumn" Then
If e.Column.UniqueName = "ID" Then
e.Column.Display = False
Exit Sub
End If
...
function OnClientAppointmentClick(sender, args) { var apt = args.get_appointment(); showTooltip(apt); } function showTooltip(apt) { var tooltip = $find('<%=RadToolTip1.ClientID %>'); tooltip.set_targetControl(apt.get_element()); $get("startTime").innerHTML = apt.get_start().format("MM/dd/yyyy HH:mm"); $get("endTime").innerHTML = apt.get_end().format("MM/dd/yyyy HH:mm"); $get("TitleDiv").innerHTML = apt.get_subject(); $get("descriptionDiv").innerHTML = decodeEntities(apt.get_description()); tooltip.set_text($get("contentContainer").innerHTML); setTimeout(function () { tooltip.show(); }, 20); } function decodeEntities(encodedString) { var textArea = document.createElement('textarea'); textArea.innerHTML = encodedString; return textArea.value; }<telerik:RadScheduler RenderMode="Lightweight" runat="server" ID="RadScheduler1" SelectedView="MonthView" StartEditingInAdvancedForm="true" OnClientTimeSlotClick="OnClientTimeSlotClick" OnClientAppointmentsPopulating="OnClientAppointmentsPopulating" OnClientTimeSlotContextMenu="OnClientTimeSlotContextMenu" OnClientAppointmentWebServiceInserting="OnClientAppointmentWebServiceInserting" EnableDescriptionField="true" AppointmentStyleMode="Default" OnClientAppointmentDoubleClick="hideTooltip" OnClientAppointmentContextMenu="hideTooltip" OnClientAppointmentClick="OnClientAppointmentClick" OnClientDataBound="onSchedulerDataBound" ShowAllDayRow="False" OverflowBehavior="Expand" Height="100%"><telerik:RadToolTip ID="RadToolTip1" runat="server" RelativeTo="Element" Position="BottomCenter" AutoCloseDelay="0" ShowEvent="FromCode" Width="250px" > <div id="contentContainer"> Starts on: <span id="startTime"></span> <br /> Ends on: <span id="endTime"></span> <br /> <div id="TitleDiv"></div> <hr /> <div id="descriptionDiv"></div> </div></telerik:RadToolTip>hello
i have the following problem. i have a radgrid which is totally created at runtime and i need to add two ways of editing
i mean, i added a GridEditCommandColumn and then, because only one GridEditCommandColumn can be added to radgrid, i created a GridButtonColumn
here is the code:
GridEditCommandColumn eCol = new GridEditCommandColumn();eCol.HeaderStyle.Width = Unit.Pixel(30);eCol.UniqueName = "EditCommandColumn";eCol.ItemStyle.CssClass = "edit_btn";eCol.UpdateText = "Save changes";grid.MasterTableView.Columns.Add(eCol);GridButtonColumn cCol = new GridButtonColumn();cCol.ButtonType = GridButtonColumnType.LinkButton;cCol.UniqueName = "CorrectColumn";cCol.ItemStyle.CssClass = "edit_btn";cCol.CommandName = "Edit";cCol.Text = "Correct";grid.MasterTableView.Columns.Add(cCol);the problem rises when in the radGrid_ItemCommand event i need to execute two different operations due to which button has been clicked
here is the pseudocode:
if (e.CommandName == "Edit"){ //get button name or id}if (e.CommandName == "Update"){ if (button_name=='Edit') do exec 1 else if (button_name=='Correct') do exec 2}how can i solve ?
thanks in advance
Hello!
I have horisontal scrolling bar, in aspx file it looks like:
<telerik:RadMenu ID="ActionListMenu" SkinID="Menu" OnItemDataBound="OnActionButtonDataBound"
Width="100%" Flow="Horizontal" runat="server" DefaultGroupSettings-Flow="Horizontal" DefaultGroupSettings-RepeatColumns="1" CssClass="ActionsBar">
</telerik:RadMenu>
and in website it's:
<div class="rmScrollWrap rmRootGroup rmHorizontal" style="overflow-x: hidden; overflow-y: hidden; width: 100%; overflow: visible;">
<ul class="rmRootScrollGroup" style="position: relative; width: 519px; display: block; left: -35px;">
<li class="rmItem " ... />
...
<li class="rmItem " ... />
</ul>
<a class="rmLeftArrow" style="z-index: 2000; top: 0px; left: -1px;" href="#" jQuery191013909904974899967="13">
<a class="rmRightArrow" style="z-index: 2000; top: 0px; right: -1px;" href="#" jQuery191013909904974899967="11">
</div>
Now I'm trying to make it scroll farther (more than one "rmItem").
To do so I tried to add events to "rmLeftArrow" and "rmRightArrow" that would change "rmRootScrollGroup" "left" css property, but after all it comming back to the place it shuld be without my stript.
I think that after clicking on arrow Telerik's script sets expected value of "rmRootScrollGroup" "left" css property to some variable, and after moving it by any way (mouse scrolling, clicking/mouseovering arrows) it will start from the point it shuld be.
Example:
After clicking on the right arrow, position of rmRootScrollGroup shuld change from 0px to -25px.
I add another -200px (by attatching click event on arrow, something like .style.left = (.style.left - 200) + 'px' ))
so now rmRootScrollGroup has property left: -225px. And it really appears on -225px.
The problem is, that after mouseovering on arrow it will return to -25px :(
Is there any way to make it moving further?
I try to use FrozenColumn for Grid after Read Demo. But when I apply FrozenColumn & UseStaticHeader, Column will always display only with match width of grid (Other column will lost) and When Scroll, only data will scroll while header still the same (that doesn't match with data column). Freeze column doesn't work too.
I have attached picture of My Grid (I using Simple Databinding) , "Initial" is when data loaded and "Scrolled" is when I scrolled Horizontal.
Below is my code
<telerik:RadGrid ID="RadGridBudgetDataEntry" runat="server" AutoGenerateColumns="False" CellSpacing="-1" GridLines="Both" AllowSorting="True" AllowPaging="True" PageSize="20" Width="800px" Height="500px" OnItemDataBound="RadGridBudgetDataEntry_ItemDataBound"> <ClientSettings> <Scrolling AllowScroll="True" SaveScrollPosition="true" UseStaticHeaders="true" FrozenColumnsCount="1" > </Scrolling> </ClientSettings> <MasterTableView TableLayout="Fixed"> <Columns> <telerik:GridTemplateColumn DataField="AccountCode" FilterControlAltText="Filter TemplateColumn column" HeaderText="Code" ReadOnly="True" UniqueName="AccountCode" HeaderStyle-Width="200px"> <ItemTemplate> <telerik:RadLabel ID="RadLabelAccountCode2" runat="server" Text='<%# Eval("AccountCode") %>'> </telerik:RadLabel> </ItemTemplate> <HeaderStyle HorizontalAlign="Center" /> <ItemStyle HorizontalAlign="Left" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="AccountName" FilterControlAltText="Filter TemplateColumn1 column" HeaderText="Full Description" UniqueName="AccountName" HeaderStyle-Width="200px"> <ItemTemplate> <telerik:RadLabel ID="RadLabelAccountName" runat="server" Text='<%# Eval("AccountName") %>'> </telerik:RadLabel> </ItemTemplate> <HeaderStyle HorizontalAlign="Center"/> <ItemStyle HorizontalAlign="Left" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Jan_Amt" FilterControlAltText="Filter TemplateColumn1 column" HeaderText="Jan" UniqueName="Jan_Amt" HeaderStyle-Width="200px"> <ItemTemplate> <telerik:RadLabel ID="RadLabelJan_Amt" runat="server" Text='<%# Eval("Jan_Amt") %>'> </telerik:RadLabel> </ItemTemplate> <HeaderStyle HorizontalAlign="Center" /> <ItemStyle HorizontalAlign="Left" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Feb_Amt" FilterControlAltText="Filter TemplateColumn1 column" HeaderText="Feb" UniqueName="Feb_Amt" HeaderStyle-Width="200px"> <ItemTemplate> <telerik:RadLabel ID="RadLabelFeb_Amt" runat="server" Text='<%# Eval("Feb_Amt") %>'> </telerik:RadLabel> </ItemTemplate> <HeaderStyle HorizontalAlign="Center" /> <ItemStyle HorizontalAlign="Left" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Mar_Amt" FilterControlAltText="Filter TemplateColumn1 column" HeaderText="Mar" UniqueName="Mar_Amt" HeaderStyle-Width="200px"> <ItemTemplate> <telerik:RadLabel ID="RadLabelMar_Amt" runat="server" Text='<%# Eval("Mar_Amt") %>'> </telerik:RadLabel> </ItemTemplate> <HeaderStyle HorizontalAlign="Center"/> <ItemStyle HorizontalAlign="Left" /> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Apr_Amt" FilterControlAltText="Filter TemplateColumn1 column" HeaderText="Apr" UniqueName="Apr_Amt" HeaderStyle-Width="200px"> <ItemTemplate> <telerik:RadLabel ID="RadLabelApr_Amt" runat="server" Text='<%# Eval("Apr_Amt") %>'> </telerik:RadLabel> </ItemTemplate> <HeaderStyle HorizontalAlign="Center"/> <ItemStyle HorizontalAlign="Left" /> </telerik:GridTemplateColumn> </Columns> </MasterTableView> <PagerStyle PageSizeControlType="RadDropDownList" Mode="NextPrevAndNumeric"></PagerStyle> </telerik:RadGrid>