Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
265 views
I have a treeview, with checkboxes=true, tristatecheckboxes=true, and want to use checkchildnodes=true, but, I want to not have certain child nodes, with a certain attribute value, to be auto-checked, these nodes are always at the bottom/lowest level of the tree.

if I try to spin my own checking logic, with checkchildnodes=false, the tristate checking stuff does not work right, I check a higher level node, and it goes full check, it seems there is no method of setting the check state to indeterminate, so I can only check, or uncheck the higher level nodes, so, it seems I can't conditionally set them to indeterminate if I find some nodes as children I don't want to check.

and, unchecking nodes is proving problematic as well, higher level nodes don't uncheck as expected when checkchildnodes=false, and child nodes are unchecked, they don't uncheck (higher level nodes with no child nodes checked).

any hints on some approach to simulate the auto checking logic, setting check state to other than checked/unchecked, or?
Yana
Telerik team
 answered on 11 Feb 2010
2 answers
138 views
hi all,
  I want to filter grid accoridng to the textbox value. I initiate ajax request in 'keyup' client event of textbox and write filter code in the ajax request event. But when i added ajax settings for reax requestmanager i shoing dome null refernce script error. Can anyone give me what i did wrongly?

Check the attached file for error screenshot

Design Code :
<body> 
    <form id="form1" runat="server" dir="ltr">  
            <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
                <script type="text/javascript">  
                    var timer = null;  
 
                    function KeyUp() {  
                        if (timer != null) {  
                            clearTimeout(timer);  
                        }  
                        timer = setTimeout(LoadTable, 100);  
                    }  
 
                    function LoadTable() {  
                        $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("SearchGrid");  
                    }  
                </script> 
            </telerik:RadCodeBlock> 
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">  
        </telerik:RadScriptManager> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server" IsSticky="true"    
            Skin="Default">  
        </telerik:RadAjaxLoadingPanel> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"   
            UpdatePanelsRenderMode="Inline" DefaultLoadingPanelID="RadAjaxLoadingPanel1"   
            onajaxrequest="RadAjaxManager1_AjaxRequest">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="rad_grd_Resource" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
              
                <telerik:AjaxSetting AjaxControlID="rad_ts_Main">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="rad_ts_Main" /> 
                        <telerik:AjaxUpdatedControl ControlID="rad_mp_Main" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
               <telerik:AjaxSetting AjaxControlID="btn_GetFiles">  
                    <UpdatedControls> 
                         <telerik:AjaxUpdatedControl ControlID="RadAjaxManager1" /> 
                        <telerik:AjaxUpdatedControl ControlID="rad_cmb_FileName" /> 
                        <telerik:AjaxUpdatedControl ControlID="rad_cmb_Language" /> 
                        <telerik:AjaxUpdatedControl ControlID="btn_LoadResource" /> 
                        <telerik:AjaxUpdatedControl ControlID="rad_grd_Resource" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="rad_cmb_FileName">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="rad_cmb_Language" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="btn_LoadResource">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="rad_grd_Resource" /> 
                        <telerik:AjaxUpdatedControl ControlID="rad_cmb_Filter" /> 
                        <telerik:AjaxUpdatedControl ControlID="btn_AddKeys" /> 
                        <telerik:AjaxUpdatedControl ControlID="btn_Save" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                 <telerik:AjaxSetting AjaxControlID="rad_cmb_Filter">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="rad_grd_Resource" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting>                 
                <telerik:AjaxSetting AjaxControlID="btn_AddKeys">  
                    <UpdatedControls> 
                       <telerik:AjaxUpdatedControl ControlID="rad_mp_Main" /> 
                        <telerik:AjaxUpdatedControl ControlID="rad_grd_NewKeys" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="btn_Save">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="rad_grd_Resource"   
                            LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
       
     <telerik:RadTabStrip ID="rad_ts_Main" runat="server" MultiPageID="rad_mp_Main"   
            ontabclick="rad_ts_Main_TabClick"  > 
        <Tabs> 
            <telerik:RadTab runat="server" PageViewID="pv_Editor" Text="Resource Editor"   
                Selected="True"></telerik:RadTab> 
            <telerik:RadTab runat="server" PageViewID="pv_NewKey" Text="New Keys"></telerik:RadTab> 
        </Tabs> 
    </telerik:RadTabStrip> 
     <telerik:RadMultiPage ID="rad_mp_Main" runat="server" SelectedIndex="0">  
        <telerik:RadPageView ID="pv_Editor" runat="server">  
            <table width="98%"  > 
            <tr> 
                <td colspan="3" width="90%">  
                    <asp:TextBox ID="txt_Directory" runat= "server" Width="500px" ></asp:TextBox>   
                    <asp:Button ID="btn_GetFiles" runat="server" Text="Get Resources" OnClick="btn_GetFiles_onClick" /> 
                </td> 
                <td width="10%" align="right">  
                    <telerik:RadTextBox ID="rad_txt_Search" runat="server" SelectionOnFocus="CaretToEnd" EmptyMessage="Search" onkeyup="KeyUp();"></telerik:RadTextBox> 
                </td> 
            </tr> 
            <tr> 
            <td width="40%">  
                Select Resource : <telerik:RadComboBox ID="rad_cmb_FileName" runat="server" AutoPostBack="true" Width="230px"   
                    onselectedindexchanged="rad_cmb_FileName_SelectedIndexChanged">  
                </telerik:RadComboBox>          
            </td> 
            <td width="32%" > 
                Language : <telerik:RadComboBox ID="rad_cmb_Language" runat="server" Width="200px" > 
                </telerik:RadComboBox>          
                  
            </td> 
            <td width="18%" align="right">  
                <asp:Button ID="btn_LoadResource" runat="server" Text="Load Rosource" OnClick="btn_LoadResource_onClick" /><br /> 
            </td> 
            <td width="10%">  
                <telerik:RadComboBox ID="rad_cmb_Filter" runat="server" AutoPostBack="true" Width="130px" onselectedindexchanged="rad_cmb_Filter_SelectedIndexChanged"></telerik:RadComboBox> 
            </td> 
            </tr> 
            <tr> 
                <td colspan="4">  
                    <asp:Label ID="lblError" runat= "server" ForeColor="Red" Font-Size="Small"></asp:Label> 
                </td> 
            </tr> 
            <tr> 
            <td colspan="4">  
                <telerik:RadGrid ID="rad_grd_Resource" runat="server"   
                    AutoGenerateColumns="false" Height="360"   
                    onitemdatabound="rad_grd_Resource_ItemDataBound"   
                    onitemcreated="rad_grd_Resource_ItemCreated"   
                    onprerender="rad_grd_Resource_PreRender" > 
                <ClientSettings > 
                <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
                </ClientSettings> 
                    <MasterTableView > 
                        <Columns> 
                            <telerik:GridTemplateColumn UniqueName="Key" HeaderText="Key" DataType="System.String" > 
                                <ItemTemplate> 
                                    <asp:Label ID="lbl_it_Key" runat="server" Width="75%" Text='<%#Eval("Key") %>'></asp:Label> 
                                </ItemTemplate> 
                           </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn UniqueName="ValueDefault" HeaderText="Value - Default" > 
                                <ItemTemplate> 
                                    <asp:TextBox ID="txt_it_ValueDefault" runat="server" Width="75%" Text='<%#Eval("ValueDefault") %>'></asp:TextBox> 
                                </ItemTemplate> 
                          </telerik:GridTemplateColumn> 
                            <telerik:GridTemplateColumn UniqueName="Value" HeaderText="Value" > 
                                <ItemTemplate> 
                                    <asp:TextBox ID="txt_it_Value" runat="server" Width="75%" Text='<%#Eval("Value") %>'></asp:TextBox> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                            
                        </Columns> 
                        <NoRecordsTemplate> 
                        </NoRecordsTemplate> 
                    </MasterTableView> 
                     
                </telerik:RadGrid> 
            </td> 
            </tr> 
            <tr> 
            <td width="40%">&nbsp;</td> 
            <td width="32%">&nbsp;</td> 
            <td colspan="2" width="28%" align = "right">  
                <asp:Button ID="btn_AddKeys" runat="server" Text="Add New Keys" OnClick="btn_AddKeys_onClick" /> 
                <asp:Button ID="btn_Save" runat="server" Text="Save" OnClick="btn_Save_onClick" /> 
            </td> 
            </tr> 
            </table> 
        </telerik:RadPageView> 
        <telerik:RadPageView ID="pv_NewKey" runat="server">  
            <table width="100%">  
                <tr> 
                <td width="70%">  
                    <asp:Label ID="lblErrorKeys" runat= "server" ForeColor="Red" Font-Size="Small"></asp:Label> 
                </td> 
                <td width="30%">  
                    Page Prefix : <telerik:RadTextBox ID="rad_txt_PagePrefix" runat="server"></telerik:RadTextBox> 
                </td> 
                </tr> 
                <tr> 
                    <td colspan="2">  
                        <telerik:RadGrid ID="rad_grd_NewKeys" runat="server"   
                            AutoGenerateColumns="false" Width="98%" Height="400px"   
                            onitemcommand="rad_grd_NewKeys_ItemCommand"   
                            oneditcommand="rad_grd_NewKeys_EditCommand"   
                            oncancelcommand="rad_grd_NewKeys_CancelCommand"   
                            onupdatecommand="rad_grd_NewKeys_UpdateCommand" > 
                            <MasterTableView ShowFooter="true" EditMode="InPlace" > 
                                <Columns> 
                                    <telerik:GridTemplateColumn UniqueName="NewKey" HeaderText="Key" HeaderStyle-Width="50%" > 
                                        <ItemTemplate> 
                                            <asp:Label ID="lbl_it_Key" runat="server" Width="75%" Text='<%#Eval("Key") %>'></asp:Label> 
                                        </ItemTemplate> 
                                        <FooterTemplate> 
                                            <asp:TextBox ID="txt_ft_Key" runat="server" Width="75%" ></asp:TextBox> 
                                        </FooterTemplate> 
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridTemplateColumn UniqueName="NewValue" HeaderText="Value"  HeaderStyle-Width="35%" > 
                                        <ItemTemplate> 
                                            <asp:Label ID="txt_it_Value" runat="server" Width="75%" Text='<%#Eval("Value") %>'></asp:Label> 
                                        </ItemTemplate> 
                                        <EditItemTemplate> 
                                             <telerik:RadTextBox ID="rad_txt_et_Value" runat="server" Width="200px" ></telerik:RadTextBox> 
                                        </EditItemTemplate>    
                                        <FooterTemplate> 
                                            <asp:TextBox ID="txt_ft_Value" runat="server" Width="75%" ></asp:TextBox> 
                                        </FooterTemplate> 
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridTemplateColumn UniqueName="AddKeyColumn" HeaderText="Edit"  HeaderStyle-Width="15%">  
                                    <ItemTemplate> 
                                        <asp:LinkButton ID="lnkbtn_it_Edit" runat="server" CommandName="Edit" Text="Edit"></asp:LinkButton> 
                                    </ItemTemplate> 
                                    <EditItemTemplate> 
                                        <asp:LinkButton ID="lnkbtn_et_Update" runat="server" CommandName="Update" Text="Update"></asp:LinkButton> 
                                        <asp:LinkButton ID="lnkbtn_et_Cancel" runat="server" CommandName="Cancel" Text="Cancel"></asp:LinkButton> 
                                    </EditItemTemplate> 
                                    <FooterTemplate> 
                                        <asp:Button ID="btn_ft_Insert" runat="server" CommandName="AddKey" Text="Add" /> 
                                    </FooterTemplate> 
                                    </telerik:GridTemplateColumn> 
                                      
                                </Columns> 
                                <NoRecordsTemplate> 
                                </NoRecordsTemplate> 
                            </MasterTableView> 
                             
                        </telerik:RadGrid> 
                    </td> 
                </tr> 
                <tr> 
                    <td width="80%">&nbsp;</td> 
                    <td width="20%">  
                        <asp:Button ID="btn_SaveKeys" runat="server" Text="Save" OnClick="btn_SaveKeys_onClick" /> 
                    </td> 
                </tr> 
            </table> 
        </telerik:RadPageView> 
     </telerik:RadMultiPage> 
       
     </form> 
