Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
503 views
have a RadTreeview Control embeded in RadCombobox.
Checkboxes and Multiple select property of treeview is set to true.

When i select tree nodes by checking checkboxes corresponding to them everything works fine and i am able to select as many nodes as required.
But when i try to select the nodes by clicking the Node text radcombobx collapse after selection.
Hence i am not been able to select multiple nodes at a time.

I tried using following workaround on OnClientDropDownClosing event of RadCombobox:
<script type="text/javascript"> 
function OnClientDropDownClosing(sender, eventArgs) 
{ 
  if( sender._focused == true) 
  { 
    eventArgs.set_cancel(true); 
  } 
  else 
  { 
    eventArgs.set_cancel(false); 
  } 
} 
</script> 

Everything works fine and multiple selection of nodes is possible. But now a new problem arises:
Dropdown even does not close on click of dropdown arrow button.

Any solutions on how both of these functionality can be achieved:
1. Multi selection of nodes
2. Dropdown closing on click of dropdown arrow button or when user clicks outside dropdown.





Amit
Top achievements
Rank 1
 answered on 10 Sep 2009
5 answers
143 views

I use a radwindowmanager and a radwindow. In the page I have several images, when a user click a image the radwindow is shown, for example with radopen('/Forms/page.aspx?id=1'. When I see the properties of the radwindow and look for the queerystring it is nicely .../Forms/page.aspx?id=1. But when I close the radwindow and click on a different image, for example radopen('/Forms/page.aspx?id=30'), it still uses the old querystring instead of the new one (with the number 30).

I really need an update of the querystring. How can I do this?
Georgi Tunev
Telerik team
 answered on 10 Sep 2009
5 answers
312 views
Can I do anything to be able to export a table within a itemplate to PDF?  The objects above the table exports fine, but not the <table/>


<telerik:GridTemplateColumn UniqueName="Col1">  
    <ItemTemplate> 
        <div style="text-align:center">  
        <asp:Image runat="server" ID="imgTest" Visible="true" /> 
        </div> 
          
        <div style="font-size:small;font-family:Arial;">  
        <h1><font color="olive"><asp:Literal runat="server" ID="ltrlDate" /></font></h1> 
        <asp:Label runat="server" ID="lblTime" /> 
        </div> 
          
        <!--This does not display in PDF-->          
        <table> 
        <tr> 
            <td>Name</td><td>City</td><td>State</td> 
        </tr> 
        <tr> 
            <td>John</td><td>Some City</td><td>CA</td> 
        </tr> 
        </table>          
    </ItemTemplate> 
</telerik:GridTemplateColumn> 
Nikolay Rusev
Telerik team
 answered on 10 Sep 2009
1 answer
142 views
Is there a way to move the handle to the spot where mouse was clicked on the track without changing "ClickOffset" value..

<telerik:RadSlider ID="RadSlider1" runat="server" OnValueChanged="RadSlider1_ValueChanged"  MinimumValue="0" MaximumValue="10" ClickOffset="2" ItemType="Tick"  />


Thanks in Advance..
Tsvetie
Telerik team
 answered on 10 Sep 2009
6 answers
220 views
Hi,
 
I'm using the Lite RadEditor for Moss. Is it possible to raise the max size for picture uploads right from the Manager from 200 KB to 10 MB? And is it possible to Link the ContentTyp-List for our documentlibrary to the upload-function?

Thanks for your response

Best regards

Falk von Rönn
Stanimir
Telerik team
 answered on 10 Sep 2009
1 answer
187 views

I have a grid that when I go into edit mode I loose my Links except for refrest.

Here is part of my code.

 

 <table>
        <asp:Repeater ID="Repeater1" runat="server">
       
            <ItemTemplate>
                    <tr class="comment">
                        <td align="left" colspan="2">
                            &lt;
                            <asp:Label ID="lblCreatedBy" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "User.UserName") %>' />
                            &nbsp;
                            <asp:Label ID="lblCreatedDate" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "CreatedDateTime") %>' />
                            &gt;
                        </td>
                        <td align="left">
                            <asp:Label ID="lblComment" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "ApplicantNote") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td colspan="2">
                            <table>
                                <asp:Repeater ID="Repeater2" runat="server" DataSource='<%# DataBinder.Eval(Container.DataItem, "Notes") %>'>
                                    <ItemTemplate>
                                        <tr class="comment">
                                            <td align="left">
                                                <
                                                <asp:Label ID="lblCreatedBy2" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "User.UserName") %>' />
                                                &nbsp;
                                                <asp:Label ID="lblCreatedDate2" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "CreatedDateTime") %>' />
                                                >
                                            </td>
                                            <td align="left">
                                                <asp:Label ID="lblComment2" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, ApplicantNote") %>' />
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                        </td>
                    </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>

    <table style="margin-left:auto; margin-right:auto; border-style: solid; border-color: Navy; border-width: 2px;" width="760px">
        <tr>
            <td style="margin-left:auto; margin-right:auto">
                <asp:Label ID="noteTitleLabel"
                               runat="server"
                               Text="Note for "
                               Font-Bold="true" />
                <asp:Label ID="noteApplicant"
                               runat="server"
                               Font-Bold="true" />
            </td>
        </tr>
        <tr>
            <td>
                <telerik:RadGrid ID="gridComments"
                                runat="server"
                                Skin="Vista" Width="750px"
                                OnDetailTableDataBind="gridComments_DetailDataBind" OnNeedDataSource="gridComments_NeedDataSource"
                                OnInsertCommand="gridComments_InsertCommand"
                    ondeletecommand="gridComments_Delete" onupdatecommand="gridComment_Update"
                    onitemdatabound="gridComment_ItemDataBound" >
                    <MasterTableView AutoGenerateColumns="false"
                                    DataKeyNames="NoteID, ParentID"
                                    CommandItemDisplay="Top" EditMode="PopUp">
                        <DetailTables>
                            <telerik:GridTableView AutoGenerateColumns="false"
                                                    CommandItemDisplay="Top" DataKeyNames="NoteID, ParentID"  Width="710px">
                                <NoRecordsTemplate>
                                    <p>No replies to this comment</p>
                                </NoRecordsTemplate>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="ParentID" Visible="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="User.UserName" UniqueName="User.UserNameChild" HeaderText="User">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="CreatedDateTime" HeaderText="Date" UniqueName="CreatedDateTimeChild">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="ApplicantNote" HeaderText="Note" UniqueName="ApplicantNoteChild">
                                    </telerik:GridBoundColumn>
                                </Columns>
                                <CommandItemTemplate>                                                         
                            <div style="padding:3px 0px;text-align:right;">
                               
                                    <asp:LinkButton ID="lnkEdit" runat="server" CommandName="EditSelected"
                                     CausesValidation="false" Visible='<%# (!gridComments.MasterTableView.IsItemInserted)&&(gridComments.EditIndexes.Count==0) %>'>
                                     <img style="border:0px;vertical-align:middle;"
                                     alt="" src="CssClass/Images/Edit.gif" />
                                     Edit / View
                             </asp:LinkButton>
                             &nbsp;
                                <asp:LinkButton Style="vertical-align: bottom" ID="lnkAdd" runat="server" CommandName="InitInsert"
                                        Visible='<%# !gridComments.MasterTableView.IsItemInserted && gridComments.EditIndexes.Count == 0 %>'>
                                    <img style="border:0px;"
                                        alt="" src="CssClass/Images/AddRecord.gif" />
                                    Leave Reply
                                </asp:LinkButton>
                                &nbsp;
                                 <asp:LinkButton ID="lnkDelete"
                                     OnClientClick="javascript:return confirm('Delete selected Note?')"
                                     runat="server"                                    
                                     CommandName="DeleteSelected"
                                     CausesValidation="false"
                                     Visible='<%# (!gridComments.MasterTableView.IsItemInserted)&&(gridComments.EditIndexes.Count==0) %>'>
                                     <img style="border:0px;vertical-align:middle;"
                                     alt="" src="CssClass/Images/Delete.gif" />
                                     Delete
                                     </asp:LinkButton>
                                &nbsp;
                               
                                <asp:LinkButton ID="lnkRefresh1" runat="server" CommandName="RebindGrid">
                                    <img style="border:0px;vertical-align:middle;"
                                        alt="" src="CssClass/Images/Refresh.gif" />
                                    Refresh
                                </asp:LinkButton>
                        </CommandItemTemplate>
                        <EditFormSettings EditFormType="Template">
                            <FormTemplate>
                                <table>
                                    <tr>
                                        <td align="center">
                                            Note
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="noteTextBoxChild"
                                                 Width="375px"
                                                 ReadOnly="false"
                                                 onChange="Count(this,700)"
                                                 onKeyUp="Count(this,700)"
                                                 Height="195px"
                                                 runat="server"
                                                 
                                                 TextMode="MultiLine"
                                                 MaxLength="700" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center">
                                            <asp:Button ID="btnUpdate"
                                                Text='<%# (Container is GridEditFormInsertItem) ? "Save" : "Update" %>'
                                                runat="server"
                                                CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                            </asp:Button>
                                            &nbsp;
                                            <asp:Button ID="btnCancel" Text="Cancel"
                                                runat="server" CausesValidation="False"
                                                CommandName="Cancel">
                                            </asp:Button>
                                        </td>
                                    </tr>
                                </table>
                            </FormTemplate>
                        </EditFormSettings>
                       
                            </telerik:GridTableView>
                           
                        </DetailTables>
                       
                        <Columns>
                            <telerik:GridBoundColumn DataField="NoteID" Visible="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="User.UserName" UniqueName="User.UserName" HeaderText="User">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CreatedDateTime" HeaderText="Date" UniqueName="CreatedDateTime">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ApplicantNote" HeaderText="Note" UniqueName="ApplicantNote">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <CommandItemTemplate>
                            <div style="padding:3px 0px;text-align:right;">
                             <asp:LinkButton ID="lnkEdit" runat="server" CommandName="EditSelected"
                                     CausesValidation="false" Visible='<%# (!gridComments.MasterTableView.IsItemInserted)&&(gridComments.EditIndexes.Count==0) %>'>
                                     <img style="border:0px;vertical-align:middle;"
                                     alt="" src="CssClass/Images/Edit.gif" />
                                     Edit / View
                             </asp:LinkButton>

                            &nbsp;
                                <asp:LinkButton Style="vertical-align: bottom" ID="lnkAdd" runat="server" CommandName="InitInsert"
                                        Visible='<%# !gridComments.MasterTableView.IsItemInserted && gridComments.EditIndexes.Count == 0 %>'>
                                    <img style="border:0px;"
                                        alt="" src="CssClass/Images/AddRecord.gif" />
                                    Add Note
                                </asp:LinkButton>
                                &nbsp;
                                 <asp:LinkButton ID="lnkDelete"
                                     OnClientClick="javascript:return confirm('Delete selected Note?')"
                                     runat="server"                                    
                                     CommandName="DeleteSelected"
                                     CausesValidation="false"
                                     Visible='<%# (!gridComments.MasterTableView.IsItemInserted)&&(gridComments.EditIndexes.Count==0) %>'>
                                     <img style="border:0px;vertical-align:middle;"
                                     alt="" src="CssClass/Images/Delete.gif" />
                                     Delete
                                     </asp:LinkButton>
                                     &nbsp;
                                <asp:LinkButton ID="lnkRefresh1" runat="server" CommandName="RebindGrid">
                                    <img style="border:0px;vertical-align:middle;"
                                        alt="" src="CssClass/Images/Refresh.gif" />
                                    Refresh
                                </asp:LinkButton>
                        </CommandItemTemplate>
                        <EditFormSettings EditFormType="Template">
                            <FormTemplate>
                                <table>
                                    <tr>
                                        <td align="center">
                                            Note
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="noteTextBox"
                                                 Width="375px"
                                                 ReadOnly="false"
                                                 onChange="Count(this,700)"
                                                 onKeyUp="Count(this,700)"
                                                 Height="195px"
                                                 runat="server"
                                            
                                                 TextMode="MultiLine"
                                                 MaxLength="700" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center">
                                            <asp:Button ID="btnUpdate"
                                                Text='<%# (Container is GridEditFormInsertItem) ? "Save" : "Update" %>'
                                                runat="server"
                                                CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                            </asp:Button>
                                            &nbsp;
                                            <asp:Button ID="btnCancel" Text="Cancel"
                                                runat="server" CausesValidation="False"
                                                CommandName="Cancel">
                                            </asp:Button>
                                        </td>
                                    </tr>
                                </table>
                            </FormTemplate>
                        </EditFormSettings>
                       
                        <NoRecordsTemplate>
                            <p>No comments have been added</p>
                        </NoRecordsTemplate>
                    </MasterTableView>
                    <ClientSettings >
                    <Selecting AllowRowSelect ="true" />
                   
                    </ClientSettings>
                </telerik:RadGrid>
            </td>
        </tr>
    </table>

