Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
62 views
function FormatSelectedDate(picker)
{
  var date = picker.get_selectedDate();
  var dateInput = picker.get_dateInput();
  var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());
   return formattedDate;
}

from my side i can not see the out put of above function. So please let me know what kind of formatted date above function will return. Also please let me know how to add a extra date to the above returned date.

I am using the above function to get the formatted date in below functionality.
here i need to Add a extra date to toDate variable so that i can filter to get the selected date data also by using " tableView.filter('" + this.UniqueName + @"', fromDate + ' ' + toDate + 1 , 'Between');"
function " + this.UniqueName + @"ToDateSelected(sender,args) {
                                                var tableView = $find('" + this.Owner.OwnerGrid.MasterTableView.ClientID + @"');
                                                var fromPicker = $find('" + parentClientID.Substring( 0, parentClientID.LastIndexOf( "_" ) + 1 ) + this.UniqueName + @"FromPicker');
                                                var fromDate = FormatSelectedDate(fromPicker);
                                                var toDate = FormatSelectedDate(sender);
                                                if ( fromDate == '')
                                                {
                                                    tableView.filter('" + this.UniqueName + @"', toDate , 'LessThanOrEqualTo');
                                                }
                                                else
                                                {
                                                    
                                                    tableView.filter('" + this.UniqueName + @"', fromDate + ' ' + toDate + 1 , 'Between');
                                                }}
Daniel
Telerik team
 answered on 16 Jun 2011
4 answers
98 views
Hi All

I am trying to set the border properties of a Rad Window as below:

<

 

 

telerik:RadWindow ID="RadWindow5" runat="server" Title="Details" Height

="470px"

 

 

 

 

Width="650px" Left="150px" ReloadOnShow="true" Modal="true" VisibleStatusbar

="False"

 

 

 

 

Animation="Resize" ShowContentDuringLoad="false" VisibleTitlebar="false" CssClass="borRad" BorderStyle="Dashed" BorderWidth="1" BorderColor

="#FF3300">

 

 

 

 

</telerik:RadWindow>

However the border just defaults to standard?
Any ideas what i am doing wrong please?

Regards

Cush

Cush
Top achievements
Rank 1
 answered on 16 Jun 2011
1 answer
82 views
Hi,

Maybe this case doesn't occur to often, but if localizing the calendar texts and setting any text to "</script>", there will be a script error.

Example:
<telerik:RadCalendar ID="rc1" runat="server">
            <FastNavigationSettings OkButtonCaption="</script>">
            </FastNavigationSettings>
        </telerik:RadCalendar>

The only thing I can see that may be wrong in the output is that the slash should be replaced with "\/". The funny thing is that if typing any other text than "script" seems ok. Both IE9 and Firefox 4 reports this scripting error:
unterminated string literal

Regards
Caesar
Pavel
Telerik team
 answered on 16 Jun 2011
2 answers
154 views
Hello,

I'm struggling with the individual validation of my tabs. I browser the internet and the telerikforums but i wom't get it to work.

I have the following tabstrip :

<telerik:RadTabStrip ID="tabManagement" runat="server" MultiPageID="mpManagement"
                SelectedIndex="0" CausesValidation="true" OnClientTabSelected="UpdateValidationGroup">
                <Tabs>
                    <telerik:RadTab Text="Algemeen" Value="Algemeen">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Contactpersoon" Value="Contactpersoon">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Adresgegevens" Value="Adresgegevens">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Openingstijden" Value="Openingstijden">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Winkelpagina" Value="Winkelpagina">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Instellingen webshop" Value="InstellingenWebshop">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Google" Value="Google">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Statistieken" Value="Statistieken">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Account" Value="Account">
                    </telerik:RadTab>
                </Tabs>
 </telerik:RadTabStrip>

On the clientevent TabSelected I run the script:
function UpdateValidationGroup(tabStrip, eventArgs) {

        var selectedTab = tabStrip.get_selectedTab();
        if (selectedTab != null) {
            tabStrip.ValidationGroup = selectedTab.get_value();
        }
    } 

