Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
194 views

Hello,

I am using
GridNumericColumnEditor for my GridNumericColumn to modify various properties of RadNumericTextbox like width, maxLength, apply validators etc.

But while using GridNumericColumnEditor, in English culture it displays my value “1.23”  as “1.23” in display mode and “1.23” in edit mode. Till now its OK.

In French culture, it displays well as “1,23” in display mode. But in edit mode, it displays as “12300,00”. Normally it should display 1,23 in edit mode.

I don’t know why RadNumericTextBox in edit mode transforms 1,23 to 12300,00.

Any idea how the RadNumericTextbox displays the value in French culture?

Eyup
Telerik team
 answered on 03 Sep 2013
1 answer
46 views
Hi,

I  need to filter resources used by Radscheduler based on client interaction,  how can I do that?
   cmd.CommandText = "SELECT * FROM [Users] where id > 0 "; /*** would like to send this sql statement from client  based on combobox selection  88?




 <telerik:RadScheduler runat="server"  ID="RadScheduler1"    OnResourcesPopulating="RadScheduler1_ResourcesPopulating"  SelectedView="WeekView" 
                  OnClientAppointmentsPopulating="OnClientAppointmentsPopulating"  Width="900px" Height="900px"    OverflowBehavior="Scroll"   OnClientResourcesPopulating="OnClientResourcesPopulating" 
               AppointmentStyleMode="Default" 
               >
                            <DayView UserSelectable="True" GroupBy="TechName" GroupingDirection="Horizontal" />
                            <WeekView UserSelectable="True" GroupBy="TechName" GroupingDirection="Vertical"  />
                            <MonthView UserSelectable="True" GroupBy="TechName" GroupingDirection="Vertical"  />
                             <TimelineView  GroupBy="TechName" ColumnHeaderDateFormat="h:mm tt" GroupingDirection="Vertical" HeaderDateFormat="MM/dd/yyyy h:mm tt"
                                NumberOfSlots="21"  SlotDuration="00:30:00" StartTime="08:00:00" />
                            
    <WebServiceSettings   Path="M4SchWebService.asmx" ResourcePopulationMode="ServerSide" />
                 <ResourceTypes>
                    <telerik:ResourceType Name="TechName" />
                    <telerik:ResourceType Name="TicketState" />

                </ResourceTypes>
</telerik:RadScheduler>


private IEnumerable<Resource> LoadTechNames()
        {
            List<Resource> resources = new List<Resource>(); 
            try
            {
                using (DbConnection conn = OpenConnection())
                {
                    DbCommand cmd = DbFactory.CreateCommand();
                    cmd.Connection = conn;
                    cmd.CommandText = "SELECT * FROM [Users] where id > 0 "; /*** would like to send this sql statement from client  based on combobox selection  ****/

                    DataTable dt = new DataTable();
                    SqlDataAdapter da = new SqlDataAdapter(cmd.CommandText, cmd.Connection as SqlConnection);
                    da.Fill(dt);
                    da.Dispose();

                    if (dt.Rows.Count < 1)
                        return resources;

                    foreach (DataRow row in dt.Rows)
                    {
                        Resource res = new Resource();
                        res.Type = "TechName";
                        res.Key = row["ID"];
                        res.Text = Convert.ToString(row["TechName"]);
                        //res.Attributes["Phone"] = Convert.ToString(row["Phone"]);

                        resources.Add(res);
                    }
                }//end of using
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return resources;
        }



Thanks,
Prava
Boyan Dimitrov
Telerik team
 answered on 03 Sep 2013
2 answers
770 views
Hi,
I have 3 columns in this grid that deal with date and I would like to add a datetimePicker on their side.
I have tried without success for a sometime.
Here is my code. Could you please suggest what should I change to make the date picker showing up.
Thanks a lot