</body> 
Code Behind:
        protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)  
        {  
            if (e.Argument.IndexOf("SearchGrid") != -1)  
            {  
                rm.BindGrid(rad_grd_Resource, rad_cmb_Language.SelectedValue, rad_txt_Search.Text, lblError);  
            }  
 
        } 
Akhil Raj
Top achievements
Rank 1
 answered on 11 Feb 2010
3 answers
121 views
I assign my single level Grid with an objectdatasource in code behind, in the same event I save the datasource in session, and have a needdatasource event to make sure the binding doesn't get lost by calling "Grid1.datasource =

(

ObjectDataSource)Session["objectdatasource1"]"

 

. At runtime the grouping works fine, when I tried to sort any column, it looks like it does sort (the column header is highlighted and the sort arrorw appears), but the actual records are not sorted.


any idea what's happening there?
Tsvetoslav
Telerik team
 answered on 11 Feb 2010
1 answer
145 views
Hi,

I am using RadGrid column filter option. I am trying to add a new Filter menu. I have aded the same using the

RadMenuItem

 

class and it's shoing up in the Menu options. however when I select this newly added option I get the following javascript error: "Error: Sys.ArgumentException: 'FromTo' is not a valid value for enum Telerik.Web.UI.GridFilterFunction.
Parameter name: value".

