Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
I have a RadGrid with 1 detail table which is defined declaratively and I'm using 2 SqlDataSources; one for the master table and the second for the detail table.

My detail table has a GridCalculatedColumn:

 <telerik:GridCalculatedColumn HeaderText="Duration (calculated)" DataType="System.String"
                            DataFields="Duration" UniqueName="Duration-custom" Expression="1">
                        </telerik:GridCalculatedColumn>

How would that be possible to set the Expression value at runtime?

I'd like to set this value to the expression:

TimeSpan.FromSeconds({0})

which returns data in this format in C#: d.hh:mm:ss e.g. 1.10:10:10

Thanks,
Tsvetina
Telerik team
 answered on 06 Oct 2011
1 answer
105 views

I have added a search function to my grid, essentially a stored procedure to refine the grid display for a term entered by the user that occurs in any of 2 columns.

This works fine initially, but isnt maintained for any actions such as paging, edit or cancel, the grid then returns to the initial default databinding of all records.

I added a Clear button to allow the user to load all records again, but would like to be able to make any search done persist and only show these records until the user clicks clear or page reloads.

Mark
Top achievements
Rank 1
 answered on 06 Oct 2011
0 answers
233 views
Hello,

I am trying to change the RadEditor Spell Check Dictionary Path on the server (Page Load), but I am unable to get it to work. Here is what I have:

RadEditor1.SpellCheckSettings.DictionaryPath = "/include/RadControls/Spell/TDF"
If Threading.Thread.CurrentThread.CurrentCulture.Name.ToLower() = "es-pr" Then
    RadEditor1.SpellCheckSettings.DictionaryLanguage = "es-ES"
    RadEditor1.SpellCheckSettings.SpellCheckProvider = Telerik.Web.UI.SpellCheckProvider.EditDistanceProvider
Else
    RadEditor1.SpellCheckSettings.DictionaryLanguage = "es-US"
    RadEditor1.SpellCheckSettings.SpellCheckProvider = Telerik.Web.UI.SpellCheckProvider.PhoneticProvider
End If

I have to set those values on the server because we have spanish users, so we need to change the dictionary language and provider for those users. When I click on the spell check button on the RadEditor, i just get a server error 500 - Dictionary Path is not set. I have attached a picture of the error.

However, I do not get this error when I add the dictionary path to the client:

<telerik:RadEditor ID="RadEditor1" runat="server" SpellCheckSettings-DictionaryPath="/include/RadControls/Spell/TDF">
    <Content>
    </Content>
</telerik:RadEditor>

This would work fine, but I'm afraid the provider and dictionary language still would not be set.

Is there anyway for these values to be set on the server side? Thanks for your help!



EDIT:

I have found that the DictionaryPath works correctly if I take out the DictionaryLanguage.  For some reason RadEditor1.SpellCheckSettings.DictionaryLanguage = "es-US" is causing the DictionaryPath to be blank when running the spell check.


EDIT 2:

OK. Disregard my stupidity. I actually noticed my error while reading the last edit. The "es-US" should be "en-US". After changing that, it works as it should.
George
Top achievements
Rank 1
 asked on 06 Oct 2011
1 answer
95 views
Hello,

I have a hierarchical grid. At the client side, i have the following OnRowContextMenu event    