<telerik:RadGrid ID="RadGrid2" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True" AllowSorting="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" CellSpacing="0" Culture="it-IT" DataSourceID="SqlDataSource1" GridLines="None" OnItemDataBound="RadGrid2_ItemDataBound" EnableHeaderContextMenu="True">
            <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            </ClientSettings>
            <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="TopAndBottom" DataKeyNames="Id" DataSourceID="SqlDataSource1" IsFilterItemExpanded="False" ShowHeader="True">
                <CommandItemSettings ShowCancelChangesButton="True" ShowExportToPdfButton="True" ShowSaveChangesButton="True" ShowExportToExcelButton="True" />
                <Columns>
                    <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" FilterControlAltText="Filter Id column" HeaderText="Id" ReadOnly="True" SortExpression="Id" UniqueName="Id">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Tipo" FilterControlAltText="Filter Tipo column" HeaderText="Tipo" SortExpression="Tipo" UniqueName="Tipo">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Scadenza" DataType="System.DateTime" FilterControlAltText="Filter Scadenza column" HeaderText="Scadenza" SortExpression="Scadenza" UniqueName="Scadenza" DataFormatString="{0:dd/MM/yyyy}">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Periodo_Inizio" DataType="System.DateTime" FilterControlAltText="Filter Periodo_Inizio column" HeaderText="Periodo_Inizio" SortExpression="Periodo_Inizio" UniqueName="Periodo_Inizio" DataFormatString="{0:dd/MM/yyyy}">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Periodo_fine" DataType="System.DateTime" FilterControlAltText="Filter Periodo_fine column" HeaderText="Periodo_fine" SortExpression="Periodo_fine" UniqueName="Periodo_fine" DataFormatString="{0:dd/MM/yyyy}">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridAttachmentColumn FileName="attachment" FilterControlAltText="Filter AttachmentColumn column" UniqueName="AttachmentColumn" HeaderText="Carica allegati">
                    </telerik:GridAttachmentColumn>
                    <telerik:GridBoundColumn DataField="Note" FilterControlAltText="Filter Note column" HeaderText="Note" SortExpression="Note" UniqueName="Note">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text="" />
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                </Columns>
                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
            </MasterTableView>
        </telerik:RadGrid>
Felice
Top achievements
Rank 1
 answered on 03 Sep 2013
3 answers
245 views
Hi Guys,
I am using AJAX toolkit Q2 2013 version of Telerik AJAX controls. I am using RadGrid control and I am facing problem of Double click event on GridView Row. My scenario is give below:

 I am using RadGrid control in my page. I am using Drag&Drop feature of RadGrid view. I am firing Gridview Client side Event "OnRoDragStarted" and "OnRowDbClick" event. I am facing problem that when I double click on my GridView Row, it fires "OnRoDragStarted" and then "OnRowDbClick" event. Can anybody guide me that how I can avoid "OnRoDragStarted" event on Double Click Event of Gridview Row. Thanks in advance.

Regards,
Deyan Enchev
Telerik team
 answered on 03 Sep 2013
3 answers
273 views
Hello,

I have issue with exporting radgrid to excel through Biff. Radgrid has some GridTemplateColumns which aren't correctly exported. When I use Excel-Format="ExcelML" result excel file shows data properly.

You can find further information in the attachment

Please help me to solve it...

Best regards

 Vasssek
Kostadin
Telerik team
 answered on 03 Sep 2013
3 answers
407 views
Hi Guys,

i currently have a rad window that opens when a picture in the RadGrid is clicked