Everything worked great until I added the Edit/View link and when the Edit/View link is clicked I only show Refresh icon.

Princy
Top achievements
Rank 2
 answered on 10 Sep 2009
1 answer
202 views
I have a 2 level hiearchy grid. The detail table has a commanditemtemplate with a link inside for add item. I am needing to add an onclick javascript event to this in the code behind and get the datakeyvalue of the master table row that we are adding to. So for instance
MasterTable = Schedule
DetailTable =  Event
Key = ScheduleID

When i databind the event datasource i want to use the event to grab the ScheduleID from the mastertable row and add it to a javascript call ShowEditForm(ScheduleId)

How can I get the key in the commanddataitem?
I am already grabbing the link and inserting a fake call that works - but I need that darn key? Any thoughts how i can get it here? I know how to get it if i'm in a griddataitem but not here?

 

If TypeOf (e.Item) Is GridCommandItem And e.Item.OwnerTableView.DataSourceID = "SqlDates" Then

 

 

Dim dataitem As GridCommandItem = CType(e.Item, GridCommandItem)

 

 

 

Dim hypr As HyperLink = CType(dataitem.FindControl("AddLink"), System.Web.UI.WebControls.HyperLink)

 

hypr.Attributes(

"onclick") = [String].Format("return ShowEditForm('{0}'", 0)

 

 

 

