Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
90 views
Could someone possibly help me.
I have an aspx page that I need to produce Javascript on once a search is performed on data.
I have an ajax manager and have set the controls to update, however, I cannot get this routine on the server side to create the javascript on the page. If I do not use the ajax manager, it works fine.
This is the string that I need to write to the page (return), once a gridview updates.

myStringScript = "<script type=""text/javascript"">" & vbCrLf & _  
                 "<!--" & vbCrLf & _  
                 String.Concat("var CheckBoxIDs =  new Array("String.Join(",", ArrayValuesAttend.ToArray()), ");") & vbCrLf & _  
                 "// -->" & vbCrLf & _  
                 "</script>" 

I have tried the following methods with no luck:

CheckBoxIDsArrayAttend.Text = myStringScript 
(CheckBoxIDsArrayAttend is a literal control, and is also being updated by the ajax manager.)
-------------------------
TryCast(RadCodeBlock1.Controls(0), LiteralControl).Text = myStringScript
--------------------------
Page.ClientScript.RegisterStartupScript(Page.GetType(), "scr", myStringScript)

 

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

None of these work. The Javascript just does not show up on the page after update (I can look for it when I view source on the page)
Any Ideas?
Thanks for your help.

Mira
Telerik team
 answered on 04 Sep 2009
1 answer
112 views
Hi. I think I've tried everything, and I can't get rid of it. I want detail tables, but not the expandcollapsecolumn. This is what I have so far:

In the declaration:
<MasterTableView> 
    ... 
    <ExpandCollapseColumn Visible="false" Display="false" /> 
    ... 
</MasterTableView> 

In code:
protected void Roles_PreRender( object sender, EventArgs e ) 
    (RoleGrid.MasterTableView.GetColumn( "ExpandColumn" ) as GridExpandColumn).Visible = false
    RoleGrid.MasterTableView.Columns[0].Visible = false
 
protected void RoleGrid_ItemCreated( object sender, GridItemEventArgs e ) 
    if( e.Item is GridDataItem ) 
    { 
        (e.Item as GridDataItem)["ExpandColumn"].Visible = false
    } 
}  

With all this, I still end up with the ExpandColumn header showing up. The actual column cells are hidden, which causes all my other cells to be shifted left, thus getting their data in a row one left of their header... does it really have to be this hard to get rid of that thing?





Schlurk
Top achievements
Rank 2
 answered on 04 Sep 2009
1 answer
103 views
When we switched from Q1 to Q2 SP1 we lost the second group of a radgrid that had two groups - one that was not collapsed and one that was.  We set the collapse in the code behind.  Now the second group does not show up at all.


Pavlina
Telerik team
 answered on 04 Sep 2009
2 answers
234 views
Hi,
I have product that use old version of Terelik controls , is it possible mixing different versions in the same application?
If it's possibe how would I do that.
Igor.
Igor
Top achievements
Rank 1
 answered on 04 Sep 2009
2 answers
129 views
I need to programmatically change the selected tab without causing the OnClientTabSelected event to fire.  Using both tab.select(); and tab.set_selected(true); is firing my event.
bozojoe
Top achievements
Rank 1
 answered on 04 Sep 2009
1 answer
113 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
230 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
65 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
162 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
122 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
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?