Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
365 views
Hi,

I try to use a Radmenu inside a RadGrid's GridTemplateColumn.
The Result is shown on the attached Picture.
The Menuitems should do a Postback and depending on the selected Menuitem do some Action for the cuttent Row.

Unfortunately I have no idea on how to this.
Can anyone give me a hint, or maybe a better solution to implement this scenario.

Thank you

Thomas

Here is my current code snippet:

<telerik:RadAjaxManager ID="raManager" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rgOrganisationAnsprechperson">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgOrganisationAnsprechperson" LoadingPanelID="ralpLoading" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
  
<telerik:RadAjaxLoadingPanel id="ralpLoading" runat="server" Skin="WebBlue" ></telerik:RadAjaxLoadingPanel>   
<telerik:RadGrid ID="rgOrganisationAnsprechperson" 
    DataSourceID="odsOrganisationAnsprechperson" runat="server" PageSize="20" 
    AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" ShowGroupPanel="False"
    AutoGenerateColumns="false" GridLines="none" 
    onprerender="rgOrganisationAnsprechperson_PreRender" >
    <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
    <MasterTableView Width="100%">
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <SelectFields>
                    <telerik:GridGroupByField FieldAlias="Organisation" FieldName="Organisationsname" FormatString="{0:D}"
                        ></telerik:GridGroupByField>
                </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="co_id" SortOrder="Descending"></telerik:GridGroupByField>
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <Columns>
            <telerik:GridTemplateColumn>
                <ItemTemplate>
                    <telerik:RadMenu ID="RadMenu1" runat="server" EnableRoundedCorners="true" EnableShadows="true" ExpandAnimation-Type="None" CollapseAnimation-Type="None" ExpandDelay="0" CollapseDelay="0">
                        <Items>
                            <telerik:RadMenuItem Text="Edit" Selected="false">
                                <GroupSettings ExpandDirection="Right"/>
                                <Items>
                                    <telerik:RadMenuItem Text="Personen Daten">
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem Text="Einstellungen">
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem Text="Zugangsdaten">
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem Text="arbeitet nicht mehr bei Firma">
                                    </telerik:RadMenuItem>
                                </Items>
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadMenu>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="Name" HeaderText="Name" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Position" HeaderText="Position" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Admin" HeaderText="Admin" ></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Anzeigen" HeaderText="Anzeigen" ></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
      
    <ClientSettings AllowGroupExpandCollapse="True" >
    </ClientSettings>
</telerik:RadGrid>
waruni
Top achievements
Rank 1
 answered on 08 Dec 2010
28 answers
1.3K+ views
Hello,  I need guidance as to how to improve client side performance when using a lot of rad controls on one page.  I am creating an application that will be used by several hundred police officers in a county with a population of 380k so as you can see it needs to be very reliable and fast.

One major requirement for this application is that it should have all of the fields on one page without the need to navigate between pages to enter the information needed.  This is mainly due to the fact that many police officers may have several weeks to 2 months in between using the application so it has to be easy to use and navigate.

Subsequently, there are 2 RadMenu's, 38 RadTextBox's, 12 RadMaskedTextBox's, 2 RadDateInput's, 16 RadComboBox's, 5 RadGrid's, 2 RadEditor's, 3 RadWindow's, and 1 RadAjaxManager currently on one page.  There may be a few more controls added but that should be 95% of the fields.

I enabled tracing and the server side complets in 1 second exactly every time.  The problem is at the client side.  Once the page loads into the browser there is a long pause and I'm assuming it's some sort of Telerik initialization javascript code running.  During this pause the mask shows in the RadMaskedTexBox's and the page will not respond to events...as soon as the pause is over the masks disappear (as I have HideOnBlur set to true) and then the page will respond to clicks and you can begin using the form.  The pause lasts around 6 to 8 seconds on my computer, however, it's a very fast computer and I'm afraid slower PC's will be even worse.

Is there any general guidance you can give me to reduce this client-side pause?  Thank you.
Svetlina Anati
Telerik team
 answered on 08 Dec 2010
4 answers
296 views
Hi,

I populate the RadDateTimePicker with a default date on the server side.

The control is rendered and the user can modify the date, but should be able to restore the control to its default value.

I couldn't find a client side function which covers this. I have tried to use the defaultValue of the HTML textbox element which I can get via
- $find(dtp.ClientID).get_textBox() -
but the value is stored in the wrong format to do a Date.parse(datetime_string) and I don't want to spend lots of time on this issue.

What would be the suggested way?

Thanks.

Kind regards,
Christoph
Christoph
Top achievements
Rank 1
 answered on 08 Dec 2010