can anyone tell me how to add this new filtermenu option to the GridKnownFunction enum or any other work around?

Thanks

Yavor
Telerik team
 answered on 11 Feb 2010
1 answer
264 views
Hi,

this is shanker am develop one application . that is radcomobox filtering in gridview when ever am selected   the combo box item the grid view is filtering and populate . it's fine it,s working, But am update radgridview values in update commande event in edit mode is edit form .So  when eve am click the edit button the radgridview is clear the data .am missing index value how to give editindex=1 just like "gridview editindex =e.neweditindex "  how to solve that am not using linq datasourcecontrol am just like this my sample code is 

it's my databind of grid
 protected void Exam_nameview_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            int? facilty_id = LogonDetails.Instance.sys_lclvar_default_facility_id;
            classExamscheduleView.DataSource = classexamshedulemanager.sch_view_exam_schedule_detail_list(facilty_id, Exam_nameview.SelectedValue.GetInteger());
            classExamscheduleView.DataBind();
       }
 protected void classExamscheduleView_DeleteCommand(object source, GridCommandEventArgs e)
        {
           
        }

        

        protected void classExamscheduleView_UpdateCommand(object source, GridCommandEventArgs e)
        {
         
        }

        protected void classExamscheduleView_ItemDataBound(object sender, GridItemEventArgs e)
        {
          
        }

        protected void classExamscheduleView_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (!Page.IsPostBack && e.Item is GridEditableItem)
            {
                e.Item.Edit = true;
            }
        }