My RadGrid
<telerik:RadGrid ID="grdIncidents" Height="890px" runat="server" OnItemCreated="grdIncidents_ItemCreated"
                    AllowAutomaticInserts="True" AutoGenerateColumns="False" OnNeedDataSource="grdIncidents_NeedDataSource"
                    meta:resourcekey="grdIncidentsResource1" AllowPaging="True" PageSize="15" AllowSorting="True" OnDeleteCommand="grdIncidents_DeleteCommand"
                    CellSpacing="0" GridLines="None" onprerender="grdIncidents_PreRender">
 
                    <ClientSettings Scrolling-AllowScroll="false">
                        <Selecting CellSelectionMode="None"></Selecting>
                    </ClientSettings>
 
                    <MasterTableView DataKeyNames="IncidentID" ClientDataKeyNames="IncidentID" CommandItemDisplay="Top">
                     
                    <Columns>
                        <telerik:GridBoundColumn DataField="Status" HeaderText="Status" ItemStyle-Font-Names="Calibri" meta:resourcekey="GridBoundColumnResource1"
                                                 Resizable="False" UniqueName="Status" ReadOnly="True" Reorderable="False" ShowSortIcon="False">
 
                            <FooterStyle HorizontalAlign="Center" Width="20px" Wrap="True" />
                            <HeaderStyle HorizontalAlign="Center" Width="20px" Wrap="True" />
                            <ItemStyle Font-Names="Calibri" HorizontalAlign="Center" Width="20px" Wrap="True" />
                        </telerik:GridBoundColumn>
 
                        <telerik:GridHyperLinkColumn FooterText="HyperLinkColumn footer" UniqueName="IncidentType" HeaderText="Title</br>Reference" DataTextField="IncidentType" NavigateUrl="#">
                        </telerik:GridHyperLinkColumn>
 
                           <telerik:GridBoundColumn DataField="AccountDetails"
                                HeaderText="Account<br/>Site<br/>Location"
                                meta:resourcekey="GridBoundColumnResource4" UniqueName="AccountDetails" Resizable="False"/>
                             
                            <telerik:GridBoundColumn DataField="ProductDetails"
                                HeaderText="Product<br/>Component"
                                meta:resourcekey="GridBoundColumnResource5" UniqueName="ProductDetails" Resizable="False"/>
                             
                            <telerik:GridBoundColumn DataField="DepartmentDetails"
                                HeaderText="Department<br/>Category"
                                meta:resourcekey="GridBoundColumnResource6" UniqueName="DepartmentDetails" Resizable="False"/>
                             
                            <telerik:GridBoundColumn DataField="ImpactLevel"
                             HeaderText="Impact"
                             meta:resourcekey="GridBoundColumnResource7" UniqueName="ImpactLevel" Resizable="False"/>
                             
                            <telerik:GridBoundColumn DataField="CurrentAssignedPerson.FullName"
                                HeaderText="Assigned User" meta:resourcekey="GridBoundColumnResource8" UniqueName="Assigned" Resizable="False"/>
                             
                            <telerik:GridBoundColumn DataField="LoggedDate" HeaderText="Incident Log Date"
                                meta:resourcekey="GridBoundColumnResource9" UniqueName="LoggedDate" />
                             
                            <telerik:GridBoundColumn DataField="LastUpdated" HeaderText="Last Action Date" meta:resourcekey="GridBoundColumnResource10"
                                UniqueName="LastUpdated" />
 
                            <telerik:GridTemplateColumn UniqueName="TemplateEditColumn">
                            <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:HyperLink ID="EditLink" runat="server" Text="Edit"><img src="../Images/icons/pencil.png" class="editPics"></asp:HyperLink>
                                    <br>Edit
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
 
                            <telerik:GridTemplateColumn UniqueName="ActionColumn">
                            <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:HyperLink ID="ActionLink" Text="Action" runat="server"><img src="../Images/icons/action.png" class="editPics"></asp:HyperLink>
                                    <br>Action
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
 
                            <telerik:GridButtonColumn UniqueName="GridDeleteButton" ConfirmText="Are you sure that you would like \nto delete this incident?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
 
                        </Columns>
 
                        <CommandItemTemplate>
                            <div id="AddIncidentDiv" runat="server" style="padding: 4px 7px 4px; text-align:right;">
                                <asp:ImageButton ID="btnAdd" runat="server" ToolTip="Add New Incident" ImageUrl="../Images/icons/add.png" OnClientClick="return ShowInsertForm();"/>
                            </div>
                        </CommandItemTemplate>
                    </MasterTableView>
                </telerik:RadGrid>

Javascript that opens the window
function ShowEditForm(id, rowIndex) {
                var grid = $find("<%= grdIncidents.ClientID %>");
 
                var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
                grid.get_masterTableView().selectItem(rowControl, true);
 
                window.radopen("EditIncidents.aspx?IncidentID=" + id, "IncidentListDialog");
                return false;
            }

