<
table
style
=
"width:100%"
>
<
tr
>
<
td
>
<
telerik:RadGrid
ID
=
"grd"
runat
=
"server"
Skin
=
"Windows7"
Width
=
"100%"
Height
=
"120px"
AutoGenerateColumns
=
"false"
>
<
MasterTableView
Width
=
"100%"
TableLayout
=
"Fixed"
>
<
Columns
>
<
telerik:GridTemplateColumn
>
<
HeaderStyle
Width
=
"50%"
/>
<
HeaderTemplate
>
<
asp:Label
ID
=
"lblNameHeader"
runat
=
"server"
Text
=
"Name"
></
asp:Label
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblName"
runat
=
"server"
Text='<%#Eval("Name")%>'></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
>
<
HeaderStyle
Width
=
"50%"
/>
<
HeaderTemplate
>
<
asp:Label
ID
=
"lblSurnameHeader"
runat
=
"server"
Text
=
"Surname"
></
asp:Label
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblSurname"
runat
=
"server"
Text='<%#Eval("Surname")%>'></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
EnableRowHoverStyle
=
"true"
>
<
Selecting
AllowRowSelect
=
"true"
/>
<
Scrolling
ScrollHeight
=
"120px"
AllowScroll
=
"true"
UseStaticHeaders
=
"true"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
</
td
>
</
tr
>
</
table
>
public
partial
class
GridTest : System.Web.UI.Page
{
List<MyClass> lst =
new
List<MyClass>();
protected
void
Page_Load(
object
sender, EventArgs e)
{
this
.lst.Add(
new
MyClass(
"Andrew"
,
"Dimech"
));
this
.lst.Add(
new
MyClass(
"Rachel"
,
"Smith"
));
this
.lst.Add(
new
MyClass(
"James"
,
"Black"
));
this
.grd.DataSource =
this
.lst;
this
.grd.DataBind();
}
}
public
class
MyClass
{
public
MyClass(
string
name,
string
surname)
{
this
.Name = name;
this
.Surname = surname;
}
private
string
name;
public
string
Name
{
get
{
return
name; }
set
{ name = value; }
}
private
string
surname;
public
string
Surname
{
get
{
return
surname; }
set
{ surname = value; }
}
}
MailMessage objmail = new MailMessage(); |
if (RadUpload1.UploadedFiles.Count > 0) |
{ |
foreach (UploadedFile file in RadUpload1.UploadedFiles) |
{ |
string strPath = string.Empty; |
strPath = file.FileName; |
System.Net.Mail.Attachment objattachment = new System.Net.Mail.Attachment(strPath); |
objmail.Attachments.Add(objattachment); |
} |
} |
{System.IO.FileNotFoundException: Could not find file 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\SubModule.txt'. |
File name: 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\SubModule.txt' |
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) |
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) |
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) |
at System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType) |
at System.Net.Mail.Attachment..ctor(String fileName) |
at User_SendDocMail.btnsendmail_Click(Object sender, EventArgs e) in e:\Projects\ISalesPro\ISalesProWeb\User\SendDocMail.aspx.cs:line 53} |
<
telerik:RadGrid
ID
=
"rgSoftware"
runat
=
"server"
AutoGenerateColumns
=
"false"
AllowFilteringByColumn
=
"false"
AllowSorting
=
"false"
GridLines
=
"Both"
AllowPaging
=
"false"
EnableViewState
=
"true"
Skin
=
"WebBlue"
ShowHeader
=
"true"
EnableAJAXLoadingTemplate
=
"True"
LoadingTemplateTransparency
=
"50"
ShowStatusBar
=
"True"
AllowAutomaticDeletes
=
"false"
AllowAutomaticUpdates
=
"False"
AllowAutomaticInserts
=
"False"
OnNeedDataSource
=
"rgSoftware_NeedDataSource"
OnInsertCommand
=
"rgSoftware_InsertCommand"
OnUpdateCommand
=
"rgSoftware_UpdateCommand"
OnDetailTableDataBind
=
"rgSoftware_DetailTableDataBind"
OnItemCommand
=
"rgSoftware_ItemCommand"
OnDataBound
=
"rgSoftware_DataBound"
>
<
MasterTableView
Font-Names
=
"Helvetica, Arial, Verdana, sans-serif"
Font-Size
=
"10px"
DataKeyNames
=
"SoftwareID"
Name
=
"SoftwareGroup"
Width
=
"100%"
runat
=
"server"
EditMode
=
"InPlace"
CommandItemDisplay
=
"Top"
>
<
DetailTables
>
<
telerik:GridTableView
DataKeyNames
=
"LicenseInfoID"
Name
=
"LicenseInfoID"
Width
=
"100%"
runat
=
"server"
Font-Size
=
"10px"
EditMode
=
"InPlace"
CommandItemDisplay
=
"Top"
AllowAutomaticInserts
=
"true"
AllowAutomaticUpdates
=
"true"
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UpdateImageUrl
=
"~/Images/Grid/Save.gif"
EditImageUrl
=
"~/Images/Grid/Edit.gif"
InsertImageUrl
=
"~/Images/Grid/Save.gif"
CancelImageUrl
=
"~/Images/Grid/Cancel.gif"
/>
<
telerik:GridBoundColumn
DataField
=
"LicenseInfoID"
Visible
=
"false"
/>
<
telerik:GridTemplateColumn
HeaderText
=
"Key"
UniqueName
=
"Key"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblKey"
runat
=
"server"
Text='<%# Eval("LicenseKey")%>' />
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadTextBox
ID
=
"tbKey"
runat
=
"server"
Text='<%# Eval("LicenseKey")%>' Width="200px"
Font-Size="10px" />
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"# of Licenses"
UniqueName
=
"Qty"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblQty"
runat
=
"server"
Text='<%# Eval("NumberOfLicenses")%>' />
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadNumericTextBox
ID
=
"tbQty"
runat
=
"server"
text='<%# Eval("NumberOfLicenses")%>'
Width="30px" NumberFormat-DecimalDigits="0" ShowSpinButtons="false" Font-Size="10px" />
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridCheckBoxColumn
UniqueName
=
"chkActive"
DataField
=
"Active"
HeaderText
=
"Active"
/>
</
Columns
>
</
telerik:GridTableView
>
</
DetailTables
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UpdateImageUrl
=
"~/Images/Grid/Save.gif"
EditImageUrl
=
"~/Images/Grid/Edit.gif"
InsertImageUrl
=
"~/Images/Grid/Save.gif"
CancelImageUrl
=
"~/Images/Grid/Cancel.gif"
/>
<
telerik:GridBoundColumn
DataField
=
"SoftwareID"
Visible
=
"false"
/>
<
telerik:GridTemplateColumn
HeaderText
=
"Software"
UniqueName
=
"SoftwareName"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblSoftwareName"
runat
=
"server"
Text='<%# Eval("SoftwareName")%>' />
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadTextBox
ID
=
"tbSoftwareName"
runat
=
"server"
Text='<%# Eval("SoftwareName")%>'
Width="250px" Font-Size="10px" />
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Location"
UniqueName
=
"LocationOfSoftware"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblLocationOfSoftware"
runat
=
"server"
Text='<%# Eval("LocationOfSoftware")%>' />
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadTextBox
ID
=
"tbLocationOfSoftware"
runat
=
"server"
Text='<%# Eval("LocationOfSoftware")%>'
Width="250px" Font-Size="10px" />
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridCheckBoxColumn
HeaderText
=
"Active"
DataField
=
"Active"
UniqueName
=
"SoftwareActive"
/>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
AllowRowsDragDrop
=
"true"
>
</
ClientSettings
>
<
FilterMenu
EnableEmbeddedSkins
=
"False"
>
</
FilterMenu
>
</
telerik:RadGrid
>
protected void rgSoftware_InsertCommand(object source, GridCommandEventArgs e)
{
AssetDataDataContext db = new AssetDataDataContext();
GridEditableItem editedItem = e.Item as GridEditableItem;
if ("SoftwareGroup".Equals(e.Item.OwnerTableView.Name))
{
Software nSoftware = new Software();
SaveSoftwareGroup(nSoftware, editedItem);
db.Softwares.InsertOnSubmit(nSoftware);
}
else if ("LicenseInfoID".Equals(e.Item.OwnerTableView.Name))
{
GridDataItem parentItem = (GridDataItem)e.Item.OwnerTableView.ParentItem;
LicenseInfo nLicense = new LicenseInfo();
nLicense.SoftwareID = Int32.Parse(parentItem.OwnerTableView.DataKeyValues[parentItem.ItemIndex]["SoftwareID"].ToString());
SaveLicenseInfo(nLicense, editedItem);
db.LicenseInfos.InsertOnSubmit(nLicense);
}
db.SubmitChanges();
}
protected void rgSoftware_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
AssetDataDataContext db = new AssetDataDataContext();
GridEditableItem editedItem = e.Item as GridEditableItem;
if ("SoftwareGroup".Equals(e.Item.OwnerTableView.Name))
{
Int32 SoftwareID = Int32.Parse(editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["SoftwareID"].ToString());
Software nSoftware = db.Softwares.SingleOrDefault(s => s.SoftwareID == SoftwareID);
SaveSoftwareGroup(nSoftware, editedItem);
}
else if ("LicenseInfoID".Equals(e.Item.OwnerTableView.Name))
{
//Get the primary key value using the DataKeyValue.
Int32 LicenseInfoID = Int32.Parse(editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["LicenseInfoID"].ToString());
LicenseInfo nLicense = db.LicenseInfos.SingleOrDefault(l => l.LicenseInfoID == LicenseInfoID);
SaveLicenseInfo(nLicense, editedItem);
}
db.SubmitChanges();
rgSoftware.MasterTableView.ClearEditItems();
}
Hello,
Using Sitefinity and RadMenu I can see the Expand Item Image (arrow) appears on parent menu items.
But the Arrow does not appear on parent menu items that belong to the root level of the menu.
How can I make the arrow appear for root menu items that have children?
Regards,
Mark.
I have a ListBox and each time one item is selected a RadCombo is added to my page with the ID = Selected value in the listbox. On server side my code verifies to not duplicate the Radcombo. There is a button for each RadCombo to remove it from the page. The delete action is made on client side with Jquery code and it just empty the div containing radcombo and other controls. Unfortunately Telerik doesn’t remove the RadCombo from its collection, and I verified there is still some div hidden with the same ID, and still continue to work with the RadCombo and getting the following error shown in FireBug:
(header is the class of div containing the RadCombo)
_
evt = Object { type="click", rawEvent=, more...}
(?)()
browserHandler(e=click clientX=393, clientY=182) e = click clientX=393, clientY=182
var index = header._index;
My question is how can I remove the control on client site in order to not get the error.
I added the following code on pageLoad event
combos = Telerik.Web.UI.RadComboBox.ComboBoxes;
//First of all how do I get the Id of each combo?
$.each(combos, function(){this.??? // Get Name or ID});
The javascript is an external file and cannot use <% =control.ClientID%>
I hope that I was clear to define my issue, and would really appreciated any help.