function RowContextMenu(sender, eventArgs) {
        document.getElementById(lblRowIndex").value = eventArgs.get_itemIndexHierarchical();
        document.getElementById(rdMethodClickedTableId").value = this.UID; 
    } 
this function allow to save the index of the grid item associated to the context menu.
On other hand, I have a server side  event RdDocumentMenu_ItemClick fired by  the  RadcontextMenu click.
<ItemTemplate>
 <telerik:RadContextMenu runat="server" ID="MenuDocument" Skin="WebBlue" EnableRoundedCorners="true" EnableShadows="true" EnableViewState="true" OnItemClick="RdDocumentMenu_ItemClick" OnClientItemClicking="OnDocumentMenuClicking">
        <Items>
               <telerik:RadMenuItem Text="ManageDesignProcess.editstep.lblMnuItemDocumentEdit" Value="Edit" ImageUrl='~/Images   
                /menu/menu_sub.gif' ImageOverUrl='~/Images/menu/over/menu_sub.gif'/>
         </Items>
 </telerik:RadContextMenu>
</ItemTemplate>
And In this function,i want to retrieve the GridDataItem by giving its index that it was saved in the lblRowIndex text field.

    protected void RdDocumentMenu_ItemClick(object sender, RadMenuEventArgs e)
    {
        string sDocumentClickedRowIndex;
        string sUId;
        sDocumentClickedRowIndex = lblRowIndex.Text;
        sUId = rdMethodClickedTableId.Text;
 
        GridTableView tableView = this.Page.FindControl(sUId) as GridTableView;
        GridDataItem dataItem = tableView.Items[sDocumentClickedRowIndex]; (??)
}

How can I do it?

Thank You,
Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Oct 2011
12 answers
1.3K+ views
I've a radgrid for ajax (Q1 2008) with client setting AllowRowSelect="True" and client event OnRowClick="RowClick".

the grid has a template column containing a link which opens a radwindow. when this link is clicked, rowclick event is not fired. however, explicitly clicking on the other part of same cell does fires the event.
what am i doing wrong here??

this works just fine in my other project which is using radgrid for asp.net.

what i'm trying to accomplish is when a link is clicked, that row should be selected at client side.
any help is appreciated...
Tsvetina
Telerik team
 answered on 06 Oct 2011
5 answers
195 views
Hi guys,
Can any one help me out , in adding a group field  to Rad grid group panel .
Ex: i Want to add a field "Name" to Radgrid group panel when you click on "Name" node from rad tree view.

Kevin
Top achievements
Rank 2
 answered on 06 Oct 2011
2 answers
175 views
I have multiple radgrids in an Asp web form. Things are working quite well until I found a problem.

All grids are reading data from a datasource in the backend. There are two grids are sharing one data field. It means that if the data column changes on one grid it should updates to the other grid as well. In the ASPX file, I define the AJAX manager as follow,

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="rgOpenHole">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="rgOpenHole" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

<telerik:AjaxSetting AjaxControlID="rgDrillString">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="rgDrillString" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

<telerik:AjaxSetting AjaxControlID="rgHarzard">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="rgHarzard" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

</AjaxSettings>

 

 

 

</telerik:RadAjaxManager>

 


In this case, if the grid rgOpenHole changes, it should populate the grid rgHarzard, but it does not work!

I put code to force the update in  rgOpenHole_UpdateCommand like this,

rgOpenHole.Rebind()

rgHarzard.Rebind()

The rgOpenHole works as usual but rgHarzard does not update! I step into the code debugger and it does step through rgHarzard.Rebind(). It seems that the rgHarzard does not react at all.

I know if I put rgOpenHole and rgHarzard into one single UpdateControls tag, it update the rgHazard, but it also causes other issue. So I wonder if I can update it through java script and ajax call in the client site?

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="rgOpenHole">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="rgOpenHole" LoadingPanelID="RadAjaxLoadingPanel1" />

 

<telerik:AjaxUpdatedControl ControlID="rgHarzard" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

 

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

<telerik:AjaxSetting AjaxControlID="rgDrillString">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="rgDrillString" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

</AjaxSettings>

 

 

 

</telerik:RadAjaxManager>

 

 

 

 


Any idea?

Simon Feng

Simon
Top achievements
Rank 1
 answered on 06 Oct 2011
1 answer
127 views
Hi,

Scenario: I have no source data. I add a record and my editor pops up. In the Name field I cannot enter a value as it is read only. If there is already data in the Tree List then I can edit the Name field.

For my  data configuration see http://www.telerik.com/community/forums/aspnet-ajax/treelist/hide-row-editing-controls.aspx

Thanks

SurfRat.
Surf
Top achievements
Rank 1
 answered on 06 Oct 2011
1 answer
124 views
How would you set a row click for the gridTableView in code behind? On a 'normal' grid I would use, RadGrid1.ClientSettings.ClientEvents.OnRowClick = "RowClick", but cant see how this would be done for GridTableView?
Andrey
Telerik team
 answered on 06 Oct 2011
1 answer
154 views
hi people
I have a grid which add template cloumn in code behind .my code  is here

 

 

If Not tblLastItem.Rows(i)("CntrGnlItm_Level") Then

 

dtbl.Columns.Add(tblLastItem.Rows(i)(

 

"CntrLstItm_ID_").ToString)

 

 

 

Dim templateColumnName As String = tblLastItem.Rows(i)("CntrLstItm_ID_")

 

 

 

Dim templateColumn As New GridTemplateColumn()

 

templateColumn.ItemTemplate =

 

New MyEditTemplate(templateColumnName)

 

templateColumn.EditItemTemplate =

 

New MyEditTemplate(templateColumnName)

 

templateColumn.HeaderText = tblLastItem.Rows(i)(

 

"CntrGnlItm_ParentTitr").ToString.Trim + "--" + tblLastItem.Rows(i)("CntrLstItm_Titr").ToString.Trim

 

templateColumn.UniqueName = tblLastItem.Rows(i)(

 

"CntrLstItm_ID_")

 

 

 

Me.grd.MasterTableView.Columns.Add(templateColumn)

 

 

 

Else

 

 

 

If Not Me.grd2.MasterTableView.Columns.Contains(tblLastItem.Rows(i)("CntrLstItm_ID_").ToString) Then

 

 

 

Me.grd2.MasterTableView.Columns.Add(col)

 

 

 

End If

 

dtbl2.Columns.Add(tblLastItem.Rows(i)(

 

"CntrLstItm_ID_").ToString)

 

 

 

End If

 

so,there is a RadNumericTextBox in  MyEditTemplate .User enter value in RadNumericTextBox ,How i get value which user entered?
Andrey
Telerik team
 answered on 06 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?