Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
127 views
Is there an easy way, other than querying the data in the itemdatabound, to have DBNULL converted to zero?

What I'm looking for is a boolean "ConvertDbNullToZero" property on the GridBoundColumn.
Yavor
Telerik team
 answered on 01 Sep 2008
1 answer
719 views
I am trying to use the following code to show a particular loading image on an AJAX request:

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
    Width="75px">  
<img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.Loading1.gif") %>' 
    style="border: 0px;" /> 
<span class="filter">Refreshing Data...</span> 
</telerik:RadAjaxLoadingPanel> 

It works but does not show the iamges and throws an exception:
This is an invalid webresource request.

I cannot find anywhere in the documentation that tells us what are the loading images stored in as the web-resource:

Here is what I was expecting: (red ones not found?)

Telerik.Web.UI.Skins.Default.Ajax.Loading.gif
Telerik.Web.UI.Skins.Default.Ajax.Loading1.gif
Telerik.Web.UI.Skins.Default.Ajax.Loading2.gif
Telerik.Web.UI.Skins.Default.Ajax.Loading3.gif
Telerik.Web.UI.Skins.Default.Ajax.Loading4.gif
Telerik.Web.UI.Skins.Default.Ajax.Loading5.gif
Telerik.Web.UI.Skins.Default.Ajax.Loading6.gif
Telerik.Web.UI.Skins.Default.Ajax.Loading7.gif

Telerik.Web.UI.Skins.Default.Ajax.LoadingProgressBar.gif
Telerik.Web.UI.Skins.Default.Ajax.LoadingVerticalBar.gif

Any help?

Vlad
Telerik team
 answered on 01 Sep 2008
4 answers
226 views
I have a table containing two fields (amongst others), being TableName and TableID. In my managing RadGrid I wish to be able to edit the TableID field using a dropdown box populated with items from the appropriate TableName.

So far I have thought of two solutions both of which I can't seem to implement using RadGrid.

1. Have a GridDropdownColumn and specify the DataSourceID, DataTextField & DataValueField server-side in an event
2. Have a GridTemplateColumn with an EditItemTemplate containing a dropdown getting the Stored Procedure do all the work and return the dropdown items with standard ID & Name fields.

I was able to get Option 2 working for the EditItemTemplate, however I've now got the issue of displaying the correct value in the ItemTemplate.

  Protected Sub grdRecordMatchup_EditCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles grdRecordMatchup.EditCommand 
    sqlRecordMatchupTableList.SelectParameters("ID").DefaultValue = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("LU_RecordMatchupID").ToString() 
  End Sub 

Does anyone have any thoughts how I might get Option 1 to work, or how I could modify Option 2 to get the ItemTemplate working as well?
Sebastian
Telerik team
 answered on 01 Sep 2008
1 answer
129 views
I am using the RadGrid with a LinqDatasource, which is working great. I made the columns sortable and I have a couple of fields above the grid I use to filter the grid. The filtering works great also, but when I click on a column header, the filtering is not kept. Do I need to recreate the filter on each click of a column header?

I am creating the filter in the codebehind like this:
Parameter Projectparam = new Parameter(); 
Projectparam.Name = "ProjectID"
Projectparam.DefaultValue = this.UserInfo.Profile.GetPropertyValue("ProjectID").ToString(); 
Projectparam.Type = TypeCode.Int32; 
TicketListDataSource.WhereParameters.Add(Projectparam); 
 
TicketListDataSource.Where = "ProjectID == @ProjectID" 

Should this filtering logic be run each time a column header is clicked? Using the "OnSortCommand"?
Thanks!
Harold

Vlad
Telerik team
 answered on 01 Sep 2008
1 answer
80 views
I have created a page with an ajax panel on it, when i click one of the radmenubar items it does the callback through the ajax manager event handler like it should do (great - love the ajax panel it is so simple to use).

However I have come a cropper with what i am trying to achieve at the moment and I am hoping that there is an answer but i'm not sure that there is.

I have created a table (runat=server) with one row and one cell.
I click the radpanelbar item and inside the ajax event handler server side i dynamically create table cells for the sake of arguments lets say 12 new cells and i populate them with images and data.

Great this works a treat. the table displays all 12 cells. however in this case i want to drill down with clicks from the cells - no problems here i attach a client side event for cell click that calls the ajaxrequest method passing my arguments to it. This also works fine and i draw additional data below the table to represent the cell I have just clicked.

My problem lies in the fact the table no longer shows all 12 cells even though i have not asked it redraw in the server event. it will only show me the first cell. I can see the reason for this being that when the page first loads it only has one cell created; the other cells i created dynamically in the 1st ajax server event.

My question is can the current ViewState of the table be maintained after the 2nd ajax panel callback as it always reverts to showing just one cell?

I have tested this by creating 50 cells in the ascx page itself and when the 2nd ajax panel callback routine fires it will remember the state of the 12 cells i have created, I cannot do this in a live environment because i might want more than 50 cells in which case when the 2nd ajax server event fires it will truncate my cell count to only 50?

Has anyone any ideas on this?

Thanks in advance for any feedback
Vlad
Telerik team
 answered on 01 Sep 2008
1 answer
112 views
Is it possible to Select a row of a RadGrid with a click (server-side) ?

Thank you in advance,


Vlad
Telerik team
 answered on 01 Sep 2008
3 answers
62 views
Are there any reports with the newest RadMenu that the right screen boundary checks are buggy with IE7?