I use the Value-property of the selectedtab to set the validationgroup. That works fine. The validationgroup of validationcontrols in the RadPageViews have the same name as the Value-property of the selected tab. In my tab itself the validation fires but I can still navigate to another tab even when validation is false. What I want is that I cannot navigate to another tab as long as one of my validators in my selected tab is false.

When I hardcode the validationgroup of my TabStrip then it works fine.

Can anyone tell me what I'm doing wrong.

Thx

Patrick
Patrick
Top achievements
Rank 1
 answered on 16 Jun 2011
1 answer
53 views

Hi,
i am Srinivas

In my project i have a RadGrid View for Displaying a Backend Table Data and also modify data in that RadGrid. Here my problem in RadGrid is i have a number of page in Radgrid if i modify the data in one page and then go to next page then automatically Radgrid  refresh the data and clear  all the modification in that page..

here i am used NeedDataSource  for bind the Radgrid. when every time i can change my Radgrid page the arithmetically refresh the page.

Please help me how can i hold these modification and how can i change the page in Radgrid page.

the following is the screenshots for RadGrid operations...  

  In my first page some operations are done.. and then go to second page and do some operations in that page after i return to first page all the modifications are cleared.. 

Please help me....

Thanks

D.Srinivasa
Princy
Top achievements
Rank 2
 answered on 16 Jun 2011
11 answers
114 views

Hi,

 

Please find attached screen shots. Here we are using a Telerik Rad Editor web part. The attached screens shots, one from design view and another is published view. In both the cases alignment of the content differs.

 

Request you to please provide the resolution steps.

Stanimir
Telerik team
 answered on 16 Jun 2011
1 answer
128 views
The GridDropDownColumn is working perfectly other than displaying the values from the database.  The Dropdownlist is populated in edit mode and it inserts to the database just fine, but when i just try to display that info from the database in the column it doesn't show anything.

Grid:
<telerik:RadGrid ID="rg_Collateral" runat="server" Width="450px" AllowSorting="true"
                                                    GridLines="Both" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"
                                                    PageSize="5" AllowPaging="true" AutoGenerateColumns="false" Skin="Simple" DataSourceID="collateral_Entity"
                                                    OnItemDataBound="rg_Collateral_ItemDataBound" Font-Names="Calibri">
                                                    <MasterTableView Width="100%" CommandItemDisplay="Top">
                                                        <Columns>
                                                            <telerik:GridBoundColumn DataField="USERID" HeaderText="User ID" UniqueName="userid"
                                                                ReadOnly="true" Display="false" />
                                                            <telerik:GridBoundColumn DataField="CONUM" HeaderText="CoNum" UniqueName="conum"
                                                                ReadOnly="true" Display="false" />
                                                            <telerik:GridBoundColumn DataField="DATEENTERED" HeaderText="Date Ent." UniqueName="dateEntered"
                                                                ReadOnly="true" DataFormatString="{0:MM/dd/yyyy}" />
                                                            <telerik:GridDateTimeColumn DataField="RELEASED" HeaderText="Date Rel." UniqueName="dateReleased"
                                                                DataFormatString="{0:MM/dd/yyyy}" />
                                                            <telerik:GridDropDownColumn DataField="COLLATERALTYPE" HeaderText="Type" UniqueName="type"
                                                                DropDownControlType="DropDownList" />
                                                            <telerik:GridNumericColumn DataField="COLLATERALAMT" HeaderText="Collateralamt" UniqueName="collateralamt" />
                                                            <telerik:GridDateTimeColumn DataField="EXPDATE" HeaderText="Date Exp." UniqueName="dateExpired"
                                                                DataFormatString="{0:MM/dd/yyyy}" />
                                                            <telerik:GridBoundColumn DataField="AUTORENEW" HeaderText="Auto Ren." UniqueName="autoRenew"
                                                                Display="false" />
                                                            <telerik:GridBoundColumn DataField="BONDNUM" HeaderText="bond #" UniqueName="bondNumber"
                                                                ReadOnly="true" />
                                                            <telerik:GridBoundColumn DataField="DESCRIPTION" HeaderText="Desc." UniqueName="description" />
                                                        </Columns>
                                                    </MasterTableView>
                                                    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                                                </telerik:RadGrid>

