Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
152 views
Hello,

i have Hierarchy rad grid in my application. as telerik site have eg for the same in demo. (Grid / Hierarchy with Templates ).

on click of expand image it will open another Hierarchy grid... i want to do multiple sorting for the same.
how i will do multiple sorting for nested grid. actually i am not aable to get grid id to bind it in NeedDataSource event.
 how i will do the sorting for the same.
please let me knw.
Iana Tsolova
Telerik team
 answered on 19 Apr 2010
1 answer
126 views
We've started using the RadControls DatePicker for a site we're developer, and we've noticed that the DatePicker is calculating the week number incorrectly. It's easiest to see the cause of this problem if you look back to the start of the year. According to the ISO standard for week numbers (available here: http://en.wikipedia.org/wiki/ISO_week_date#Calculating_the_week_number_of_a_given_date) the first week of the year is the week that contains the first Thursday. However in your calculation the first week starts with the week containing the 1st day of the year (it appears).

Subsequently, your week numbers are incorrect by 1. Additional information can also be found here: http://wapedia.mobi/en/ISO_week_date

We would appreciate this issue looked into and hopefully fixed, as it is resulting in inaccurate data entry for our staff who use the DatePicker to find out the current week number.
Dimo
Telerik team
 answered on 19 Apr 2010
3 answers
98 views
I need to disable and enable a field in a popup edit form depending on edit or insert mode.  The grid has a MasterTableView and One Detail Table.  When I expand the MasterTableView, the Detail Table has a command Item Insert link along with edit and delete buttons.  I tried to do this in the RadGrid1_ItemCommand routine when the command is "InitInsert" but I cannot get a handle on the field I need.  How can I do this?

protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
        { 
            if ("Detail".Equals(e.Item.OwnerTableView.Name)) 
            { 
                 
                if ("InitInsert".Equals(e.CommandName)) 
                {                     
                    (e.Item as GridEditableItem)["PackageName"].Enabled = true
                }                 
            } 
        } 



        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"  
            GridLines="None"  AutoGenerateColumns="False"  
             OnInsertCommand="RadGrid1_InsertCommand" 
             OnItemUpdate="RadGrid1_UpdateCommand"  
             OnItemCommand="RadGrid1_ItemCommand"
<HeaderContextMenu EnableTheming="True"
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</HeaderContextMenu> 
 
<MasterTableView datasourceid="SqlDataSource1" DataKeyNames="Group_Name"  
                AllowFilteringByColumn="True"  Name="Header"
    <DetailTables> 
        <telerik:GridTableView runat="server" DataSourceID="SqlDataSource2" 
             DataKeyNames="Group_Name" CommandItemDisplay="Top" Name="Detail"  
            AllowAutomaticUpdates="False" EditMode="PopUp"
            <ParentTableRelation> 
               <telerik:GridRelationFields DetailKeyField="Group_Name" MasterKeyField="Group_Name" /> 
            </ParentTableRelation>   
            <CommandItemSettings AddNewRecordImageUrl="\Images\AddRecord.gif" /> 
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridEditCommandColumn> 
                </telerik:GridEditCommandColumn> 
                <telerik:GridButtonColumn CommandName="Delete" Text="Delete"  
                    UniqueName="column3"
                </telerik:GridButtonColumn> 
                <telerik:GridBoundColumn DataField="Package_Name" UniqueName="PackageName" HeaderText="Package Name"  
                    Visible="True" ReadOnly="True"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Group_Name" UniqueName="column2"  
                    Visible="False" Display="False" ReadOnly="True"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="ConnectionString"  
                    UniqueName="ConnectionString" HeaderText="Connection String"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="FileId" UniqueName="FileId" Visible="False"  
                    Display="False" ReadOnly="True"
                </telerik:GridBoundColumn> 
                <telerik:GridDropDownColumn DataField="Active" ForceExtractValue="InEditMode"  
                    HeaderText="Active" UniqueName="Active" DataSourceID="SqlDataSource3" ListTextField="Active"  
                    ListValueField="Active"
                </telerik:GridDropDownColumn> 
                <telerik:GridDropDownColumn DataField="InProcess" ForceExtractValue="InEditMode"  
                    HeaderText="In Process" UniqueName="InProcess" DataSourceID="SqlDataSource3" ListTextField="Active"  
                    ListValueField="Active"
                </telerik:GridDropDownColumn> 
            </Columns> 
            <EditFormSettings CaptionFormatString="test"
                <EditColumn UniqueName="EditCommandColumn1"
                </EditColumn> 
            </EditFormSettings> 
        </telerik:GridTableView> 
    </DetailTables> 
    <ParentTableRelation> 
        <telerik:GridRelationFields DetailKeyField="Group_Name" /> 
    </ParentTableRelation> 
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn visible="True"
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
    <Columns> 
        <telerik:GridBoundColumn DataField="Application_Name" UniqueName="column1"  
            HeaderText="Application Name"
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Group_Name" UniqueName="Group_Name"  
            HeaderText="Group Name"
        </telerik:GridBoundColumn> 
    </Columns> 
</MasterTableView> 
 
<FilterMenu EnableTheming="True"
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</FilterMenu> 
        </telerik:RadGrid> 
Eric Turner
Top achievements
Rank 1
 answered on 19 Apr 2010
1 answer
50 views



Maria Ilieva
Telerik team
 answered on 19 Apr 2010
2 answers
79 views
I have a problem with RadNumericTextBox.

They work fine in Chrome, Firefox and IE in IE8 mode, but when IE runs in IE7 or compatibility mode - the texboxes disappears after all scripts are loaded.

They are visible during load but as soon as the page finish, the boxes disappear.
I don't manipulate them in in script at all, so I don't understand the problem. If I set ShowSpinButtons="False", then everything works fine.

The textbox looks like this:
<telerik:RadNumericTextBox ID="RadNumericTextBoxBedroomsFrom" runat="server" Value="0" MinValue="0" MaxValue="15" DataType="System.Int32" NumberFormat-DecimalDigits="0" Width="60px" ShowSpinButtons="True" ShowButton="False" IncrementSettings-Step="1" /> 

Kind regards
Claus
Dimo
Telerik team
 answered on 19 Apr 2010
3 answers
139 views

Hi,

I am using RadWindow to show details of an item. I have image on parent page and using onclick I call the javascript function below. Image is added to the page in code behind like this:

sb.Append(string.Format("<img title=\"Details\" src=\"images/details.png\" onclick=\"ShowWindow('SessionDetails.aspx?id={0}');return false;\"/>&nbsp;", pid));

 

 var oldUrl;
        function ShowWindow(url) {
            var oWnd = $find("<%=rwDialog.ClientID%>");
            oWnd.setUrl(url);
            oWnd.setSize(750, 480);
            oWnd.show();
            if (oldUrl == url) {
                oWnd.reload();
            }
            oldUrl = url;
        }

If I click on image to see details, it works fine. Now if I click on the same item again (without clicking any other item), it show window with the same page but without post back. Thats why I used oldUrl in script above. If page is different from last click, it only sets the url. But I used clicked on the same item, reload will give them fresh page. Problem is that that it gives browser message that page will reload.

Another thing I noticed is that it happens only if I use a close button in my child page. If I use RadWindow's default close button to close the window, I dont get that reload warning. Any ideas how can i avoid that reload message?

This is how I close child window

private void CloseWithoutParentRefresh()
    {
        string script = string.Format("<script>CloseOnReload()</" + "script>");
        ClientScript.RegisterStartupScript(this.GetType(), "CloseOnReload", script);
    }

  //GetRadWindow obtains a reference to the hosting RadWindow"
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow)
                oWindow = window.radWindow;
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;
            return oWindow;
        }
        function CloseOnReload(url) {
            GetRadWindow().close();
        }