'editLink.Attributes("onclick") = [String].Format("return ShowEditForm('{0}','{1}');", dataitem("MessageId").Text, e.Item.ItemIndex)

 

 

End If

 

Princy
Top achievements
Rank 2
 answered on 10 Sep 2009
4 answers
127 views
Hi:
  I am the freshman for the Telerik. I just encounter a strange problem when using the grouping functionality provided by Grid.
  I just follow the grouping demo(Outlook-style Grouping) provided by Grid. It works fine.  But when i want to remove one of the grouping option, an error is throw. "Sys.WebForms.PageRequestManagerServerErrorException:Specified argument was out of range of valid value.Parameter Name: index"
  Please check my source code.


    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
<div>  
        <%--        <telerik:Header runat="server" ID="Header1" NavigationLanguage="CS">  
        </telerik:Header>--%>  
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings>  
                <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                    <UpdatedControls>  
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />  
                    </UpdatedControls>  
                </telerik:AjaxSetting>  
            </AjaxSettings>  
        </telerik:RadAjaxManager>  
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">  
        </telerik:RadAjaxLoadingPanel>  
    </div>  
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" 
        GridLines="None" AutoGenerateColumns="False" Width="400px" PageSize="4" AllowCustomPaging="True" 
        ShowGroupPanel="true" PagerStyle-Position="Bottom" OnPageIndexChanged="RadGrid1_PageIndexChanged" 
        OnSortCommand="RadGrid1_SortCommand"  PagerStyle-AlwaysVisible="true" 
        OnGroupsChanging="RadGrid1_GroupsChanging"   
        onpagesizechanged="RadGrid1_PageSizeChanged">  
        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>  
        <MasterTableView>  
            <GroupByExpressions>  
                <telerik:GridGroupByExpression>  
                    <SelectFields>  
                        <telerik:GridGroupByField FieldAlias="Sex" FieldName="Sex"></telerik:GridGroupByField>  
                    </SelectFields>  
                    <GroupByFields>  
                        <telerik:GridGroupByField FieldName="Sex" SortOrder="Descending"></telerik:GridGroupByField>  
                    </GroupByFields>  
                </telerik:GridGroupByExpression>  
                <telerik:GridGroupByExpression>  
                    <SelectFields>  
                        <telerik:GridGroupByField FieldAlias="Age" FieldName="Age"></telerik:GridGroupByField>  
                    </SelectFields>  
                    <GroupByFields>  
                        <telerik:GridGroupByField FieldName="Age" SortOrder="Descending"></telerik:GridGroupByField>  
                    </GroupByFields>  
                </telerik:GridGroupByExpression>  
                <telerik:GridGroupByExpression>  
                    <SelectFields>  
                        <telerik:GridGroupByField FieldAlias="Name" FieldName="Name"></telerik:GridGroupByField>  
                    </SelectFields>  
                    <GroupByFields>  
                        <telerik:GridGroupByField FieldName="Name" SortOrder="Descending"></telerik:GridGroupByField>  
                    </GroupByFields>  
                </telerik:GridGroupByExpression>  
            </GroupByExpressions>  
            <RowIndicatorColumn>  
                <HeaderStyle Width="20px"></HeaderStyle>  
            </RowIndicatorColumn>  
            <ExpandCollapseColumn>  
                <HeaderStyle Width="20px"></HeaderStyle>  
            </ExpandCollapseColumn>  
            <Columns>  
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="column" SortExpression="Name">  
                </telerik:GridBoundColumn>  
                <telerik:GridBoundColumn DataField="Sex" HeaderText="Sex" UniqueName="column1" SortExpression="Sex">  
                </telerik:GridBoundColumn>  
                <telerik:GridBoundColumn DataField="Age" DataType="System.Int32" HeaderText="Age" 
                    SortExpression="Age" UniqueName="column2">  
                </telerik:GridBoundColumn>  
            </Columns>  
        </MasterTableView>  
        <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">  
            <Selecting AllowRowSelect="True"></Selecting>  
            <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" 
                ResizeGridOnColumnResize="False"></Resizing>  
        </ClientSettings>  
        <GroupingSettings ShowUnGroupButton="true" />  
    </telerik:RadGrid> 