ItemDataBound
protected void rg_Collateral_ItemDataBound(object sender, GridItemEventArgs e)
        {
            hdBondnum.Value = txt_BondNumber.Text;
            hdConum.Value = txt_AccountNumber.Text;
            hduserid.Value = Membership.GetUser().ToString();
            if ((e.Item is GridEditFormInsertItem) && (e.Item.OwnerTableView.IsItemInserted))
            {
                GridEditFormInsertItem insertItem = (GridEditFormInsertItem)e.Item;
                TextBox txtbx = (TextBox)insertItem["userid"].Controls[0];
                TextBox txtbx2 = (TextBox)insertItem["conum"].Controls[0];
                TextBox txtbx3 = (TextBox)insertItem["dateEntered"].Controls[0];
                TextBox txtbx4 = (TextBox)insertItem["bondNumber"].Controls[0];
 
                GridEditableItem editItem = e.Item as GridEditableItem; 
                GridEditManager editMgr = editItem.EditManager;
                GridDropDownListColumnEditor colEditor = editMgr.GetColumnEditor("type") as GridDropDownListColumnEditor;
                string s = colEditor.SelectedValue;
                colEditor.DataSource = UtilityBond.getCollateralType();
                colEditor.DataBind(); 
 
                txtbx.Text = hduserid.Value;
                txtbx2.Text = hdConum.Value;
                txtbx3.Text = String.Format("{0:M/d/yyyy}", DateTime.Today.Date);
                txtbx4.Text = hdBondnum.Value;
            }
        }

The CollateralType is the only column that is not displaying any data in the grid.
Tsvetoslav
Telerik team
 answered on 16 Jun 2011
2 answers
166 views
I have a page that is adding the rotator control after an async postback.
The problem is that the rotator's styles are not loading properly  when I do this.
For instance, the rrItemsList height & width are huge numbers causing it to continuously scroll to empty pages.
If I add the control and a regular postback, then the styles are fine.
Shonda
Top achievements
Rank 1
 answered on 16 Jun 2011
2 answers
103 views
Does anyone know why radgrid export to CSV is trimming the trailing spaces from the CSV output and how to work around this issue?


grdExport.ExportSettings.ExportOnlyData = true;
grdExport.ExportSettings.IgnorePaging = true;
grdExport.ExportSettings.OpenInNewWindow = true;
grdExport.ExportSettings.FileName = DateTime.Now.ToString("yyyyMMdd") + filename;
grdExport.MasterTableView.ExportToCSV();
John Cruz
Top achievements
Rank 1
 answered on 15 Jun 2011
1 answer
53 views
Hey guys, did a search of the forums and haven't found exactly what I needed so I figured I would ask here.

I am using databinding to hydrate my radgrid and everything was working fine.  The problem started when I wanted to sort and filter the grid.

I realized quickly the need for a NeedDataSource sub and put it to use.  However when I attempted to clean up the code and put my logic in its own sub, I run into problems.  If I throw the code from the hydrategrid sub into the NeedDataSource sub, as well as the button click sub the page sorts fine.

If I break the code into the HydrateGrid sub then when I hit the sort button or apply a filter, the grid shows empty.

I have simplified the HydrateGrid sub but here is my code:

Protected Sub HydrateGrid(ByVal bindit As Boolean)
Try
radgrdResults.DataSource = searchvalues.Fetch(gd)
                If bindit = True Then
                    radgrdResults.DataBind()
                End If
            Catch ex As Exception
                Throw ex
            End Try
 
        End Sub
 
Protected Sub searchButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles searchButton.Click
            Try
                ' hydrate grid with data
                HydrateGrid(True)
            Catch ex As Exception
                Throw ex
            End Try
             
        End Sub
        Protected Sub radgrdResults_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs)
            Try
                ' Hydrate grid with data but don't bind
                HydrateGrid(False)
            Catch ex As Exception
                Throw ex
            End Try
 
        End Sub

John
Top achievements
Rank 1
 answered on 15 Jun 2011
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
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
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?