GridBoundColumn gridColumn = new GridBoundColumn();
RadGrid1.MasterTableView.Columns.Add(gridColumn);
gridColumn.DataFormatString =
"<nobr>{0}</nobr>";
gridColumn.DataField = dataColumn.ColumnName;
gridColumn.HeaderText = dataColumn.ColumnName;
gridColumn.HeaderStyle.Width =
Unit.Pixel(125);
gridColumn.ItemStyle.Width =
Unit.Pixel(125);
gridColumn.FooterStyle.Width =
Unit.Pixel(125);
<telerik:RadComboBox runat="server" ID="RadComboBox1" Height="400px" Width="750px" MarkFirstMatch="true" DataSourceID="SessionDataSource1" EnableLoadOnDemand="true" OnItemDataBound="RadComboBox1_ItemDataBound" ShowMoreResultsBox="true" EnableVirtualScrolling="true" ItemsPerRequest="20" EnableAutomaticLoadOnDemand="True" DataTextField="AssetDescription" DataValueField="AssetDescription" style="margin-bottom: 0px" AutoPostBack="true" OnSelectedIndexChanged="RadComboBox1_IndexChanged" HighlightTemplatedItems="true" >
Protected Sub RadAsyncUpload1_FileUploaded(ByVal sender As Object, ByVal e As Telerik.Web.UI.FileUploadedEventArgs) Handles RadAsyncUpload1.FileUploaded
Dim counter As Integer = Session("counter")
Dim newrow As DataRow = dt.NewRow
Dim buffer As Byte() = New Byte(e.File.ContentLength - 1) {}
If e.IsValid Then
S3Conn = New AWSAuthConnection(S3AWSAccessKeyId, S3SecretAccessKeyId)
counter = counter + 1
If Not S3Conn Is Nothing Then
S3Conn.createBucket(S3Bucket, Nothing)
Dim metadata As SortedList = New SortedList()
metadata.Add("filename", e.File.FileName)
Dim s3key As String = "test/" & Session("dbid") & "_" & Session("recid") & "_" & CStr(counter)
Dim obj As S3Object = New S3Object(buffer, metadata)
Dim headers As New SortedList
headers.Add("Content-Type", buffer)
headers.Add("x-amz-acl", "public-read")
S3Conn.put(S3Bucket, s3key, obj, headers)
End If
Session("counter") = counter
S3Conn = Nothing
End If
End Sub
<telerik:RadTabStrip ID="tabstrip1" runat="server" SelectedIndex="0" MultiPageID="multipage1" OnClientTabSelected="OnSelected">function OnSelected(sender, args) { var ajaxManager = $find("<%= ajax1.ClientID %>"); ajaxManager.ajaxRequest("test");}<telerik:RadAjaxManager ID="ajax1" runat="server" OnAjaxRequest="ajax1_AjaxRequest"> <AjaxSettings> blablabla code here </AjaxSettings> </telerik:RadAjaxManager>function GridCreated(sender, args) { var scrollArea = sender.GridDataDiv; var masterTable = sender.get_masterTableView(); var itemCount = masterTable.get_dataItems().length; if (itemCount == 0) { scrollArea.style.height = 17 + "px"; }else if (itemCount < 10) { scrollArea.style.height = Math.round((itemCount * 24)) + "px" } }if (RadTabStrip1.FindTabByValue(keyword) == null){
// Create new tab and corresponding pageview and then select it. RadTab SearchTab = new RadTab(String.Format("Search: {0}", keyword), keyword); RadPageView SearchPage = new RadPageView(); SearchPage.ID = keyword; SearchPage.Controls.Add(new Calendar()); SearchTab.PageViewID = SearchPage.ID; RadMultiPage1.PageViews.Add(SearchPage); RadTabStrip1.Tabs.Add(SearchTab); RadTabStrip1.FindTabByValue(keyword).Selected = true; RadMultiPage1.FindPageViewByID(keyword).Selected = true;}else{
// Select the already existing tab RadTabStrip1.FindTabByValue(keyword).Selected = true; RadMultiPage.FindPageViewByID(keyword).Selected = true;}I need to use the DockToggleCommand in order for the user to switch how the user will view the data within the dock. (ie. Grid Format vs. Chart Format). The command button would autopostback and switch views depending ont he State of the toggle button. How do I need to check for the state of the ToggleCommand server side so I can return the correct data format and change the command graphic to an appropriate icon?
The following code gets fired but always returns "Primary".
protected void RadDock_Command(object sender, DockCommandEventArgs e) { if (e.Command.Name == "MyCustomCommand") { RadDock rd = (RadDock)sender;
DockToggleCommand toggleCommand = e.Command as DockToggleCommand;
string strState = toggleCommand.State.ToString(); TextBox1.Text = strState; } }
Microsoft JScript runtime error: Unable to get value of the property 'tHead': object is null or undefinedTelerik.Web.UI.RadTreeList.prototype=..._getTableHeaderRow:function(b){var c=null;if(b.tHead){for(var a=0;a<b.tHead.rows.length;a++){if(b.tHead.rows[a]!=null){if(b.tHead.rows[a].cells[0]!=null){if(b.tHead.rows[a].cells[0].tagName!=null){if(b.tHead.rows[a].cells[0].tagName.toLowerCase()=="th"){c=b.tHead.rows[a];break;}}}}}}return c;},... <telerik:RadTreeList ID="myData" runat="server" DataSourceID="sqlData" DataKeyNames="ID" ParentDataKeyNames="ParentID" AutoGenerateColumns="false" OnDataBound="myData_DataBound"> <Columns>... </Columns> <NoRecordsTemplate> <span>There is no data selected!</span> </NoRecordsTemplate> </telerik:RadTreeList>