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

Is there any way to work in-line filter when we turn off grid filter. I have set EnableViewState=false for radgrid but when I applied inline filter then in NeedDataSource event FilterExpression is showing empty and I applied filter again then FilterExpression is showing previous value.

please help.

Thanks
Praveen Tomar
Andrey
Telerik team
 answered on 15 Oct 2012
8 answers
480 views
I am trying to place a radscheduler as a user control on one of my pages, I am getting this error

script control 'RadAjaxManager1" is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptSescriptors. Parameter name: scriptControl.

it's weird because when I run my code on my local machine everything is honky dory, but once I move it to the server it no longer works.

 any ideas on why this would be happening?

code:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
......
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <%--//commentedout to seperate grid from scheduler
            <telerik:AjaxSetting AjaxControlID="RadGrid1">--%>
            <telerik:AjaxSetting AjaxControlID="RadScheduler3">
            <UpdatedControls>
                <%--//commentedout to seperate grid from scheduler
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />--%>
                <telerik:AjaxUpdatedControl ControlID="RadScheduler3" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <%--<telerik:AjaxSetting AjaxControlID="Panel1">
         <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler3" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />

                    </UpdatedControls>
        </telerik:AjaxSetting>--%>
    </AjaxSettings>
</telerik:RadAjaxManager>
<%--<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
 <asp:Label id="Label2" runat="server" ForeColor="Red">Loading... </asp:Label>
</telerik:RadAjaxLoadingPanel> />
--%>
.......


<telerik:RadScheduler ID="RadScheduler3"
RegisterWithScriptManager="false"
    runat="server"
    DataEndField="EndDate"
    DataKeyField="EventID"
    DataSourceID="Event"
    DataStartField="StartDate"
    DataSubjectField="Description"
    Skin="Sunset"
    DayView-UserSelectable="false"
    WeekView-UserSelectable="false"
    SelectedView="MonthView"
    TimelineView-UserSelectable="false"
    MonthView-VisibleAppointmentsPerDay="10"
    OverflowBehavior="Scroll"
    OnAppointmentDataBound="RadScheduler3_AppointmentDataBound"
    OnPreRender="RadScheduler3_PreRender"
    OnAppointmentUpdate="Update"
    OnAppointmentDelete="Delete"
    MinimumInlineFormWidth="700"
    OnClientAppointmentContextMenu="appointmentContextMenu"
    MinimumInlineFormHeight="1500"
    AppointmentContextMenuSettings-Skin="Sunset"
    Width="100%"
    Height="1000px"
    OnFormCreated="RadScheduler3_FormCreated"
    ShowViewTabs="false"
    TimelineView-NumberOfSlots="10"
    StartEditingInAdvancedForm ="true"
     
    StartInsertingInAdvancedForm="true">
    <Reminders Enabled="True" />
.....................
</telerik:RadScheduler>


Thanks,

Adam Pierce



Plamen
Telerik team
 answered on 15 Oct 2012
1 answer
169 views
Hi All,

I am using RadToolTip control and under that I have place a textbox control when a user click on a radtooltip I would like to set the focus on a textbox control. For some reason I am not able to that. Please look at the code below and advise me anything which might be useful for me.

I am getting the textNote ID but for some reason when I call the focus method it doesn't set the focus.


Thanks for your response in advance.





<script type="text/javascript">
 
       function SetFocusToTextBox(txt) {
 
           var txtNote = document.getElementById(txt);
           alert(txtNote);
           txtNote.focus();
       }
 
   </script>




