Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
86 views
Hi,

I use same sample as found in demo webside and have some troubles.
If i select the header checkbox items are correctly selected. If deselect this checkbox no action is performed in selected items.
I can't use the suggested ItemCreatedEvent lauching the ItemPreRender because in this case when select, only my last item is selected no others and deselecting from header checkbox is not working.

grid :OnNeedDataSource="PlanGrid_NeedDataSource"  OnItemCreated="PlanGrid_ItemCreated"OnUpdateCommand="PlanGrid_UpdateCommand"
Template
 <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn"
                                                    <HeaderTemplate> 
                                                     <asp:CheckBox id="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox> 
                                                    </HeaderTemplate> 
                                                    <ItemTemplate> 
                                                        <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox> 
                                                    </ItemTemplate> 
                                            </telerik:GridTemplateColumn> 
protected void PlanGrid_ItemPreRender(object sender, EventArgs e) 
    { 
        ((sender as GridDataItem)["CheckBoxTemplateColumn"].FindControl("CheckBox1") as CheckBox).Checked = (sender as GridDataItem).Selected; 
   
    } 
    protected void ToggleRowSelection(object sender, EventArgs e) 
    { 
        ((sender as CheckBox).Parent.Parent as GridItem).Selected = (sender as CheckBox).Checked; 
    } 
    protected void ToggleSelectedState(object sender, EventArgs e) 
    { 
        if ((sender as CheckBox).Checked == true) 
        { 
            foreach (GridDataItem dataItem in PlanGrid.MasterTableView.Items) 
            { 
                (dataItem.FindControl("CheckBox1") as CheckBox).Checked = true
                dataItem.Selected = true;                 
            } 
        } 
        else 
        { 
            foreach (GridDataItem dataItem in PlanGrid.MasterTableView.Items) 
            { 
                (dataItem.FindControl("CheckBox1") as CheckBox).Checked = false
                dataItem.Selected = false;    
            } 
        } 
    } 