5 answers
316 views
Hi Telerik Guys !

Im using RAD FILE EXPPLORER Control in one of my project.

I have implemented the ARCHIVE BUTTON in the tree context menu of the RAD FILE EXPLORER.

When I clicked on to the  "ARCHIVED" button, the FOLDER from the TREE CONTEXT MENU gets archived in the database but the folder does not gets deleted form the TREENODE. 

I can only delete/archive that folder when I refresh my entire webpage.

Please help how to delete/archive(not to show) that folder with in the TREE CONTEXT MENU in RADFILE EXPLORER.

Please help

Ajay 
Fiko
Telerik team
 answered on 08 Dec 2010
2 answers
86 views
Dears,
Is it possible to open RadWindow in RTL direction including Toolbar and Scrollbar ?

Best Regards
Georgi Tunev
Telerik team
 answered on 08 Dec 2010
1 answer
274 views
I have implemented a solution that uses the RadFileExplorer and CustomFileSystemProvider similar to what is in this post:

http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/physical-paths-and-different-content-types.aspx

My issue is that when I try to open a file that has a number sign in the file name, the URL path that is passed to the FileSystemHandler.ashx is poorly formed, and loses everything after the first '#' character. I don't expect to see these kinds of characters in our file names, but this one was a valid file and breaks the FileSystemHandler.ashx at the response.write, because the path to the file is invalid.

Is there a way to intercept this file path URL and ensure that it stays well formed. I noticed in the OnClientFileOpen client event, the url looks fine, so checking it here doesn't help. It isn't until its passed to the handler code that it is missing data....
Fiko
Telerik team
 answered on 08 Dec 2010
3 answers
271 views
Hi ,

i am using radgrid control on my page and i want to get the text of the hyperlink column in view mode.
i am getting the control and all its property but not the text property of hyperlink control.

private void grid_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridEditableItem && e.Item.IsInEditMode)
{
}
else
{
string tasknumber = ((GridHyperLinkColumn)((RadGrid)sender).MasterTableView.DetailTables[0].Columns[6]).Text;
((GridHyperLinkColumn)((RadGrid)sender).MasterTableView.DetailTables[0].Columns[6]).DataNavigateUrlFormatString = "../AIPSTaskSelector.aspx?SubActionId={0}&disableMaster=1&read=true";
}
}

how to get the text here...
string tasknumber = ((GridHyperLinkColumn)((RadGrid)sender).MasterTableView.DetailTables[0].Columns[6]).Text;

here in string tasknumber is empty.

Please help.
Princy
Top achievements
Rank 2
 answered on 08 Dec 2010
1 answer
65 views
Hi,

I would like this functionality:

series.ActiveRegionToolTip = String.Format("{0}: {1} ({2})", series.Name, "#Y", Convert.ToDateTime("#X") );

#X is a string representation of a DateTime as OADate. I am unable to convert it here as it is still just the string literal "#X" until run time.

What is the correct way of doing this?
Evgenia
Telerik team
 answered on 08 Dec 2010
1 answer
51 views

I know how to make the RadGrid do a postback ( RadGrid1_SelectedIndexChanged event ) when a single row is clicked and I know how to set the grid up to select multiple rows but I cannot figure out how to make it automatically do a postback after I have selected multiple rows.  Is there a way to do that?

Thanks

John

Shinu
Top achievements
Rank 2
 answered on 08 Dec 2010
1 answer
108 views
I am displaying a list of objects in a grid. One property of the object is a boolean value that I'd like to be able to allow the user to change simply checking/unchecking a checkbox. I want this to be a one-click solution - that is to say, I don't want them to have to select the row, go into edit mode, check the box, choose to save the records, etc. If the box gets checked, I want to update the record that it is bound to.

Simple enough I think, but going about this seems so problematic.

At first, I tried using a GridCheckBoxColumn. This correctly displays the value of the property, but is disabled. I learned that is because this will only enable if the row is in Edit mode. I added some code to the Pre_Render() event which causes every single row to be set to edit mode initially, but this looks pretty ugly - all the rows have dark lines on them, and I have to go back and explicitly set every other control in the row to ReadOnly so that they aren't editable.

My second attempt involved using a GridTemplateColumn, and an asp:CheckBox which is bound (Bind(MyProperty)) to the property. This also displays the value fine, but I'm not sure how to handle it past that. Checking the box doesn't seem to update the bound data? I figured maybe I could set AutoPostBack=True and call the OnChecked() function to set the value manually, but how do I get a reference to the row/item being checked?

Any help would be appreciated.
Princy
Top achievements
Rank 2
 answered on 08 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?