<telerik:RadGrid ID="gvTopics" runat="server" Font-Names="Verdana" Font-Size="XX-Small"
            Skin="Office2007" EnableEmbeddedSkins="true" GridLines="Both" AllowSorting="true"
            AllowPaging="true" PageSize="10" Width="99%" CellPadding="2" AutoGenerateColumns="False">
            <MasterTableView CommandItemDisplay="Top">
                <CommandItemSettings ShowAddNewRecordButton="false" RefreshImageUrl="" />
                <Columns>
                    <telerik:GridTemplateColumn>
                        <ItemTemplate>
                            <asp:ImageButton ID="btnShowMessagesFromTopicList" ToolTip="Show messages" runat="server"
                                CommandArgument='<%# Container.DataItem("id")%>' Text="show msgs" OnClick="btnShowMessagesFromTopicList_Click" />
                             <asp:ImageButton ID="btnAddMessage" runat="server" ToolTip="Reply to agent"
                                Text="Reply" CommandArgument='<%# Container.DataItem("id")%>' OnClick="btnReply_Click" />
                             <asp:ImageButton ID="btnAddNote" runat="server" Text="Add Note" CommandArgument='<%# Container.DataItem("id")%>' />
                             <asp:ImageButton ID="btnCloseTopic" runat="server" Text="close" Visible="false"
                                CommandArgument='<%# Container.DataItem("id")%>' OnClick="btnCloseTopic_Click"
                                ToolTip="Close topic" />
                            <asp:HiddenField ID="hidID" Value='<%# Bind("ID") %>' runat="server" />
                            <asp:HiddenField ID="hidCreatedBy" Value='<%# Bind("CreatedBy") %>' runat="server" />
                            <asp:HiddenField ID="hidNewAgentMessage" Value='<%# Bind("NewAgentMessage") %>' runat="server" />
                            <telerik:RadToolTip ID="rttpNote" Width="210" Height="200" HideEvent="ManualClose"
                                TargetControlID="btnAddNote" RelativeTo="Element" Skin="Windows7" Position="TopRight"
                                ManualClose="true" ShowEvent="OnClick" runat="server">
                                <table width="100%">
                                    <tr>
                                        <td>
                                            Notes :
                                            <asp:TextBox ID="txtNote" TextMode="MultiLine" Width="200" Height="200" onblur runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Button ID="btnSaveNote" CommandArgument='<%# Container.DataItem("id")%>' Text="Save"
                                                OnClick="btnSaveNote_Click" runat="server" />
                                        </td>
                                    </tr>
                                </table>
                            </telerik:RadToolTip>
                        </ItemTemplate>
                        <ItemStyle Width="15%" />
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>



  Protected Sub gvTopics_OnItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles gvTopics.ItemDataBound


        If TypeOf (e.Item) Is GridDataItem Then         

            Dim txtNote As TextBox = e.Item.FindControl("txtNote")             
            btnAddNote.Attributes.Add("onClick", "javascript:SetFocusToTextBox('" & txtNote.ClientID & "')")        

    End Sub
Shinu
Top achievements
Rank 2
 answered on 15 Oct 2012
4 answers
224 views
Hello,

Thank you in advance for any and all assistance.

I have a gridbound column that is ignoring alignment settings.

<telerik:GridBoundColumn DataField="TOTAL_AMOUNT" Aggregate="Sum"
    ItemStyle-Font-Size="XX-Small" HeaderStyle-Font-Size="XX-Small" FooterStyle-Font-Size="XX-Small" ItemStyle-Wrap="false" FooterStyle-Wrap="false" HeaderStyle-Wrap="false"
    ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right"
    DataFormatString="{0:$###,##0.00}" DataType="System.Double"
    HeaderText="RQMT AMOUNT" SortExpression="Number" UniqueName="AMOUNT"
    FilterControlAltText="Filter AMOUNT column">
    <ItemStyle HorizontalAlign="right" />
</telerik:GridBoundColumn>

When I remove the attribute DataFormatString="{0:$###,##0.00}", the column then aligns correctly to the right.  I've also tried taking the CSS style approach, with no results.  Is there some tip/trick that I'm missing?

Thanks again for any assistance!
Tsvetina
Telerik team
 answered on 15 Oct 2012
4 answers
117 views
Hi,
this is the first time i touch asp.net and telerik. 
I have been trying to figure something out for quite a while :

i have a table in a database: 
ID NAME  NICK
123  Mario        Mar
234  Maria        Mia
.
. and so on...

I am starting out with an empty radgrid containing a template column that has a radComboBox inside. that radComboBox is populated from SqlDataSource (the ID). I have two more columns, Name and Nickname that all i need them to display is the Name and Nickname according to that table in the database that is in a Dataview variable called data now. it does not matter if the Name and Nickname columns are read only textboxes or labels.... the RadGrid is editable in-line. 

how can i display the name and nickname when the user selects an ID from the RadComboBox  while in edit mode and save that line in the table ? 

Example: in edit mode if i select the ID 123 it will instantly display Mario and Mar in the corresponding columns. and when I click the Insert button it will be inserted in the table. and then finally if i click the submit button it will send the table to the database... but thats another issue.. 

