Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
115 views
My working environment is VS 2008, .Net 3.5, and RadControls for ASP .NET Q3 2007.

I have a grid displaying on my page.  each record has 30 columns.  I want the user to be able to edit these values in the edit popup box but I obviously don't want to try to display the grid w/ all 30 columns.  Right now I am setting the visibility of the columns in the PreRender which hides the unwanted columns when the grid is not in edit mode and shows all the columns in the edit popup.  Unfortunately, this also shows all the columns in the grid behind the edit window.  Is there someway to specifiy that I only want to change the visibility of the edit windows columns instead of the MasterTableView?
Martin
Telerik team
 answered on 04 Sep 2009
1 answer
234 views
I have a grid populated with data. The user can select a record and a second query populates data on a second tab page. The users need to be able to move forward and back in the main table data, while remaining on the second tab page. I need to have fields from the main table to pass to queries, so JS isn't the answer, so far as I know. I need a method to simply move the selection so that I can retrieve the new details.
Sebastian
Telerik team
 answered on 04 Sep 2009
1 answer
75 views
Hi,

In my current project, one of the web pages displays a read only grid as follows:
<telerik:RadGrid ID="rgDetails" CssClass="CustomGrid" AllowSorting="true" AutoGenerateColumns="false" GridLines="Vertical" OnNeedDataSource="rgDetails_NeedDataSource" runat="server"> 
    <ClientSettings> 
        <Scrolling UseStaticHeaders="true" /> 
    </ClientSettings> 
    <MasterTableView TableLayout="Fixed"> 
        <Columns> 
            <telerik:GridBoundColumn DataField="EffectiveDate"      DataFormatString="{0:dd/MM/yyyy}" DataType="System.DateTime" HeaderText="Effective Date"      HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Left" UniqueName="EffectiveDate" /> 
            <telerik:GridBoundColumn DataField="Duid"                                                 DataType="System.String"   HeaderText="Duid"                HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="18%" ItemStyle-HorizontalAlign="Left" UniqueName="Duid" /> 
            <telerik:GridBoundColumn DataField="MaxCapacity"        DataFormatString="{0:N0}"         DataType="System.Int32"    HeaderText="Maximum Capacity"    HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="18%" ItemStyle-HorizontalAlign="Left" UniqueName="MaxCapacity" /> 
            <telerik:GridBoundColumn DataField="RegisteredCapacity" DataFormatString="{0:N0}"         DataType="System.Int32"    HeaderText="Registered Capacity" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="18%" ItemStyle-HorizontalAlign="Left" UniqueName="RegisteredCapacity" /> 
            <telerik:GridBoundColumn DataField="GenunitCount"       DataFormatString="{0:N0}"         DataType="System.Int32"    HeaderText="Genunit Count"       HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="18%" ItemStyle-HorizontalAlign="Left" UniqueName="GenunitCount" /> 
            <telerik:GridBoundColumn DataField="WaterUtilisation"   DataFormatString="{0:N0}"         DataType="System.Int32"    HeaderText="Water Utilisation"   HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="18%" ItemStyle-HorizontalAlign="Left" UniqueName="WaterUtilisation" /> 
        </Columns> 
    </MasterTableView> 
</telerik:RadGrid>

The code behind is as follows:
protected void rgDetails_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) 
{ 
    this.rgDetails.DataSource = StationDeclaration.GelfStation.GelfStationDetails; 
} 

The grid is displayed correctly initially as follows:

However, when the brower is resized the contents of the grid disappears as follows:

I can't see what's happened with the code.

I have similar read only grids on the other web pages in the same application, but they don't have this problem.

Can you please help me?

Thanks & regards,
Herman Gouw
Skype: hermangouw


Pavlina
Telerik team
 answered on 04 Sep 2009
3 answers
173 views

Greetings,

I have a RadGrid that does not select multiple rows correctly when using the 'cntrl key.'   The first row can be selected using the mouse and this action will highlight the entire row.  However, when the next row is clicked by simultaneously holding the 'cntrl' key, only the * text *  of this next row (or subsequent rows) will also be selected instead of the row. 

