Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
102 views
anyone any idea why the width i am setting to my RadCombo box just isnt working???  I am using a TreeView within the combobox but have a width set but it just doesnt change...have tried a new radcombo without a treeview too but still doesnt change..please can u help??  many thank

 

 

<telerik:RadComboBox ID="RadComboBox1" runat="server" Width="700"

 

 

 

 

 

 

ShowToggleImage="True" Style="vertical-align: middle;" OnClientDropDownOpened="OnClientDropDownOpenedHandler"

 

 

 

EmptyMessage="Choose a business">

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

<div id="div1" style="width: 100%;">

 

 

 

 

 

 

<telerik:RadTreeView runat="server" ID="RadTreeView1" OnClientNodeClicking="nodeClicking">

 

 

 

 

 

 

</telerik:RadTreeView>

 

 

 

 

 

 

</div>

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

<Items>

 

 

 

 

 

 

<telerik:RadComboBoxItem Text="" />

 

 

 

 

 

 

</Items>

 

 

 

 

 

 

</telerik:RadComboBox>

 

Caroline
Top achievements
Rank 1
 answered on 16 Jul 2009
0 answers
107 views
// I used a short string array for my ascx page names:  
    string[] userControlNames = { "0 Index""FirstPage""SecondPage""ThirdPage" };  
 
    protected void Page_Load(object sender, EventArgs e)  
    {  
        if (!Page.IsPostBack)  
        {  
            AddTab("1st Tab""1");  
            AddPageView(RadTabStrip1.FindTabByText("1st Tab"));  
            AddTab("2nd Tab""2");  
            AddTab("3rd Tab""3");  
        }  
    }  
 
    private void AddTab(string tabName, string tabID)  
    {  
        RadTab tab = new RadTab();  
        tab.Text = tabName;  
        tab.AccessKey = tabID;  
        RadTabStrip1.Tabs.Add(tab);  
    }  
 
    private void AddPageView(RadTab tab)  
    {  
        RadPageView pageView = new RadPageView();  
        pageView.ID = tab.AccessKey;  
        RadMultiPage1.PageViews.Add(pageView);  
        pageView.CssClass = "pageView";  
        tab.PageViewID = pageView.ID;  
    }  
 
    protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)  
    {  
        string userControlName = userControlNames[int.Parse(e.PageView.ID)].ToString() + "CS.ascx";  
 
        Control userControl = Page.LoadControl(userControlName);  
        userControl.ID = e.PageView.ID + "_userControl";  
 
        e.PageView.Controls.Add(userControl);  
    }  
 
    protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)  
    {  
        AddPageView(e.Tab);  
        e.Tab.PageView.Selected = true;  
    }