THANK YOU HELPERS ! ( just take it easy on me.. I'm still very new and learning.. )
Shinu
Top achievements
Rank 2
 answered on 15 Oct 2012
0 answers
163 views
Hi All,


I have a RadGrid for which radMenu is bound as context menu
the grid displays the items such as PersonFirstname,PersonLastname,emailid
when i click on emailid the context menu with the options
Copy,paste,... gets displayed.


for example when i click on someone@somemail.com
it displays copy,paste,edit,...
when i click on copy i need the "someone@somemail.com" value either in javascript or server side event

My javascript function is below

 function OnClientItemClickedHandler(sender, eventArgs)
    {   
        var personid, txt, lsreturnval;
             
        txt = eventArgs.Item.Text
        lsreturnval = '0'
        personid = document.getElementById("<%=hdnPersonID.ClientID %>").value
        try
        {
            if (txt == 'View/Edit Contact')
                lsreturnval=window.showModalDialog('../Contact/Editcontact.aspx?person_id='+personid+'&Mode=EDIT','EditContact','dialogWidth:'+editWidth+'px;dialogHeight:'+editHeight+'px;status:no;help:no;resizable:no;scroll:yes;maximize:no');
            else if (txt == 'Add')
                lsreturnval=window.showModalDialog('../Contact/Editcontact.aspx?Person_id='+personid+'&Mode=ADD','','dialogWidth:'+editWidth+'px;dialogHeight:'+editHeight+'px;status:no;help:no;resizable:no;scroll:yes;maximize:no');
            else if (txt == 'Copy')
            {   
            /// the code must go here
            }     

                
            else if (txt == 'Delete')
                if(!confirm('Are you sure you wish to delete company contact Relationship ?'))
                {
                    <%=mnuCompanyContact.ClientID%>.OnClientItemClickedHandler=OnClientItemClickedHandler;
                    return false;
                }
                else
                    return true;
                
            if (lsreturnval!='1')
            {
                <%=mnuCompanyContact.ClientID%>.OnClientItemClickedHandler=OnClientItemClickedHandler;
                return false;
            }
            
        }
        catch (err)
        {
            <%=mnuCompanyContact.ClientID%>.OnClientItemClickedHandler=OnClientItemClickedHandler;
            return false;
        }
       
    }

serverside .vb code

Protected Sub mnuCompanyContact_ItemClick(ByVal sender As Object, ByVal e As Telerik.WebControls.RadMenuEventArgs) Handles mnuCompanyContact.ItemClick
        Try
            If e.Item.Text.ToString.ToUpper = "COPY" Then
                GetComPanyContact(hdnCompanyId.Value)
            ElseIf e.Item.Text.ToString.ToUpper = "VIEW/EDIT CONTACT" Then
                GetComPanyContact(hdnCompanyId.Value)
            ElseIf e.Item.Text.ToString.ToUpper = "ADD" Then
                GetComPanyContact(hdnCompanyId.Value)
            ElseIf e.Item.Text.ToString.ToUpper = "DELETE" Then
                DeleteCompanyContact(hdnContactID.Value)
            End If
        Catch ex As Exception
            'TODO: Error Handler
            CUtility.PageErrorHandler(Err.Number, ex, "Event mnuCompanyContact_ItemClick")
        End Try
    End Sub


the above event never gets fired.



the markup code(.aspx)

  <radG:RadGrid ID="grdCompanyContacts" runat="server" AutoGenerateColumns="False"
                        EnableAJAX="False" GridLines="None" Width="100%" Skin="eCrm" AllowSorting="true"
                        EnableAJAXLoadingTemplate="true" LoadingTemplateTransparency="20" BorderStyle="None"
                        BorderWidth="0px" CellPadding="0" CellSpacing="1"  HeaderStyle-BackColor="#818A8F">
                        <%--AllowPaging="True" PageSize="20"--%>
                        <ItemStyle BorderStyle="None" Height="20px" />
                        <AlternatingItemStyle BorderStyle="None" Height="20px" />
                        <HeaderStyle  CssClass="grid_head1" />
                        <ClientSettings EnableClientKeyValues="True">
                            <Selecting AllowRowSelect="True" />
                            <ClientEvents OnRowContextMenu="RCM2" OnRowSelected="RS2" />
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="250px" />
                        </ClientSettings>
                        <MasterTableView EditMode="InPlace" Width="100%" DataKeyNames="PERSON_ID">
                            <NoRecordsTemplate>
                            </NoRecordsTemplate>
                            <Columns>
                                <radG:GridBoundColumn DataField="PERSON_ID" Visible="False" UniqueName="colPersonID" />
                                <radG:GridBoundColumn DataField="ASSOCIATED_COMPANY_COUNT" Visible="False" UniqueName="colASSOCIATED_COMPANY_COUNT" />
                                <radG:GridTemplateColumn UniqueName="colControls">
                                    <HeaderStyle Width="4%" />
                                    <ItemTemplate>
                                        <asp:ImageButton runat="Server" ToolTip="Edit Contact" ID="imgEdit" OnClick="UpdateCompanyContactGrid"
                                            ImageUrl="../Images/edit.gif" />
                                        <asp:ImageButton runat="Server" ToolTip="Delete Contact" ID="imgDelete" ImageUrl="../Images/Delete_Rec.gif"
                                            OnClick="imgOnClick_DeleteCompanyContact" />
                                    </ItemTemplate>
                                </radG:GridTemplateColumn>
                                <radG:GridTemplateColumn HeaderText="Name" SortExpression="contact_name" UniqueName="contact_name">
                                    <HeaderStyle Width="20%" />
                                    <ItemTemplate>
                                        <a class="gray" href="../contact/Contact.aspx?Person_id=<%# DataBinder.Eval(Container.DataItem,"person_id") %>">
                                            <%#DataBinder.Eval(Container.DataItem, "CONTACT_NAME")%>
                                        </a>
                                    </ItemTemplate>
                                </radG:GridTemplateColumn>
                                <radG:GridBoundColumn DataField="TITLE" HeaderText="Title" SortExpression="TITLE"
                                    Resizable="False" UniqueName="column1">
                                    <HeaderStyle Width="20%" />
                                    <ItemStyle HorizontalAlign="Left" Wrap="False" />
                                </radG:GridBoundColumn>
                                <radG:GridTemplateColumn HeaderText="Office" SortExpression="company_name" UniqueName="company_name">
                                    <HeaderStyle Width="20%" />
                                    <ItemTemplate>
                                        <a  class="gray" href="../company/Company.aspx?Company_Id=<%# DataBinder.Eval(Container.DataItem,"COMPANY_ID") %>&Office_Id=<%# DataBinder.Eval(Container.DataItem,"COMPANYID") %>">
                                            <%# DataBinder.Eval(Container.DataItem,"COMPANY_NAME") %>
                                        </a>
                                    </ItemTemplate>
                                </radG:GridTemplateColumn>
                                <radG:GridBoundColumn DataField="address" Visible="False" SortExpression="address"
                                    HeaderText="Address" Resizable="False" UniqueName="column1">
                                    <ItemStyle HorizontalAlign="Left" Wrap="False" />
                                    <HeaderStyle Width="20%" />
                                </radG:GridBoundColumn>
                                <radG:GridBoundColumn DataField="city" SortExpression="city" Visible="False" HeaderText="City"
                                    Resizable="False" UniqueName="column1">
                                    <ItemStyle HorizontalAlign="Left" Wrap="False" />
                                    <HeaderStyle Width="20%" />
                                </radG:GridBoundColumn>
                                <radG:GridTemplateColumn HeaderText="Email" SortExpression="EMAIL" UniqueName="E-Mail">
                                    <HeaderStyle Width="15%" />
                                    <ItemTemplate>
                                        <%# DataBinder.Eval(Container.DataItem,"EMAIL_INVALID") %>
                                        <a class="gray" href="mailto:<%# DataBinder.Eval(Container.DataItem,"EMAIL") %>">
                                            <%# DataBinder.Eval(Container.DataItem,"EMAIL") %>
                                        </a>
                                    </ItemTemplate>
                                </radG:GridTemplateColumn>
                                <radG:GridTemplateColumn UniqueName="Tel" HeaderText="Tel">
                                    <HeaderStyle Width="25%" />
                                    <ItemTemplate>
                                        <%# DataBinder.Eval(Container.DataItem,"PHONE_NUMBER_INVALID") %>
                                        <%# DataBinder.Eval(Container.DataItem,"PHONE_NUMBER") %>
                                    </ItemTemplate>
                                </radG:GridTemplateColumn>
                            </Columns>
                            <ExpandCollapseColumn Visible="False" Resizable="False">
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <RowIndicatorColumn Visible="False">
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                        </MasterTableView>
                        <ExportSettings>
                            <Pdf PageBottomMargin="" PageFooterMargin="" PageHeaderMargin="" PageHeight="11in"
                                PageLeftMargin="" PageRightMargin="" PageTopMargin="" PageWidth="8.5in" />
                        </ExportSettings>
                        <PagerStyle Visible="false" />
                    </radG:RadGrid>
                      <telerik:RadScriptManager ID="ScriptManager" runat="server" />
                    <radM:RadMenu ID="mnuCompanyContact" runat="server" IsContext="True" OnClientItemClicking="OnClientItemClickedHandler"
                        ContextMenuElementID="none" Skin="eRebalContextMenu" OnItemDataBound="mnuCompanyContact_ItemDataBound" OnItemClick="mnuCompanyContact_ItemClick" Height="73px" Width="119px">
                        <Items>
                            <radM:RadMenuItem ID="RadMenuItem10" runat="server" Text="Copy">
                            </radM:RadMenuItem>
                            <radM:RadMenuItem ID="RadMenuItem8" runat="server" Text="View/Edit Contact">
                            </radM:RadMenuItem>
                            <radM:RadMenuItem ID="RadMenuItem5" runat="server" Text="Add">
                            </radM:RadMenuItem>
                            <radM:RadMenuItem ID="RadMenuItem11" runat="server" Text="Delete">
                            </radM:RadMenuItem>
                        </Items>
                    </radM:RadMenu>


I have been struck for 4 to 5 days
please help me
any help would be greatly appreciated.


Regards,
Sudha
Ragha
Top achievements
Rank 1
 asked on 15 Oct 2012
3 answers
96 views
I use Panel bar for Personal Information and its look like:

Email: abc@com
Name: Abc
etc.

now at end I mention a edit button. How can I achieve this functionality when user click on edit button than another panel bar is coming and convert all my data(abc@com) into textboxes. I have attached two pictures which show my all scena

Thanks
Princy
Top achievements
Rank 2
 answered on 15 Oct 2012
8 answers
188 views
Hello,
I have a grid that is simply bound to a dataset and it is always in edit mode to give us somewhat of an excel like feel.  We have a need to add a column that is of a dropdown type.  On selected index change we need it to update the dataset accordingly.  

Questions are:
1.  How do i get a column to contain a dropdown and fill it with values?
2.  On change of dropdown index how do update the underlying dataset or will the grid handle that? 

Thanks.  

Below is my grid that we are currently using:

<telerik:RadGrid ID="rgridChemValues" runat="server"
                    CssClass="gridview-custom" Skin="Transparent" OnPreRender="rgridChemValues_PreRender"
                    AllowMultiRowEdit="True" EnableViewState="true"
                    oncolumncreated="rgridChemValues_ColumnCreated" ShowFooter="True"
                    EnableHeaderContextMenu="True">
                    <MasterTableView AutoGenerateColumns="true" EditMode="InPlace" CommandItemDisplay="TopAndBottom">
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                            </EditColumn>
                        </EditFormSettings>
                    <HeaderStyle Width="100px" />
                        <CommandItemTemplate>
                        </CommandItemTemplate>
                        <CommandItemSettings ExportToPdfText="Export to PDF" />
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"
                            Visible="True">
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"
                            Visible="True">
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridBoundColumn HeaderText="FieldApplicationKeyVS" Display="false" DataField="FieldApplicationKey"
                                UniqueName="FieldApplicationKeyVisible">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings>
                        <ClientEvents OnRowContextMenu="RowContextMenu"
                            OnColumnContextMenu="rgridChemValues_OnColumnContextMenu"></ClientEvents>
                        <Selecting AllowRowSelect="true" />
                    </ClientSettings>
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                </telerik:RadGrid>

Shinu
Top achievements
Rank 2
 answered on 15 Oct 2012
1 answer
88 views
I have a grid that loads with all the fields editable but I need to resize the editable text boxes to make the grid fit on the page. Can someone post some code that will do this?

Thanks!
Jayesh Goyani
Top achievements
Rank 2
 answered on 14 Oct 2012
1 answer
62 views
Hi,

I have radgrid with GridEditCommandColumn.
I always keep grid items in edit mode.
In edit mode I also want to hide the Cancel image.

Please suggest.

Thanks,
Aditi

 

Jayesh Goyani
Top achievements
Rank 2
 answered on 14 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?