There is a distinct difference between a row being selected/highlighted and the row's text being selected or highlighted. 

Below is the code I have to declare the RadGrid.  The most important property settings I could imagine are:

*  AllowMultiRowSelection="true"
* AllowRowSelect="True"

Outside of these two properties, is there something I am missing that keeps this from working right? 

Thanks!
-----------------------------------------------------------------------------------------------------------------------
<telerik:RadGrid ID="rgGrpNotice" runat="server"  AutoGenerateColumns="false"
        AllowMultiRowSelection="true"  BorderColor="Gray" BorderWidth="1px" >
        <ClientSettings AllowColumnHide="True">
                    <Selecting AllowRowSelect="True"></Selecting>
                    <Scrolling AllowScroll="true" SaveScrollPosition="true" />               
        </ClientSettings>
        <PagerStyle Mode="NextPrevAndNumeric" />
        <MasterTableView DataKeyNames="entitynotice_id,level" AllowMultiColumnSorting="True">
             <Columns>  

                                <telerik:GridBoundColumn SortExpression="EntityNotice_Id" HeaderText="EntityNotice_Id" HeaderButtonType="TextButton"
                                    DataField="EntityNotice_Id" UniqueName="EntityNotice_Id" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="level" HeaderText="level" HeaderButtonType="TextButton"
                                    DataField="level" Visible="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn UniqueName="GridCheckBoxColumn" HeaderText="Check" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15px"> 
                                    <ItemTemplate> 
                                        <asp:CheckBox ID="MaintCheckBox" runat="server" AutoPostBack="true" OnCheckedChanged="CheckChanged" />             
                                    </ItemTemplate> 
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridTemplateColumn> 
 
                                <telerik:GridBoundColumn SortExpression="Template Name" HeaderText="Template Name" HeaderButtonType="TextButton"
                                    DataField="Template Name">
                                </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn SortExpression="Owner" HeaderText="Owner" HeaderButtonType="TextButton"
                                    DataField="Owner" >
                                </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn SortExpression="Author" HeaderText="Author" HeaderButtonType="TextButton"
                                    DataField="Author">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="Created" HeaderText="Created" HeaderButtonType="TextButton"
                                    DataField="Created">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="Last Edit" HeaderText="Last Edit" HeaderButtonType="TextButton"
                                    DataField="Last Edit">
                                </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn SortExpression="Primary Relation" HeaderText="Primary Relation" HeaderButtonType="TextButton" DataField="Primary Relation" Visible="false">
                                </telerik:GridBoundColumn>
            </Columns>
    <RowIndicatorColumn>
    <HeaderStyle Width="20px"></HeaderStyle>
    </RowIndicatorColumn>

    <ExpandCollapseColumn>
    <HeaderStyle Width="20px"></HeaderStyle>
    </ExpandCollapseColumn>
    </MasterTableView>
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
        <EditItemStyle BorderColor="Gray" BorderWidth="1px" />
    </telerik:RadGrid>

-----------------------------------------------------------------------------------------------------------------------

Pavlina
Telerik team
 answered on 04 Sep 2009
3 answers
130 views
I want to open the live demos in the \Program Files\Telerik\RadControls for ASPNET AJAX Q1 2009\Live Demos.  However when I click on "StartExamples.exe", I have the following error message:

Server Error in '/RadControls_AspNetAjax' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 50: 			</codeSubDirectories>
Line 51: 			<assemblies>
Line 52: 				<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 53: 				<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Line 54: 				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

Source File: C:\Program Files\Telerik\RadControls for ASPNET AJAX Q1 2009\Live Demos\web.config    Line: 52


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053


Did I do something wrong?  My goal is to learn from this sample code and get to know the RadControl tool?  FYI: I already have the telerik traniner 2.3.2.12 installed.  However, I would like to see more complete project build installed of some part of the tool.  I kinda what to know the whole package can offer with other professional works.

Thanks




Vesko
Top achievements
Rank 2
 answered on 04 Sep 2009
14 answers
187 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
102 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
107 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
71 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
97 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?