Georgi Tunev
Telerik team
 answered on 19 Apr 2010
6 answers
371 views
Hi,

I am trying to get keyboard access to work with the calendar popup with the RadDatePicker.  When I tab to the calendar button and hit enter, the calendar pops up as expected, but further tabbing just moves the focus to the next control on the page.  The arrow keys don't work either.  I see in the documentation that this should work.  Am I doing something wrong?  Here is my code:

 

<telerik:RadDatePicker ID="dtpAutoCloseDate" style="font-size:100%"

 

 

ToolTip="Auto-Close Date (MM/DD/YYYY)" runat="server"

 

 

onselecteddatechanged="RadDatePicker1_SelectedDateChanged"

 

 

Culture="English (United States)" Calendar-EnableNavigation="true" >

 

 

 

<DateInput runat="server">

 

 

<ClientEvents OnError="DateTimeError" />

 

 

</DateInput>

 

 

<Calendar runat="server" ></Calendar>

 

 

<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>

 

 

</telerik:RadDatePicker>

Thank you,

Chris

 

Iana Tsolova
Telerik team
 answered on 19 Apr 2010
8 answers
204 views
Hi,
I have a RADDatePicker inside Update Panel.
I am showing javascript popup message (javascript Confirm message Box with OK/cancel button) on SAVE button Click by using RegisterClientScriptBlock in my .net application.
When I press SAVE Button Popup message is displayed but the Value in the DatePicker disappears. Once either OK or Cancel button is pressed the DOB again appears in the page.

If I place DatePicker outside the UpdatePanel it is working fine.
but I cannot put DatePicker outside the UpdatePanel in my application.

Please provide the solution ASAP.
Minakshi
Maria Ilieva
Telerik team
 answered on 19 Apr 2010
1 answer
60 views
Hi to all,
i'm testing telerik controls and they are fantastic !! (the best of all i tested in the last days)
But i've a problem with datagrid height. I used panes to align my usercontrols (and my radgrid is inside a usercontrol) but it cannot fill the pane height. Playing with firebug in html code i see this structure:

<div id="RAD_SPLITTER_PANE_CONTENT_RadPane2" ... > 
<div> other my customs usercontrol elements </div> 
<div id="CustomersGridControl1_CustomersGridControl1$RadGridCustomersPanel" ... > 
<div id="CustomersGridControl1_RadGridCustomer" ...> 
   OTHER GRID ELEMENTS 
</div> 
</div> 
</div> 




The problem is inside div "CustomersGridControl1_CustomersGridControl1$RadGridCustomersPanel" (i suppose it's generated from radgrid control because it doesn't exist in my code). With firebug i setted the style height="100%" and all work fine. But i don't know how style it from aspx code.

Sorry if it's a stupid question.. but this is my first experience with terelik controls and also with asp.net (i used php many years ago and .net only for desktop applications). Probabilly i'm loosing my self in a "glass of water".

P.S.: i'm using latest telerik trials controls with visual studio express 2010

Regards

Sandro
Dimo
Telerik team
 answered on 19 Apr 2010
1 answer
359 views

Hi Telerik Team,

I am using a RadDate picker with RadMasked TextBox 

becoz i am unable to use mask in date picker. Updating textbox after 

selecting date in calendar and updating calendar after entering date in 

textbox. And applying a style="display:none" tag to DateInput of Datepicker 

to disable the textbox of datepicker. But it is appearing for 2sec at loading 

time then disappearing and unable to decrease the space between masked 

textbox and datepicker (which displays only calander picker). I hope you 

understand my problem and revert me back with a good solution.


Thanks and Regards
--------------------------
K RAMU
Maria Ilieva
Telerik team
 answered on 19 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?