Code behind
protected void grdIncidents_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                HyperLink editLink = (HyperLink)e.Item.FindControl("EditLink");
                editLink.Attributes["href"] = "#";
                editLink.Attributes["onclick"] = String.Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["IncidentID"], e.Item.ItemIndex);

                     HyperLink actionLink = (HyperLink)e.Item.FindControl("ActionLink");
                     actionLink.Attributes["href"] = "#";
                     actionLink.Attributes["onclick"] = String.Format("return ShowActionForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["IncidentID"], e.Item.ItemIndex);
 
            }
        }

Reference numbers are being loaded from the database into the radGrid as a GridHyperLink column, what needs to be done is when a hyper link is clicked it opens the RadWindow, how would i go about doing this? while still loading the reference numbers from the database.
Princy
Top achievements
Rank 2
 answered on 03 Sep 2013
2 answers
99 views
Greetings, using the sample found here
http://www.telerik.com/community/forums/aspnet-ajax/editor/custom-dialogs-not-working.aspx
We have been able to add custom links to our HTML content. 

The problem is, if our link has any other formatting (bold or italics is clicked) , the sample script will not pickup the link applied and will not return  the already set href.  It has something to do with the nested tags.  For example, this works fine, we can read the href:
<A href="site.aspx">A Staffing Request Form</A>

But this does not, the editor inserts some nested formatting tags and we can cannot get the parent tag href any longer:
<A href="site.aspx"><FONT color=#0000ff><STRONG>A Staffing Request Form</STRONG></FONT></A>

We cannot ask our users to change the HTML, please advise on how to read the href here and change it, based on the sample we have downloaded (or something we have missed).

Thank you.
Peter Bulloch
Top achievements
Rank 1
 answered on 02 Sep 2013
1 answer
60 views
Hey there,

nothing big, but a small discrepancy I found reading your documentation at:
http://demos.telerik.com/aspnet-ajax/dock/examples/builtindockstatepersistence/defaultcs.aspx?#qsf-demo-source

The Text is as follows:
... This is achieved by setting the EnableStoreLayout property of RadDockLayout to true and selecting a storage type via the property LayoutStorageType. ...

Problem is as far as I can tell there are no attributes (v.2013.2.717.45)
EnableStoreLayout  => EnableLayoutPersistence
or
LayoutStorageType => LayoutPersistenceRepositoryType

The Sample code is correct in that matter.

I guess the description should reflect the changes.

Regards,
Kristoffer Witt
Slav
Telerik team
 answered on 02 Sep 2013
5 answers
1.4K+ views
We have a user control that contains the window definition for two modal popups.  The first modal popup is accessed from a link button on the user control.  The second popup is accessed from a linkbutton on the first modal popup.  The second modal popup then has all the tabindices set to -1 (disabled).  The work around is to have a function called when the second popup is shown that sets the tabstops back to what they should be for the second popup.

I noticed that there is code in the telerik window manager that sets the tab indices to -1 for all windows that are not the currently displayed popup.  It apparently does not set them back properly for the second popup in this scenario.

Has this been fixed since the October 2012 release?
Marin Bratanov
Telerik team
 answered on 02 Sep 2013
1 answer
80 views
I have this very weird issue.

Setup: I have jquery 1.10 reference in the master page of my form.  I'm writing a SharePoint 2010 visual web part that contains a RadAsyncUpload (2013 q2).  I also have Script References in my page to:
 <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />

Problem:  For whatever reason after the page is posted back, I get the error "addback is not a function" whenever I try to upload a file.  This issue happens in Firefox but not in IE (it works completely fine in IE).  Prior to the user posting the page, the upload works fine in FireFox, it's JUST after a postback has already occurred.

Again, this problem only exists in FireFox and not IE (I can't test it out in any other browsers because my current environment is locked down to just those tow browsers)

I know that the "addback" is an added function present in jquery 1.8 and later but I'm not sure how exactly how the 1.10 is used on the initial load of the page, but lost afterwards.  I believe that SharePoint defaults to jquery 1.7 something.

Any help would be greatly appreciated.  I hvae a VERY tight deadline so a prompt response would be so helpful!!
Hristo Valyavicharski
Telerik team
 answered on 02 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?