In the server side,  a  List<Person> object is binded to the Grid.
There are 3 properties in Person.
public class Person  
{  
    public String Name { get; set; }  
    public int Age { get; set; }  
    public SexEnum Sex { get; set; }  
}  
 
public enum SexEnum  
{  
    Male,  
    Female  
} 
 Anybody can help me?
Michael Tao
Top achievements
Rank 1
 answered on 10 Sep 2009
3 answers
126 views
Is there a way to hide or remove the LoadingAjaxPanel for the grid? I have a situation where i have a grid inside a TabStrip and it's showing two LoadingAjaxPanels, one for the TabStrip and one for the grid. I need to always show the tabstrip one but i don't need to show it for the grid.
Stephen
Top achievements
Rank 1
 answered on 10 Sep 2009
2 answers
128 views
Hello All!

I LOVE my RAD Controls on my normal asp.net pages.  They have greatly changed the way I work, for the better!

I am just beginning an adventure into a "Dynamic Data Website" and all the freedom of having LINQ do the work for me, and am having difficulty using my precious controls in that environment. 

For instance, the RadEditor displays well enough, but the <ImageManager> and other editor items cause a web.config error even though my web.config does display the Telerik items. While the Editor displays and does capture the text, it is only saving plain text, not the text as formatted within the control ** I HAVE READ all the posts on this site concerning web.config errors with the DialogHandler, and HAVE tried the various fixes with aspx vs axd extension in the web.config, but they have not worked. **

Other controls simply error.  I put the control on the aspx page (a custom page in the CustomPages folder in a "Dynamic Data Website"), and on the vb code behind page I get a message that the control has not been declared.

Since it's a pretty consistent 'non starter' using my controls within a Dynamic Data site, I am sure I am missing something global rather than something specific to one control or the other.

I know there must be a way to register these controls to work properly within the framework of a Dynamic Data website - LINQ and the ability to scaffold all tables is just too cool to be ignored, but upon searching this forum specifically for issues related to Dynamic Data sites I am not finding any results, and I am at a loss of what to try next.  I suspect it's that I am just too much of a newbie, so please be as specific as possible in your replies.

I am using the 2009.Q2 controls for asp.net 3.5, with a Dynamic Data Website generated in VS2008, with scaffoldAllTables set to true.  I am doing CustomPages where I want to use my Awesome Rad Controls. :)

Thank you for your time.  I appreciate Telerik's attention to helping us!

Susan 
Susan
Top achievements
Rank 1
 answered on 09 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?