Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
60 views
Hello,

situation:
A masterPage M with a dynamic usercontrol C1 containing a dynamic usercontrol C1_1 containing a radcombobox
request from button on Masterpage updates panel around usercontrol C1, all controls on C1_1 are updated correctly except telerik controls for example the radcombobox.

If not clear I have files to demonstrate but how to upload?

sincerely,
Sofim-team (Belgium)
Atanas Korchev
Telerik team
 answered on 13 Nov 2008
3 answers
253 views
Hi,

I have the following code for my RadGrid
 
The text Wrap in the Property "GroupHeaderItemStyle-Wrap" does not seem to work.

I tried 
<GroupHeaderItemStyle Wrap="true" />
and also
<MasterTableView ..... GroupHeaderItemStyle-Wrap="true".........>

But both these do not seem to work.

The grouping column header using the column "QUESTION" is not wrapping.
But the item column "ANSWER" under the grouped column "QUESTION" wraps fine.
Cannot figure out what might be the issue.

Can you help me out.

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

 

<telerik:RadGrid ID="RadGrid1" runat="server" Width="98%" Skin="Hay" PageSize="08" AllowSorting="True"

 

 

AllowMultiRowSelection="True" AllowPaging="True" ShowGroupPanel="false" GridLines="None"

 

 

AutoGenerateColumns="False" Height="360px" ItemStyle-Height="8" BorderWidth="4"

 

 

BorderColor="#5A8D4A" ShowStatusBar="true" ShowFooter="false" >

 

 

 

<PagerStyle Mode ="NextPrevNumericAndAdvanced" />

 

 

<HeaderStyle Font-Bold="true" />

 

 

<MasterTableView DataKeyNames="ID" DataMember="MyRegistration" AllowMultiColumnSorting="True"

 

 

Width="99%" TableLayout="Fixed" ShowFooter="false"

 

 

GroupHeaderItemStyle-Wrap="true" PagerStyle-Wrap="true"

 

 

GroupHeaderItemStyle-HorizontalAlign="Left" GroupHeaderItemStyle-Font-Bold="true"

 

 

GroupHeaderItemStyle-ForeColor="Black" GroupHeaderItemStyle-Font-Size="Small"

 

 

ItemStyle-ForeColor="Black" AlternatingItemStyle-ForeColor ="Black"

 

 

AutoGenerateColumns ="false"

 

 

HeaderStyle-Font-Size="Larger" HeaderStyle-Font-Bold="true" HeaderStyle-ForeColor="White"

 

 

HeaderStyle-BackColor="#5A8D4A" HeaderStyle-Height="20" HeaderStyle-VerticalAlign="Top"

 

 

HeaderStyle-HorizontalAlign="center" >

 

 

<GroupByExpressions>

 

 

<telerik:GridGroupByExpression>

 

 

<SelectFields>

 

 

<telerik:GridGroupByField FieldAlias="Question" FieldName="QUESTION" FormatString="" HeaderText="">

 

 

</telerik:GridGroupByField>

 

 

</SelectFields>

 

 

<GroupByFields>

 

 

<telerik:GridGroupByField FieldAlias="QUESTION" SortOrder="Ascending" FieldName="QUESTION" FormatString="" HeaderText="">

 

 

</telerik:GridGroupByField>

 

 

</GroupByFields>

 

 

</telerik:GridGroupByExpression>

 

 

</GroupByExpressions>

 

 

<Columns>

 

 

<telerik:GridBoundColumn UniqueName="QUESTION" SortExpression="QUESTION" HeaderText="Question"

 

 

DataField="QUESTION" ItemStyle-HorizontalAlign ="Left" Visible ="false"

 

 

ItemStyle-Font-Size="Small" ItemStyle-Font-Bold="true"

 

 

ItemStyle-Width="0px">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn UniqueName="ANSWER" SortExpression="ANSWER" HeaderText="Questions / Answers"

 

 

DataField="ANSWER" ItemStyle-HorizontalAlign ="Left" Visible ="true"

 

 

ItemStyle-Font-Size="Small" ItemStyle-Font-Bold="false"

 

 

ItemStyle-Width="94%">

 

 

</telerik:GridBoundColumn>

 

 

 

 

<telerik:GridHyperLinkColumn UniqueName="EditCurrentQA" HeaderText=" " target="_blank"

 

 

DataNavigateUrlFields="ID"

 

 

ItemStyle-HorizontalAlign="Center"

 

 

ItemStyle-ForeColor ="#5A8D4A" Text ="Edit"

 

 

DataNavigateUrlFormatString ="./page.aspx?questionAnswerID={0}"

 

 

ItemStyle-Width="4%"

 

 

Visible ="false" >

 

 

</telerik:GridHyperLinkColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

 

<GroupHeaderItemStyle Wrap="true" />

 

 

<ClientSettings AllowDragToGroup="True">

 

 

<Selecting AllowRowSelect="True"></Selecting>

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>

 

 

<ClientMessages DragToGroupOrReorder="Drag to group" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid> 

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

 

Dimo
Telerik team
 answered on 13 Nov 2008
3 answers
636 views
What is the benefit for setting the above in addition to Skin="" ?
Would it use less resource?
Ivo
Telerik team
 answered on 13 Nov 2008
4 answers
148 views
Each one of my nodes has an attribute of "NodeType". That all works fine. On the server side, OnNodeClick event, I need to know the value of the "Node Type" attribute of the previously selected node. So I added an attribute to the RadTreeControl and I update that attribute each time the node type changes. It doesn't work. The attribute value of the RadTreeControl is not persistant. The next time a node is clicked the server thinks the attribute value is back to its initial value.

