<asp:Repeater runat="server" ID="Repeater1" DataSourceID="SqlDataSource1" OnItemDataBound="repeater1_ItemDataBound">
<ItemTemplate>
<div style="border: 1px solid #999999; float: left; margin: 3px; width: 125px; height: 125px;
background-image: url('<%# Eval("ProductID", "../../../Img/Northwind/Products/{0}.jpg") %>');">
<div runat="server" id="smallImage" style="width: 125px; height: 125px; background-position: center;
background-repeat: no-repeat;">
</div>
</div>
</ItemTemplate>
</asp:Repeater><rad:RadTreeView ID="tree" OnNodeClick="NodeClick" AutoPostBack="true">
protected void RadComboBoxMedicationName_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
Database db = DatabaseFactory.CreateDatabase();
RadComboBox r = sender as RadComboBox;
DbCommand cmd = db.GetSqlStringCommand("SELECT Id, Description FROM refMedType WHERE Description LIKE '" + e.Context["Text"].ToString() + "%'");
DataTable data = (DataTable)(db.ExecuteDataSet(cmd)).Tables[0]; ;
try
{
int itemsPerRequest = 25;
int itemOffset = e.NumberOfItems;
int endOffset = itemOffset + itemsPerRequest;
if (endOffset > data.Rows.Count)
{
endOffset = data.Rows.Count;
}
if (endOffset == data.Rows.Count)
{
e.EndOfItems =
true;
}
else
{
e.EndOfItems =
false;
}
for (cint i = itemOffset; i < endOffset; i++)
{
r.Items.Add(
new RadComboBoxItem(data.Rows[i]["Description"].ToString(), data.Rows[i]["Description"].ToString()));
}
if (data.Rows.Count > 0)
{
e.Message =
String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), data.Rows.Count.ToString());
}
else
{
e.Message =
"No matches";
}
}
catch (Exception ex)
{
e.Message =
"No matches";
}
}
<telerik:RadComboBox ID="RadComboBoxMedicationName" ShowWhileLoading="true" EmptyMessage="Enter medication name" Text='<%# Bind( "MedicationName" ) %>' LoadingMessage="Loading..." runat="server" Width="250px" Height="200px" AllowCustomText="True" ShowMoreResultsBox="true" EnableLoadOnDemand="True" MarkFirstMatch="True" OnItemsRequested="RadComboBoxMedicationName_ItemsRequested" EnableVirtualScrolling="true" />
<asp:RequiredFieldValidator ID="RequiredFieldValidatorMedicationName" runat="server" ControlToValidate="RadComboBoxMedicationName" Display="Dynamic" ErrorMessage="RequiredFieldValidator" ToolTip="Medication required."><br />* Medication required.</asp:RequiredFieldValidator>
I'm using RadGrid with drag and drop to a RadScheduler
The system I'm designing is for a TV Show, where each screenplay have several scripts
The user can schedule each script to be shot/recorded at a time, or to get a entire screenplay and schedule it at once.
In my grid, both screenplay and scripts are rows, so user can drag any.
Question 1 - Is it possible to have indented display for this?
Question 2 - Is it possible that when a user drag a row that is a screenplay, all child scripts go with?
Thanks,
Andre
Hi,
I am not able to get the ID from the dropdown to do the insert of the new record based on that selected item from the that dropdown.
So when I click the "Add file" no record is being saved to the database.
thanks
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server" Skin="Windows7" DecoratedControls="Textbox" /> <div style="padding-left:20px"> <table width="90%" border="0" cellpadding="5" style="text-align:left"> <tr> <td align="left"> <div style="font-size: 14pt; font-weight: bold;"> Add New Media </div> </td> <td align="right" > <img src="../images/arrow_back.png" align="absmiddle" /> <asp:LinkButton ID="btnAddMedia" Font-Bold="false" CausesValidation="false" runat="server" Text="Back to Listings" /> </td> </tr> <tr> <td><div runat="server" id="successaddmsg" visible="false"> <img src="../images/accept.png" align="absmiddle" /> <asp:Label ID="Label1" runat="server" ForeColor="green" Font-Bold="true" Font-Size="12px" Text="Media item was successfully added." /> </div> </td> <td> <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="validateRadUpload" ErrorMessage="Please select at least one valid media file" fileOnServerValidate="CustomValidator1_ServerValidate" /> </td> </tr> <tr> <td> Categroy: </td> <td> <telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="SqlDataSource2" AppendDataBoundItems="true" DataTextField="Category" DataValueField="CatId" Skin="Windows7"> <Items> <telerik:RadComboBoxItem /> </Items> </telerik:RadComboBox> </td> </tr> <tr> <td> Media File: </td> <td> <telerik:RadUpload ID="RadUpload1" runat="server" ControlObjectsVisibility="None" Skin="Office2007"> </telerik:RadUpload> </td> </tr> <tr> <td> Title: </td> <td> <asp:TextBox ID="txtTitle" Width="321px" runat="server"></asp:TextBox> </td> </tr> <tr> <td> Comments: </td> <td> <asp:TextBox ID="txtDesc" Width="321px" runat="server"></asp:TextBox> </td> </tr> <tr> <td colspan="2"> <asp:CheckBox ID="chkShow" Checked="true" runat="server" Text="Make it available on User's Download Page." /> </td> </tr> <tr> <td colspan="2"> <br /> <br /> <asp:Button ID="btnAdd" runat="server" Text="Add file" /> </td> </tr> </table> </div> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MUNTERSJMmlConnectionString %>" SelectCommand="SELECT MediaCategories.CatId, MediaCategories.CatName AS Category FROM MediaCategories ORDER BY CatName "> </asp:SqlDataSource> <%-- Upload Large File Setting Requirements: Open the file C:\Windows\System32\inetsrv\config\applicationHost.config and find the line: <section name="requestFiltering" overrideModeDefault="Deny" /> Set the overrideModeDefault property to Allow. So now the line should look like: <section name="requestFiltering" overrideModeDefault="Allow" /> --%> </asp:Content>