how to solve that please it's argent  please help me

thanks and regards 
shanker.B
Princy
Top achievements
Rank 2
 answered on 11 Feb 2010
1 answer
186 views
I'm graphing integer values by date as a line graph.
Y-axis is numeric type. X-axis is date type.

I want to signify "today's date", so the current date, on the graph so user's can at a moments glance see which values pertain to the past and which to predictions. I want to represent this date as a vertical dotted line on the graph.

How can I accomplish this?

Cheers.
Ves
Telerik team
 answered on 11 Feb 2010
1 answer
73 views
I have a user control that I am converting from ASP.NET to ASP.NET AJAX.  In the old control I could apply a skin and also customize cell borders for specific cells based on cell content using the ItemDataBound event handler.  When I try the same thing in the new version the skin wipes out the customizations made to cell borders.  If I don't specify a skin the changes show correctly.  If I specify a skin the the changes do not show.

Any ideas?

Thanks
Shinu
Top achievements
Rank 2
 answered on 11 Feb 2010
1 answer
104 views
I've implemented a context menu in my RadGrid but I only want it to display when the user clicks on the row portion of the grid. If the row is in edit mode, I still want the standard context menu to show up when the user right clicks on a text box so that they use the standard cut and paste.

I followed the example for the AJAX-enabled context menu but whenever the evt.target.tagName == "INPUT", the event stops dead. I would have thought that the right click event would have bubbled up and thus the standard context menu for the text box would show up.

What am I missing?
 
           function RowContextMenu(sender, eventArgs) 
           { 
               var menu = $find("<%=RadMenu1.ClientID %>"); 
               var evt = eventArgs.get_domEvent(); 
                
               if(evt.target.tagName == "INPUT" || evt.target.tagName == "A") 
               { 
                 return; 
               } 
                

Thanks

Loy.

Yavor
Telerik team
 answered on 11 Feb 2010
1 answer
58 views
Can anybody provide the detailed code for Basic Telerik:RadGrid Operations...
Princy
Top achievements
Rank 2
 answered on 11 Feb 2010
8 answers
210 views
Hi, I'm currently loading some random ads into a region of pages using a repeater and a timer control. In order to ensure good page load times I am loading the timer and the timer then loads in the ads after the page has rendered in the browser. The timer then disables itself.

While this approach works fine, there is a minor bug with scrolling interuption in IE browsers. Ideally I would like to use the telerik rotator control. I can't see anything built in to the control that would help me to replicate the behaviour I need. Are there any plans for this?

Thanks,
Matt
Fiko
Telerik team
 answered on 11 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?