Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
170 views
I'm running into an odd issue parsing dates when I set the culture. Here's the repro steps
1. Create a blank Telerik Web Application
2. On the Default.aspx page drop a RadScriptManager and a RadDatePicker
3. In the code behind, add the following method:

protected override void InitializeCulture() 
    base.InitializeCulture(); 
 
    var culture = CultureInfo.CurrentCulture.Clone() as CultureInfo; 
    if ( culture == null ) 
        return
 
    culture.DateTimeFormat.ShortDatePattern = "dd-MMM-yyyy"
 
    this.Culture = culture.ToString(); 
    this.UICulture = culture.ToString(); 
    Thread.CurrentThread.CurrentCulture = culture; 
    Thread.CurrentThread.CurrentUICulture = culture; 
 


Notice that all I'm doing is cloning the existing Culture (which in my case happens to be en-US) and changing the default ShortDateTimePattern.

The effect of doing this is that the control will parse dates as if they are European dates instead of US dates. For example, entering 05012009 will result in 05-Jan-2009 instead of 01-May-2009.

Georgi Krustev
Telerik team
 answered on 04 Sep 2009
1 answer
97 views
Hello,

I'm trying to do something that I think is fairly simple but I can't seem to get working.  I have a RadMenu that I am adding items to dynamically client side.  I need the click of the menu item to navigate to another webpage.  I am using master pages.  I set the NavigateUrl property but, when the menu item displays, the status bar shows "#" instead of the page I'm trying to set.  I've tried setting both the NavigateUrl and the PostbackUrl and neither of these send me to the page I'm trying to open.  How do I make a rad manu item redirect to another page?

Thanks,
Dale
Paul
Telerik team
 answered on 04 Sep 2009
6 answers
99 views
I am using a radtreeview, and in some cases where there are no spaces in the node values, the text is being forced to wrap to the second line while nothing is appearing on the first line.

So if I have a value like Store\Employee\Customer, it will have the first line be blank and move the value to the second line similar to below

-
 Store\Employee\Customer

where it should look like
-Store\Employee\Customer

I have used a combination of white-space, overflow, and display styles but nothing seems to help.

Any help would be appreciated.

Thanks

Aaron
Aaron
Top achievements
Rank 1
 answered on 04 Sep 2009
1 answer
67 views
Hi,

i am searching for a way to change the style of the insert and cancel button in an autogenerated FormTemplate.

I use GridTemplateColumns like shown below
<telerik:GridTemplateColumn UniqueName="StartDate" HeaderText="Start Date">  
<ItemTemplate> 
   <asp:Label id="lblStartDate" Width="75" runat="server">  
   <%# DataBinder.Eval(Container.DataItem, "StartDate","{0:dd.MM.yyyy}")%> 
   </asp:Label> 
</ItemTemplate> 
<EditItemTemplate> 
<telerik:RadDatePicker ID="radPickStartDate" Width="300" runat="server"   
Calendar-AutoPostBack="False" Culture="English (United Kingdom)"   
 ToolTip="Please open the calendar popup." DateInput eadOnly="True">                                                                  </telerik:RadDatePicker>                                      
</EditItemTemplate> 
</telerik:GridTemplateColumn> 

Is it really necessary to develop all my TemplateColumns into a TemplateEditform - just to change the style of "insert and cancel" Buttons?
Just want to make the LinkButtons to ImageButtons with custom images on the right hand side.

Some ideas out there?

Thanks
Lars
Mira
Telerik team
 answered on 04 Sep 2009
1 answer
92 views
Hello,
I am currently evaluating RadGrid and am looking towards some Gurus for some help

I have a created a radgrid which takes data from a table and displays it in rows. One of the columns is a  GridHyperLinkColumn which is also the DataKeyName Column

ASPX Code
<MasterTableView EditMode=InPlace DataKeyNames="UniqueId">
                         <Columns>
                             <telerik:GridBoundColumn DataField="ContractNo"
                                 HeaderText="Contract Number" UniqueName="ContractNo">
                                 <FooterStyle Font-Bold="True" />
                                 <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                                     Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                                     Wrap="True" />
                                 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                                     Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                                     Wrap="True" />
                             </telerik:GridBoundColumn>
                             <telerik:GridHyperLinkColumn DataNavigateUrlFields="UniqueId,RevisionNo"
                                 DataNavigateUrlFormatString="URL"~/UpdateDetail.aspx?UniqueId={0}&amp;RevisionNo={1}&amp;"
                                 DataTextField="UniqueId" HeaderText="Unique ID" UniqueName="UniqueId">
                                 <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                                     Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                                     Wrap="True" />
                                 <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"
                                     Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
                                     Wrap="True" />
                             </telerik:GridHyperLinkColumn>
          </Columns>