This is my codebehind file for my OnDemand loaded TabStrip. It's working fine.
Inside the first tabbed PageView I also have several RadComboBoxes wich also have an OnDemand loading feature 
(let's assume a Country--> City --> Region loader) like that one in your examples.

When I load the page the first tab is shown and inside it the ComboBox bind to country data waits for me to select a Country.
I select a country and the City Combobox is successfully ondemand bind to cities data and waits for me to select a city.
I select the city and now the last Combobox is ondemand bind to Region data wich I can select finally. No problems here.

Then, when I go to the second tab the loading panel is shown for a couple of seconds and the 2nd tab is shown. Still no problem.

But when I go back to the first tab all my selections inside the ComboBoxes disappear. Even the loaded items inside are lost except the Country combo which was filled on PageLoad. Also the country is still selected inside this ComboBox.

So I think when the RadMultiPage1_PageViewCreated event is fired the viewstate of my Comboboxes gets lost. You can see that my code is a little bit different than your example. The difference is that I set my ASCX page names from an array, but I keep in mind that giving unique ID's to PageView.Controls is important and I think my code does this exactly.

So why I am still losing the viewstate of my ondemand loaded ComboBoxes? Can anyone help me out of this please?

Many Thanks..
Ata Turkoglu
Top achievements
Rank 1
 asked on 16 Jul 2009
1 answer
197 views
Hi,

This is probably a stupid question and I am obviously missing something but I cannot seem to filter a grid from a panelbar. The panel bar is being populated by an sql datasource and this works fine, however getting the accompanying grid to list the appropriate item(s) from the database is causing me some confusion. I got this to work with a dropdownlist but the panelbar seems to be a different animal altogether. I have included the panelbar control and the grid control below. I have searched thoroughly through all forums and help documentation and can't find anything that offers some help here so any help with this would be much appreciated :)

The RadPanelBar:

<telerik:RadPanelBar runat="server" 
                                   id="LayoutPanelBar"
                                   Width="100%"
                                   Height="100%"
                                   ExpandMode="FullExpandedItem" 
                                   DataSourceID="LayoutPanelDataSource" 
                                   DataValueField="HashTableID" 
                                   Skin="Telerik" 
                                   DataFieldID="HashTableID" 
                                   DataTextField="hashText">
</telerik:RadPanelBar>
                                                
<asp:SqlDataSource ID="LayoutPanelDataSource" 
                                 runat="server" 
                                 ConnectionString="<%$ ConnectionStrings: [omitted] %>"
                                 SelectCommand="SELECT [HashTableID], [hashText], [sortOrder] FROM [tblHashTable] WHERE [Category] = 'Layouts' ORDER BY [sortOrder] ASC">
</asp:SqlDataSource>

The RadGrid:

<telerik:RadGrid ID="LayoutGridDetails" 
                          runat="server" 
                          DataSourceID="LayoutGridDataSource" 
                          GridLines="None" 
                          AllowPaging="true" 
                          PageSize="25">
    <PagerStyle Mode="NumericPages" />
    <MasterTableView TableLayout="Fixed">
        <ItemTemplate>
            <b>LayoutId:</b><%# Eval("LayoutId")%>
            <br />
            <b>LayoutName:</b><%# Eval("LayoutName")%>
            <br />
            <b>LayoutDescription:</b><%# Eval("LayoutDescription")%>
        </ItemTemplate>
    </MasterTableView>
</telerik:RadGrid>

<asp:SqlDataSource ID="LayoutGridDataSource" 
                                 runat="server" 
                                 ConnectionString="<%$ ConnectionStrings:[omitted] %>"
                                 SelectCommand="SELECT [LayoutId], [LayoutName], [LayoutDescription], [LayoutCategory] FROM [tblLayouts] WHERE [LayoutCategory] = @LayoutCategory">

    <SelectParameters>
        <asp:ControlParameter Name="LayoutCategory" PropertyName="DataTextField" ControlID="LayoutPanelBar" />
    </SelectParameters>
</asp:SqlDataSource>

I want to be able to filter the records in the tblLayouts.LayoutCategory based on the DataTextField="hashText" selected in the RadPanelBar. The hashText field from tblHashTable is nvarchar(50) and the LayoutCategory from tblLayouts is the same so there is no problem here. The DataField="HashTableID" is an Int32.

Any advice here would be appreciated, thank you.

Grant
Veselin Vasilev
Telerik team
 answered on 16 Jul 2009
1 answer
105 views
Hi all,
I am having trouble migrating my ASP.NET classic RadUpload custom skin to the new AJAX format. Please help.

Here is what it was:
/* r.a.d.upload default embedded skin skin */  
 
.RadUploadTable  
{  
    background: #f7f7f7;  
    border: solid 1px #e5e5e5;  
    border-collapse: collapse !important;  
    filter: progid:DXImageTransform.Microsoft.dropShadow(Color=e5e5e5,offX=2,offY=2,positive=true);  
    margin: 5px 0px;  
    width: 450px;  
    font: normal 8px Arial, Verdana, Sans-serif;  
    color: #333;  
}  
.RadUploadTable td  
{  
    padding: 4px;  
}  
.RadUploadButtonArea  
{  
    background: transparent;  
}  
 
.RadUploadButton,  
.radUploadButtonMedium  
{  
    background: white url('Img/radUploadBtnMedium.gif') no-repeat;  
    border: 0px;  
    height: 22px;  
    width: 115px;  
    font: normal 11px Arial, Verdana, Sans-serif;  
    color: #666;  
}  
 
.RadUploadButtonDisabled  
{  
    background: white url('Img/radUploadBtnMedium.gif') no-repeat;  
    border: 0px;  
    height: 22px;  
    width: 115px;  
    font: normal 11px Arial, Verdana, Sans-serif;  
    color: #666;  
    filter:alpha(opacity=30);  
    -moz-opacity:0.5;  
    opacity: 0.5;  
}  
 
.RadUploadFileSelector  
{  
    /* checkbox */  
}  
 
.RadUploadInputField  
{  
    width: 300px;  
    border: solid 1px #cfcfcf;  
    background: white;  
    border-right: 0px;  
    vertical-align: top;  
    height: 17px;  
    _width: 300px;  
}  
 
input.RealFileInput  
{  
    position: relative;  
    -moz-opacity: 0;  
    filter: alpha(opacity: 0);  
    opacity: 0;  
    z-index: 2;  
    width: 400px;  
}  
 
.RadUploadSelectButton  
{  
    border: 0px;  
    background: transparent url('Img/select.gif') no-repeat;  
    font: normal 11px Arial, Verdana, Sans-serif;  
    color: #666;  
    height: 22px;  
    width: 67px;  
}  
 
.RadUploadRemoveButton  
{  
    border: 0px;  
    background: transparent url(Img/radUploadBtnSmall.gif) no-repeat;  
    font: normal 11px Arial, Verdana, Sans-serif;  
    color: #666;  
    height: 22px;  
    width: 68px;  
    float: right;  
}  
 
.RadUploadClearButton  
{  
    border: 0px;  
    background: transparent url('Img/radUploadBtnSmall.gif') no-repeat;  
    font: bold 11px Arial, Verdana, Sans-serif;  
    color: #666;  
    height: 22px;  
    width: 68px;  
    float: right;  
}  
 
input.NoSkinnedFileUnput  
{  
    border: solid 1x #1f1f1f;  

And here is what I have so far:
 
 
.RadUpload_MTCDefault   
{  
    background: #f7f7f7;  
    border: solid 1px #e5e5e5;  
    border-collapse: collapse !important;  
    filter: progid:DXImageTransform.Microsoft.dropShadow(Color=e5e5e5,offX=2,offY=2,positive=true);  
    margin: 5px 0px;  
    width: 450px;  
    font: normal 8px Arial, Verdana, Sans-serif;  
    color: #333;  
      
}  
.RadUpload_MTCDefault .RadUploadTable td  
{  
    padding: 4px;  
}  
.RadUpload_MTCDefault .ruButtonArea  
{  
    background: transparent;  
}  
 
.RadUpload_MTCDefault .ruButton,  
.RadUpload_MTCDefault .ruButtonMedium  
{  
    background: white url('Upload/radUploadBtnMedium.gif') no-repeat;  
    border: 0px;  
    height: 22px;  
    width: 115px;  
    font: normal 11px Arial, Verdana, Sans-serif;  
    color: #666;  
}  
 
.RadUpload_MTCDefault .ruDisabled  
{  
    background: white url('Upload/radUploadBtnMedium.gif') no-repeat;  
    border: 0px;  
    height: 22px;  
    width: 115px;  
    font: normal 11px Arial, Verdana, Sans-serif;  
    color: #666;  
    filter:alpha(opacity=30);  
    -moz-opacity:0.5;  
    opacity: 0.5;  
}  
 
.RadUpload_MTCDefault .ruFileSelector  
{  
    /* checkbox */  
}  
 
.RadUpload_MTCDefault .ruInputField  
{  
    width: 300px;  
    border: solid 1px #cfcfcf;  
    background: white;  
    border-right: 0px;  
    vertical-align: top;  
    height: 17px;  
    _width: 300px;  
}  
 
.RadUpload_MTCDefault ruInput.RealFileInput  
{  
    position: relative;  
    -moz-opacity: 0;  
    filter: alpha(opacity: 0);  
    opacity: 0;  
    z-index: 2;  
    width: 400px;  
}  
 
.RadUpload_MTCDefault .ruBrowse  
{  
    border: 0px;  
    background: transparent url('Upload/select.gif') no-repeat;  
    font: normal 11px Arial, Verdana, Sans-serif;  
    color: #666;  
    height: 22px;  
    width: 67px;  
}  
 
.RadUpload_MTCDefault .ruRemove  
{  
    border: 0px;  
    background: transparent url(Upload/radUploadBtnSmall.gif) no-repeat;  
    font: normal 11px Arial, Verdana, Sans-serif;  
    color: #666;  
    height: 22px;  
    width: 68px;  
    float: right;  
}  
 
.RadUpload_MTCDefault .ruClear  
{  
    border: 0px;  
    background: transparent url('Upload/radUploadBtnSmall.gif') no-repeat;  
    font: bold 11px Arial, Verdana, Sans-serif;  
    color: #666;  
    height: 22px;  
    width: 68px;  
    float: right;  
}  
 
.RadUpload_MTCDefault ruInput.NoSkinnedFileUnput  
{  
    border: solid 1x #1f1f1f;  

The two items that are not working for me are:
.RadUpload_MTCDefault .RadUploadTable td  
{  
    padding: 4px;  
}  

and

.RadUpload_MTCDefault .ruClear  
{  
    border: 0px;  
    background: transparent url('Upload/radUploadBtnSmall.gif') no-repeat;  
    font: bold 11px Arial, Verdana, Sans-serif;  
    color: #666;  
    height: 22px;  
    width: 68px;  
    float: right;  
}  

How do you customize the look and feel of the Clear button in the new format? Can you specify padding between the cells of the table in a radupload?

Haven't had any luck with either issue. Any help would be appreciated.

Thanks,
Patrick
Kamen Bundev
Telerik team
 answered on 16 Jul 2009
1 answer
134 views
Grid filtering after button clicked
Hi,
1. I am using RadGrid, Bind data from database.
2. I want to filter my grid data, based on dates (from and to).
3. I have two text box From date, Todate field and one Go button
4. Select the dates  and hit the go button, I want the Grid to show the data between the selected two dates.
5. Any idea let me know.

Thanks
Sabarish
Princy
Top achievements
Rank 2
 answered on 16 Jul 2009
1 answer
112 views
I am writing a custom FileBrowserContentProvider that will be used to talk to our Picasa services, but I want to also use the built in FileSystemContentProvider.  So basically, how can I configure two different types of Image managers?  If one has to be a default, and another as has to use its own button, that is fine, I just need to be able to allow users to access our Picasa feed while working in the RadEditor, but still maintain the default file system provider.


Thank you,


Rumen
Telerik team
 answered on 16 Jul 2009
1 answer
113 views
Hi,

I am using 2009 Q2. I have my custom FileBrowserContentProvider.

When I right-click on a file, and choose "Delete", the RadFileExplorer call the DeleteDirectory method.
Should it call DeleteFile instead ?

Thanks.
Lini
Telerik team
 answered on 16 Jul 2009
1 answer
282 views
I need to display a grid column as hex. DataFormatString="{0:X}" not only doesn't display as hex, it triggers this execution error:

Microsoft JScript runtime error: Sys.FormatException: Format specifier was invalid.

I tried DataFormatString="{0:X2}" just for kicks. That doesn't work either.  DataFormatString="{0:D0}" works fine, but I need to display in hex.

Thank you,

Mark

Here is the complete grid definition:

<telerik:RadGrid ID="RadGridAlarms" runat="server" Skin="Telerik" ToolTip="Alarm Messages" Height="100%" AllowPaging="true" OnItemCreated="RadGridPaging_ItemCreated"
                        <PagerStyle AlwaysVisible="true" Mode="NextPrev" Position="Top" PagerTextFormat = "<span class='PagerTitle'>Alarms</span>{4}<strong>{0}</strong> of <strong>{1}</strong>, alarms <strong>{2}</strong> to <strong>{3}</strong> of <strong>{5}</strong><span style='padding-right: 50px'>.</span>"/> 
                        <ClientSettings> 
                            <Selecting AllowRowSelect="true" /> 
                            <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" /> 
                            <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
                            <ClientEvents OnRowContextMenu="OnAlarmsRowContextMenu" OnDataBound="RadGridAlarms_DataBound" OnDataBinding="RadGridAlarms_DataBinding" OnDataSourceResolved="RadGridAlarms_DataSourceResolved" /> 
                            <DataBinding Location="WebService.asmx" SelectMethod="GetAlarms" /> 
                        </ClientSettings> 
                        <mastertableview autogeneratecolumns="False" commanditemdisplay="None" dir="LTR" frame="Border" tablelayout="Auto">  
                            <Columns> 
                                <telerik:GridImageColumn HeaderStyle-Width="30" DataImageUrlFields="alarmType" DataImageUrlFormatString="Images/Alarms/{0}.PNG" ItemStyle-CssClass="ImageTD"  /> 
                                <telerik:GridBoundColumn HeaderText="Message" DataField="message" /> 
                                <telerik:GridBoundColumn HeaderStyle-Width="80" HeaderText="Date" DataField="msgDateTime" DataFormatString="{0:M/dd/yyyy}" /> 
                                <telerik:GridBoundColumn HeaderStyle-Width="80" HeaderText="Time" DataField="msgDateTime" DataFormatString="{0:hh:mm tt}" /> 
                                <telerik:GridBoundColumn HeaderText="Dev Name" DataField="devNameComputer" /> 
                                <telerik:GridBoundColumn HeaderStyle-Width="50" HeaderText="Dev #" DataField="rawDevNumber" DataFormatString="{0:X}" /> 
                                <telerik:GridBoundColumn HeaderStyle-Width="80" HeaderText="Dev Date" DataField="devDateTime" DataFormatString="{0:M/dd/yyyy}" /> 
                                <telerik:GridBoundColumn HeaderStyle-Width="80" HeaderText="Dev Time" DataField="devDateTime" DataFormatString="{0:hh:mm tt}" /> 
                                <telerik:GridBoundColumn HeaderText="Dev Type" DataField="devType" /> 
                                <telerik:GridBoundColumn HeaderStyle-Width="50" HeaderText="Port #" DataField="portNumber" DataFormatString="{0:X2}"/> 
                            </Columns> 
                        </mastertableview> 
                    </telerik:RadGrid> 


Iana Tsolova
Telerik team
 answered on 16 Jul 2009
2 answers
348 views
Hello!

I´m using 2009.2.701.35 and are having trouble exporting to ExcelML when I have filtered the columns. There is no problems exporting on the default excel version or to Csv etc when colums are filtered.

The ExcelML export are working when the grid is NOT filtered.

There is also one strange bahavior that applies to all exports when using. It´s Paging. After exporting when using filter on colums and when I then select NO FILTER. The grid reloads the grid without paging and fill the grid with all rows from the database.

To reproduce this. Just take
1. New .ASPX page
2. Put an ScriptManager on the page
3. Put an RadAjaxManager on the page
4. Put an LinqDataSource on the page
5. Put an RadGrid on the page, activate AllowFilteringByColumn  Enable Paging and PageSize
6. Put a button on the .ASPX page
7. On the button event add this

RadGrid1.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML;  
RadGrid1.ExportSettings.ExportOnlyData = true;  
RadGrid1.ExportSettings.IgnorePaging = true;  
RadGrid1.MasterTableView.ExportToExcel(); 

8. Load the page and filter a column
9. Export you data


Daniel
Telerik team
 answered on 16 Jul 2009
3 answers
98 views
Hi all,

How to view day view from month view when i click the particular day cell not (the date header) the full cell.
Please any one help me with sample code.

Thanks,
Saravanan.S
Veselin Vasilev
Telerik team
 answered on 16 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?