Hi,
I have a RadCombobox like this:
<telerik:RadComboBox CheckBoxes="true" ID="rcb_team" DataSourceID="sds_team" DataValueField="id" DataTextField="naam" runat="server">
<HeaderTemplate>
<label class="mr-3"> </label>
<div class="row">
<div class="col-6">Naam</div>
<div class="col-6">Functie</div>
</div>
</HeaderTemplate>
<ItemTemplate>
<div class="row">
<div class="col-6"><%# Eval("naam") %></div>
<div class="col-2">
<telerik:RadButton ID="rb_teamleider" AutoPostBack="false" ToggleType="Radio" ButtonType="ToggleButton" GroupName="Radios" runat="server">
<ToggleStates>
<telerik:RadButtonToggleState Text="Checked"></telerik:RadButtonToggleState>
<telerik:RadButtonToggleState Text="UnChecked"></telerik:RadButtonToggleState>
</ToggleStates>
</telerik:RadButton>
</div>
</ItemTemplate>
</telerik:RadComboBox>
In this scenario the radio buttons are not toggling...can you please reproduce and see what is happening?
Thanks,
Marc
Hello,
Any chart that renders as SVG or any .svg image end up blank when using the RadClientExportManager.
The blank chart in the attached image is rendered as svg. The first donut chart renders as SVG but I convert it to png so it shows. If I convert them to an svg file first they are still blank. The other charts are using telerik charts.
This happens for exportPDF, exportIMAGE and exportSVG in the RadClientExportManager. Anything that renders as an SVG ends up blank.
I tried your demo online and it renders the map blank as well. So I'm assuming the map renders as an SVG. Is there a way to fix this?
Thanks,
Jesse
I have a RadGrid that displays some images from a database. I'm trying to add a button to the grid that allows the user to download the image using the original file name and extension saved in the ImageName column.
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSourceImageUpload" OnItemCommand="RadGrid1_ItemCommand">
<MasterTableView DataKeyNames="ImageID" DataSourceID="SqlDataSourceImageUpload" >
<Columns>
<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="download_file" UniqueName="download" ></telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="ImageName" UniqueName="ImageName" ></telerik:GridBoundColumn>
<telerik:GridBinaryImageColumn DataField="ImageData" ></telerik:GridBinaryImageColumn>
</Columns>
</MasterTableView>
<asp:SqlDataSource ID="SqlDataSourceImageUpload" runat="server"
ConnectionString="<%$ ConnectionStrings:123ConnectionString %>"
SelectCommand="SELECT * FROM [tbl_Images]"
DeleteCommand="DELETE FROM [tbl_Images] WHERE [ImageID] = @ImageID"
InsertCommand="INSERT INTO [tbl_Images] ([ImageData], [ImageName], [Text])
VALUES (@ImageData, @ImageName, @Text)"
UpdateCommand="UPDATE [tbl_Images] SET [Text] = @Text WHERE [ImageID] = @ImageID">
<DeleteParameters>
<asp:Parameter Name="ImageID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:QueryStringParameter Name="IncidentID" QueryStringField="ID" Type="String" />
<asp:Parameter Name="Text" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Text" Type="String" />
<asp:Parameter Name="ImageID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
I found this code online, and honestly not sure how to make it all work with what I'm trying to do. I really feel like I'm over complicating this whole thing. Is there an easy button I'm missing somewhere?
The ultimate goal is for the user to click a download button and have the image download using the ImageName field as the file name.
Protected Sub RadGrid1_ItemCommand(sender As Object, e As GridCommandEventArgs)
If e.CommandName = "download_file" Then
Dim ditem As GridDataItem = CType(e.Item, GridDataItem)
Dim filename As String = ditem("ImageName").Text
Dim path As String = MapPath("/sample/" & filename)
Dim bts As Byte() = System.IO.File.ReadAllBytes(path)
Response.Clear()
Response.ClearHeaders()
Response.AddHeader("Content-Type", "Application/octet-stream")
Response.AddHeader("Content-Length", bts.Length.ToString())
Response.AddHeader("Content-Disposition", "attachment; filename=" & filename)
Response.BinaryWrite(bts)
Response.Flush()
Response.[End]()
End If
End Sub
Hello!
I am trying to find a way to set RadMenu items' imageUrl via Javascript. Is that possible? By ImageUrl, I mean the image on the left of the menu (icons).
Thanks!
Hi, I want to have a column in radgrid batch edit and that column can contain either a textbox or dropdown based on a condition of the binding dataset. How can I implement this?
Thanks
Hello,
I have a DataForm that is bound to a complex object. Within this complex object we have sub-objects that are Lists<> of other objects. How can I put a RadGrid inside the DataForm and have it bind to the sub-object List<>?
I have a Hierarchy grid where I need to save both master view and detail view changes using an external button. For each view it calls the OnBatchEditCommand method.
I want to execute a method after completing all the BatchEditCommands. How can I do it?
Code
<script type="text/javascript">
function OnBatchEditOpening(sender, args) {
var columnName = args.get_columnUniqueName();
if (columnName != "AcceptableValues") {
args.set_cancel(true);
}
}
function savePage(sender, args) {
var pageIsValid = Page_ClientValidate();
if (!pageIsValid) {
args.set_cancel(true);
}
args.set_cancel(saveAllChanges());
}
function saveAllChanges() {
var grid2 = $find("<%= RadGrid1.ClientID %>");
var masterTable2 = grid2.get_masterTableView();
var batchEditManager = grid2.get_batchEditingManager();
var tables = [];
tables.push(masterTable2);
tables.push(grid2.get_detailTables()[0]);
var isDirty = false;
for (var i = 0; i < tables.length; i++) {
if (batchEditManager.hasChanges(tables[i])) {
isDirty = true;
break;
}
}
if (isDirty) {
batchEditManager.saveAllChanges(tables);
}
return isDirty;
}
</script>
<telerik:RadGrid ID="RadGrid1" runat="server" RenderMode="Lightweight"
OnPreRender="RadGrid1_PreRender"
OnNeedDataSource="RadGrid1_NeedDataSource" OnBatchEditCommand="RadGrid1_BatchEditCommand" MasterTableView-EditMode="Batch" >
<ClientSettings>
<ClientEvents OnBatchEditOpening="OnBatchEditOpening" />
</ClientSettings>
<MasterTableView Name="Errors" DataKeyNames="ErrorType,ColumnFieldName,Value" EditMode="Batch" AutoGenerateColumns="false" HeirarchyLoadMode="client">
<BatchEditingSettings SaveAllHierarchyLevels="true" />
<Columns>
<telerik:GridBoundColumn UniqueName="ErrorType" DataField="ErrorType" HeaderText="Error Type" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ExcelColumnCell" DataField="ExcelColumnCell" HeaderText="Excel Column/Cell"></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColumnFieldName" DataField="ColumnFieldName" HeaderText="Column/Field Name" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Value" DataField="Value" HeaderText="Value"></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="AcceptableValues" DataField="AcceptableValues" HeaderText="Acceptable Values"></telerik:GridBoundColumn>
</Columns>
<DetailTables>
<telerik:GridTableView DataMember="ErrorDetails" Name="ErrorDetails" DataKeyNames="ErrorType,ColumnFieldName,Value" EditMode="Batch" AutoGenerateColumns="false"
ShowHeader="false"
ShowFooter="false"
AllowPaging="false"
AllowFilteringByColumn="false"
GridLines="None"
BorderStyle="None"
BatchEditingSettings-EditType="Cell"
HeirarchyLoadMode="client">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="ErrorType" MasterKeyField="ErrorType" />
<telerik:GridRelationFields DetailKeyField="ColumnFieldName" MasterKeyField="ColumnFieldName" />
<telerik:GridRelationFields DetailKeyField="Value" MasterKeyField="Value" />
</ParentTableRelation>
<Columns>
<telerik:GridBoundColumn UniqueName="ErrorType" DataField="ErrorType" HeaderText="Error Type" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ExcelColumnCell" DataField="ExcelColumnCell" HeaderText="Excel Column/Cell"></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="ColumnFieldName" DataField="ColumnFieldName" HeaderText="Column/Field Name" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="Value" DataField="Value" HeaderText="Value"></telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="AcceptableValues" DataField="AcceptableValues" HeaderText="Acceptable Values"></telerik:GridBoundColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
</MasterTableView>
</telerik:RadGrid>
<telerik:RadButton runat="server" ID="RadButton1" Text="Save" OnClientClicking="savePage" OnClick="RadButton1_Click"></telerik:RadButton>
Unable to get the validation of the controls working in Web form
RadWizard and previous button in UI for ASP.NET AJAX | Telerik Forums
When you create a Telerik Web Application using teh Outlook-Inspired template, how do you automatically expand the side menu? You have to click at the top left corner to expand.
I want to show up like the below, without having to click on the red in order for the left side to show when I first initialize the app.