protected void PlanGrid_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e) 
    { 
        // this will make the textbox for customer with Week ALLS not editable 
        if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
        { 
            if (e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["PriceUs"] != null) 
            { 
                (e.Item as GridEditableItem)["PriceUs"].Enabled = false
            } 
            if (e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Week"] != null) 
            { 
                (e.Item as GridEditableItem)["Week"].Enabled = false
            } 
        } 
        //if (e.Item is GridDataItem) 
        //{ 
        //    e.Item.PreRender += new EventHandler(PlanGrid_ItemPreRender); 
        //} 
        //}  
    }  

u advice.
regards.

 
Veli
Telerik team
 answered on 16 Feb 2010
9 answers
131 views
hi,

i have a grid and want to choose the filter in the column with a Combobox in a Filter Template. But i dont know how i set the items in that combobox at pageload in the codebehind..

I want to make a visible image and maybe invisible text for the value. The image urls are in my database which i access with my datalayer. (all code behind)

Any ideas?

thx mario
Simon
Telerik team
 answered on 16 Feb 2010
1 answer
213 views
Hello,

I am using a RadGrid and have written some Javascript attached to the grid's OnCommand Client Event.  I am not sure how to get the active row of the grid from within the OnCommand client event.

Does anybody have any suggestions?

Thanks,
Dave
Schlurk
Top achievements
Rank 2
 answered on 16 Feb 2010
1 answer
122 views
Hi guys,

Is there a way to create PDFs on the fly using Telerik's APIs - not necessarily from a grid but by building the layout in code?

Rather than purchase a separate PDF component, I thought I'd check if there's a way to get at the functionality within the RadGrid.

Any tips, source code, or pointers are welcome.

Thanks,

Ken
Daniel
Telerik team
 answered on 16 Feb 2010
1 answer
121 views
Hello,
I would just notify a bug. It occurs in this situation: you use customvalidator in a radcombobox that has AllowCustomText="true". The client function associated to customvalidator is fired only when the radcombobox losts the focus, not when you click on submit button. If you set AllowCustomText="false" all works as espected (so the function is fired when radcombobox losts focus AND when you submit the page).

Bye
FL
Simon
Telerik team
 answered on 16 Feb 2010
3 answers
219 views
Hi,

I need to change expression based on server side value for a declarative grid. How to cast the GridCalculatedColumn OnItemDataBound to modify the expression values ?. Need to be edited?
 
Thanks.

Radoslav
Telerik team
 answered on 16 Feb 2010
5 answers
179 views
Can the submenu colors be set to different colors based on the parent menu item selected. In the example below we would like to be able to have a blue background color for the submenu of the 1st menu item, a red background for the submenu of the 2nd item, etc... We are using a slightly modified version of the default 2006 skin. It would be nice if there was a groupsettings-cssclass property.


 <telerik:radmenu id="RadMenu1" runat="server" flow="Vertical" skin="AdisseoBiz" 
                            onclientitempopulating="itemPopulating" borderwidth="0px" borderstyle="None" 
                            backcolor="#A5001E" width="200px" enableembeddedskins="false">  
                        <WebServiceSettings Path="getProducts.asmx" Method="GetMenuCategories" /> 
                        <DefaultGroupSettings Flow="Vertical" ExpandDirection="Right" /> 
                        <Items> 
                            <telerik:RadMenuItem ImageUrl="~/images/v3_main_04.gif" /> 
                            <telerik:RadMenuItem ImageUrl="~/images/v3_btn_Microvit.gif" HoveredImageUrl="~/images/v3_btn_MicrovitOver.gif"   
                                Value="1" ExpandMode="WebService" runat="server" ToolTip="Microvit">  
                                    <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem ImageUrl="~/images/v3_btn_Rhodimet.gif" HoveredImageUrl="~/images/v3_btn_RhodimetOver.gif"   
                                Value="2" ExpandMode="WebService" runat="server" ToolTip="Rhodimet" > 
                                    <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem ImageUrl="~/images/v3_btn_Rovabio.gif" HoveredImageUrl="~/images/v3_btn_RovabioOver.gif"   
                                Value="3" ExpandMode="WebService" runat="server" ToolTip="Rovabio">  
                                    <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
                            </telerik:RadMenuItem> 
                            <telerik:RadMenuItem ImageUrl="~/images/v3_btn_Smart.gif" HoveredImageUrl="~/images/v3_btn_SmartOver.gif"   
                                Value="4" ExpandMode="WebService" runat="server" ToolTip="Smartamine">  
                                    <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
                            </telerik:RadMenuItem> 
                        </Items> 
                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                        <ExpandAnimation Type="OutQuart" /> 
                    </telerik:radmenu> 
Peter
Telerik team
 answered on 16 Feb 2010
1 answer
95 views
Having an issue using ie8 with custom skin. On a prior post, I was asked to insert this code into head of document

 

<!--[if gte IE 8]>

 

<style type="text/css">

.RadComboBox { display: inline-block !important; }

div.rcbSlide { padding: 0 2px 2px 0; }

div.rcbSlide div { margin: 2px 0 0 2px; }

div.rcbSlide div div { margin: auto; }

</style>

<![endif]-->

 


combo box still doesn't render correctly. Build 2008 02

I need to use this build because of some othere issues.

Thanks
Thomas

PS here is the control code that is on the page.

<

 

telerik:RadComboBox CssClass="RadComboBox" Skin="Purple" EnableEmbeddedSkins="false"

 

 

ID="RadComboBox1" runat="server">

 

 

<Items>

 

 

<telerik:RadComboBoxItem Text="Test" />

 

 

</Items>

 

</

 

telerik:RadComboBox>

 


Kamen Bundev
Telerik team
 answered on 16 Feb 2010
4 answers
206 views
Hi,

   We are trying to implement a drag and drop functionality in our web application. I am just curious is there a way to drag the folders\files in the desktop of a windows PC to our web application. If this is not directly possible, Is there a way we can assign a folder
path to tree view\grid in side our web path. so that we can simulate this with in our web app.

Thanks & Regards,
Karthik.
Vesko
Top achievements
Rank 2
 answered on 16 Feb 2010
0 answers
60 views
Disregrad please


Nick Keefe
Top achievements
Rank 1
 asked on 16 Feb 2010
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?