We have a RadMenu that has 12 root items, and the last one has a few submenus, but is close to the right margin, and when expanding the submenus, some popup to the left and some to the right that we can't see, and creates horizontal scrollbar.

Our menu is created by a custom component, so can't really include sample here unless I create a mockup.

Yana
Telerik team
 answered on 01 Sep 2008
1 answer
116 views

Telerik.Web.UI.dll v2008.1.619.20

Hi Telerik, trying to upgrade my custom (inherited) ComboBox to the version above from RadComboBox.Net2.dll v2.8.1.0

Inheriting from Combox, ComboBoxItem and creating a custom ItemTemplate (note that ComboBoxItem in this example is not really necessary but my production version has additional attributes added here)

Basically, when I 'databind my control it renders fine, but when I add elements to my cmbo via the <items/> collection in my ASPX page the controls fails to render.  I added calls to .DataBind() on the control and the individual items but this doesn't seem to help any ...debugger shows that the ComboBoxTemplate is never instantiated/created for the controls with items declared in the markup.

All was/is fine under the old version?

Thanks for any and all advice

ComboBox.cs

using System; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using Telerik.Web.UI; 
 
namespace TelerikTestSite 
    public class ComboBox : RadComboBox 
    { 
        protected override void OnInit ( EventArgs e ) 
        { 
            // set template 
            base.ItemTemplate = new ComboBoxTemplate ( ); 
 
            // continue event 
            base.OnInit ( e ); 
        } 
    } 

ComboBoxItem.cs

namespace TelerikTestSite 
    public class ComboBoxItem : RadComboBoxItem 
    { 
        public ComboBoxItem ( ) : base ( ) 
        { 
 
        } 
    } 

ComboBoxTemplate.cs

using System; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using Telerik.Web.UI; 
 
namespace TelerikTestSite 
    public class ComboBoxTemplate : ITemplate 
    { 
        public void InstantiateIn ( Control container ) 
        { 
            CheckBox cb = new CheckBox ( ); 
            cb.ID = "cb"
            cb.DataBinding += new EventHandler ( cb_DataBinding ); 
            container.Controls.Add ( cb ); 
        } 
 
        void cb_DataBinding ( object sender, EventArgs e ) 
        { 
            CheckBox target = (CheckBox) sender; 
            RadComboBoxItem item = (RadComboBoxItem) target.BindingContainer; 
            target.Text = (string) DataBinder.Eval ( item, "Text" ); 
        } 
    } 

Default.aspx

<div> 
            DataBind ..works: <app:combobox runat="server" id="cb1" /> 
        </div> 
        <br /> 
        <div>Declarative ..fails: 
            <app:combobox runat="server" id="cb2" highlighttemplateditems="true"
                <items> 
                    <app:comboboxitem text="Item 1" /> 
                    <app:comboboxitem text="Item 2" /> 
                    <app:comboboxitem text="Item 3" /> 
                </items> 
            </app:combobox> 
        </div> 

Default.aspx.cs

 protected void Page_Load(object sender, EventArgs e) 
    { 
        ArrayList al = new ArrayList ( 3 ); 
        al.Add ( "Item 1" ); 
        al.Add ( "Item 2" ); 
        al.Add ( "Item 3" ); 
 
        this.cb1.DataSource = al; 
        this.cb1.DataBind ( ); 
 
        foreach ( ComboBoxItem item in cb2.Items ) 
            item.DataBind ( ); 
 
        this.cb2.DataBind ( ); 
    } 




Veselin Vasilev
Telerik team
 answered on 01 Sep 2008
2 answers
140 views

Hi,

I have a grid with a column as,

<rad:GridBoundColumn DataField="ProcessDescription" EditFormColumnIndex="1" HeaderText="Description" UniqueName="Description">
                    <HeaderStyle Font-Bold="true" />
                </rad:GridBoundColumn>

Now when i tried to make certain columns as disabled in edit mode in the ItemDatabound event, its working fine but when i move the cursor on top of that disabled field, i get a javascript error which says
My aim is to just display it in a label with the text in grid.

I tried disabling as below,

if (e.Item is GridEditableItem && ((GridEditableItem)e.Item).IsInEditMode)
            {
                GridEditableItem editItem = (GridEditableItem)e.Item;

                TextBox txtDesc = (TextBox)editItem["Description"].Controls[0];
                txtDesc.Enabled = false;
            }

Similar to this i have a date column as
 <rad:GridDateTimeColumn DataField="EndDate" EditFormColumnIndex="0" DataFormatString="{0:d}" meta:resourcekey="GridTemplateColumnResource2">
                    <HeaderStyle Font-Bold="true" />
                </rad:GridDateTimeColumn>    

When i edit mode, i need to display only the date in a label and not in a date control. I want to make it not to be visible when in insert mode.

"Sys.ArgumentException: Value must be a DOm element. Parameter name:element".

How to solve this or Is there a better method to make certain columns in a grid as disabled when in editmode.

In Insert mode ( i mean when i click ' Add new record' link at the top of the grid), i want to make this column as not visible. How will i be able to achieve this?

Regards

Sujith

Princy
Top achievements
Rank 2
 answered on 01 Sep 2008
1 answer
131 views
Hi,

I want to have a multiline tooltip for every node in the tree so how can I do so?

For example:
Node Text is Weather for XYZ city

so on hover of the node I want to display the following text in multiline:
Min Temp: 20 C
Max Temp: 30 C

Thanks and Regards,
Jaimin
Veselin Vasilev
Telerik team
 answered on 01 Sep 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?