I can see in the content being generated that the attribute is being passed in the RadTreeView object.
On the post back, __CALLBACKPARAM  does not include the attribute.

Can a RadTreeView control have an attribute value? Looks like it can.
What would I have to do to includ it in the __CALLBACKPARAM.

Is there some other way to keep track of the last node?

Thanks!

Bary




Atanas Korchev
Telerik team
 answered on 13 Nov 2008
5 answers
186 views
Hi

I'm trying to create one aspx page for each table in my database in order to update them.
My page has a Radgrid to select items to edit.

I'm using 3 DIVs, one with RadGrid, another with the buttons to edit an add new items and a third div with all controls needed to fill my database table.
When div Datagrid is visible, div controls is invisible. This is working ok with client code that I execute from the server using AjaxMaster
My controls will use asp.net validators when ok button is clicked.
All my database accesses are done through server code.

I done a lot of configurations with Ajax but there are always a problem.

All my buttons are related with server events, before I start with client code events  that call server code through Ajaxrequest, but then I got problems with my asp.net validators that wont fired.

The situation I have now is like this:
============================

I put one AjaxPanel inside each DIV:
RadAjaxLoadingPanel3 has Button bt_edit, bt_new, label with selected radgrid item and some hidden fields that I need in server side
RadAjaxLoadingPanel2 has RadGrid
RadAjaxLoadingPanel1 has all the controls I need to fill and also my butons bt_ok and bt_cancelar to validade or cancel.

At this stage, Edit and Add buttons are working, my validators are working but I havesame problems to solve when I press ok button to validate my controls:
> when reading RadInput textboxes on server code, the text value I get is the old value before I make the changes. If I use a normal text box, this works ok. (Radtexbox example:  <telerik:RadTextBox ID="tx_match_user" runat="server"></telerik:RadTextBox>)
> After saving data I need to refresh Radgrid and my code don't work. I'm using this code in another page and it wotks ok, but the call starts from a javascrip function, here it starts form server code
> when I select a grid item, i store the name in label that is inside RadAjaxLoadingPanel3. Every time I click bt_edit  or bt_new that are inside the same Radajaxpanel, this label gets empty.

The main parts of my code:
======================

My last MasterAjax configuration:

        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="bt_edit">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="bt_new">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="Bt_ok">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="Bt_Cancelar">
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>


My server code to execute javascript from server (I try both ways and they do what I need):
Private Sub execute_js(ByVal script As String)
        ScriptManager.RegisterClientScriptBlock(Me, Page.GetType(), "PopupWindow", script, True)
        'RadAjaxManager1.ResponseScripts.Add(script)
    End Sub

My server code to refresh Radgrid that is called when I finish to update my database:

    Private Sub grid2_refresh(ByVal tipo As Integer)
        'obtem o tipo de operação efectuado
        If tipo = 2 Then RadGrid1.CurrentPageIndex = 0
        RadGrid1.DataSource = load_DBdata()
        RadGrid1.Rebind()
    End Sub

Protected Sub RadGrid1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.DataBound
        rd.Close()
        cn.Close()
    End Sub

Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
        RadGrid1.DataSource = load_DBdata()
    End Sub

  Private Function load_DBdata() As SqlDataReader
        Try
            cn = New SqlConnection
            cn.ConnectionString = DB_STRING
            cn.Open()

            Dim command As SqlCommand = New SqlCommand("Sp_Users_List", cn)
            With command
                .CommandType = Data.CommandType.StoredProcedure
                .Parameters.Add("@login_id", Data.SqlDbType.BigInt)
                .Parameters("@login_id").Value = 0
            End With
            '
            rd = command.ExecuteReader


        Catch ex As Exception

        Return rd
    End Function


Best regards



Iana Tsolova
Telerik team
 answered on 13 Nov 2008
3 answers
195 views

Hi,

I am sure many of us aware of  this error :

System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).    
at System.Web.UI.ControlCollection.Add(Control child)    
at Telerik.Web.SkinRegistrar.RegisterCssReference(Page _page, Control _control, String _url)

My case is i have a master page used as template.
Now there is another page that has an user control in it which has the rad treeview in it.
I am using the javascript for rad treeview with on load functionality using web service.

To narrow down the problem i have just added a rad treeview with rad script manager to the user control
This user control is placed in an aspx page which has a master page set for it.
now While trying to access this page i am getting the same error.
Can anyone help me in this respect.
I need it urgently.
Thanks for your help in advance.

Ragards,
Aayam Singh
Atanas Korchev
Telerik team
 answered on 13 Nov 2008
1 answer
96 views
Does anyone know if telerik asp.net spell check supports Thesaurus.
thanks
Rumen
Telerik team
 answered on 13 Nov 2008
3 answers
164 views
Just curious if there is a slick way to set the skin for all the controls in a website so that a user could select a skin from a combobox and have all the controls in the site updated. Currently i am just storing the skin in the profile and then setting all controls skin on each page in the page_load event. Just wondering if there was a bettere/more elegant way.

Thanks!
Mark
Top achievements
Rank 1
 answered on 13 Nov 2008
1 answer
106 views
How do you remove the tooltips that tell you the width of the column when resizing?
Dimo
Telerik team
 answered on 13 Nov 2008
3 answers
128 views
Hi,

I wasted an enormous amount of time trying to figure this one out. My conclusion is that it is not currently supported (ASP.NET Q2.2008) by the grid.

I am simply trying to automatically expand a row when the user edit it (.Edit = true) or conversely, edit the master row when the detail is expanded (and still show the detail).

Hooking the ItemCommand event does not work : it seems like the Expanded property on the item is simply ignored.



Marc-Andre
Top achievements
Rank 1
 answered on 13 Nov 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?