</MasterTableView>

.CS Code

protected

 

void gvrgPendingWorkflow_UpdateCommand(object source, GridCommandEventArgs e)

 

{

 

GridEditableItem editedItem = e.Item as GridEditableItem;

 

 

//Get the primary key value using the DataKeyValue.

 

 

string sUniqueID = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["UniqueID"].ToString();

 

 


//Access the textbox from the edit form template and store the values in string variables.

 

 

string sContractNo = (editedItem["ContractNo"].Controls[0] as TextBox).Text;

 

 

string sRevisionNo = (editedItem["RevisionNo"].Controls[0] as TextBox).Text;

 

}

I am getting the following error when i am trying to read sUniqueID 
"Object reference not set to an instance of an object"

However if I comment that single line I am able to read the updated values entered for sContractNo and sRevisionNo

Please advise.

Your help is much appreciated.

Regards,
Kaushik
Pavlina
Telerik team
 answered on 04 Sep 2009
1 answer
84 views
Hi,

I am using self-referencing hierarchy grid on aspx page. I have added one  method 

OnRowContextMenu client side event. Now when user right click on

 

 any data row i am unable to check whether user has selected some row in grid or not in client side code. I also want to select some row using client side code in self-referencing hierarchy grid.

Your help would be appriciable.

Regards
Amit

Sebastian
Telerik team
 answered on 04 Sep 2009
5 answers
150 views
Hi, I've created a rad window to use as a modal pop up to stop the user from clicking on controls until some processing has finished. It works as expected in Internet Explorer 7, But in Firefox 3.5.2 the target page isn't rendered. The modal window shows up, but without any content. Also, in Google Chrome 2.0.172.43 the modal window doesn't even show except for a white rectangle with no skinning or content. This is how I'm creating the modal window.

<script type="text/javascript">
function ShowProcessingDialog(){
window.radopen("ProcessingPage.aspx", "modalWindow");
}
function ShowAnotherProcessingDialog(){
window.radopen("AnotherProcessingPage.aspx", "modalWindow");
}
</script>

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
            <Windows>
                <telerik:RadWindow ID="modalWindow" runat="server" Behaviors="None" Height="115px"
                    Width="450px" InitialBehaviors="None" Modal="true" VisibleStatusbar="false" VisibleTitlebar="false" 
    Skin="Office2007">
         </telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>

    <table align="center">
        <tr>
            <td align="left">
                <asp:Button ID="btnProcess1" runat="server" Text="Process" UseSubmitBehavior="true"
                    CssClass="button" OnClick="ProcessSomething" OnClientClick="javascript:return ShowProcessingDialog();" />
            </td>
            <td align="left">
                <asp:Button ID="btnProcess2" runat="server" Text="Process Again" UseSubmitBehavior="true"
                    CssClass="button" OnClick="ProcessSomethingElse" OnClientClick="javascript:return ShowAnotherProcessingDialog();" />
            </td>
        </tr>
    </table>

Any help would be greatly appreciated.
Georgi Tunev
Telerik team
 answered on 04 Sep 2009
1 answer
86 views
Hi All
is there any chance to set DropDownWidth on maximum item width size? i tried to set it OnItemDataBound event where i measure string using GDI library but the FontInfo of combobox is not set, i mean values (like font name or size) are empty, and it measure with default Font settings, maybe is there simplest way to do it?
thanks
Veselin Vasilev
Telerik team
 answered on 04 Sep 2009
5 answers
149 views
When following the RadEditor as a Text demo (http://demos.telerik.com/aspnet-ajax/editor/examples/editorastextbox/defaultcs.aspx) I notice a peculiar 'bug'.

Load the page.
Click on the area inside the blue border (the Resume Field).
The blue border at the bottom disappears and doesn't reappear.

Is there a work-around for this?

I'm running IE8.0.6001.18702CO.
Rumen
Telerik team
 answered on 04 Sep 2009
1 answer
167 views
Hi,

When trying to save a RadBinaryImage the "Save as" dialog box always show "Telerik_Web_UI_..." . Is there anyway i can set some string which will be the name assigned to the image as default during save?

Thanks
Debasish.
Sebastian
Telerik team
 answered on 04 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?