Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
121 views
I have two issues.

1. I have a RadEditor in a RadGrid which works fine, until I set the Grid to use Ajax.  Then the Editor control becomes useless and its contents hidden.  What is the work around for this?

2. Depending on user privileges I need different options to show in the grid.  The grid is a grid of info, much like a forum.  If the creator of a row is using the system I need a column to have an edit button that allows direct edit of the record (like my code has now).  However, if it is not the creator, the 'Edit' button needs to be replaced by a 'Reply to' button that acts as an insert command prepopulating the edit box with "Reply to Comment X".  So how do I code this so it determines which edit/insert button to show based on the row priveleges?

Heres my current code for the control:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="grdNotes">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grdNotes" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />

<telerik:RadGrid ID="grdNotes" runat="server" GridLines="None" Skin="Windows7">
<MasterTableView ShowHeader="False" ShowHeadersWhenNoRecords="False"
        TableLayout="Fixed" AutoGenerateColumns="False" DataKeyNames="ID" ClientDataKeyNames="ID" >
    <Columns>
        <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID"
            SortExpression="ID" UniqueName="ID" Visible="false" ReadOnly="true">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="VisibleID" DataType="System.Int32"
            HeaderText="ID" SortExpression="VisibleID" UniqueName="VisibleID" ReadOnly="true" >
            <HeaderStyle Width="20px" />
        </telerik:GridBoundColumn>
        <telerik:GridButtonColumn CommandName="Edit" ButtonType="ImageButton" UniqueName="Edit" ImageUrl="~/Images/Edit.png">
                        <HeaderStyle Width="50px" />
        </telerik:GridButtonColumn>     
        <telerik:GridTemplateColumn HeaderText="Notes" UniqueName="Notes" ReadOnly="false">  
                            <EditItemTemplate>
                                <telerik:RadEditor ID="editNotes" ShowSubmitCancelButtons="False" runat="server"
                                    Content='<%# Bind("Notes") %>' ToolsFile="~/ToolsFileLimited.xml" Height="200px" Width="1000px" EnableResize="false" />
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("Notes") %>' />
                            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="DateCreated" DataType="System.DateTime"
            HeaderText="Date Created" SortExpression="DateCreated" UniqueName="DateCreated" ReadOnly="true">
            <HeaderStyle Width="100px" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="CreatedBy" HeaderText="CreatedBy"
            SortExpression="Created By" UniqueName="CreatedBy" ReadOnly="true">
            <HeaderStyle Width="100px" />
        </telerik:GridBoundColumn>
    </Columns>


</MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
    </ClientSettings>
</telerik:RadGrid>
Jay Leffue
Top achievements
Rank 1
 answered on 23 Aug 2010
1 answer
156 views
Hi guys,

I have a user control that has radgrid inside it. During edit / add, I will use my own custom user control to edit / add.

Here is my radgrid code:

<telerik:RadGrid  ID="rgDocumentCheckList" runat="server" GridLines="None" 
    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
    onneeddatasource="rgDocumentCheckList_NeedDataSource" 
    onitemcommand="rgDocumentCheckList_ItemCommand" 
    onitemcreated="rgDocumentCheckList_ItemCreated"
    onitemdatabound="rgDocumentCheckList_ItemDataBound">
<HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
  
    <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="DocumentId" Name="DocumentListTable">
        <Columns>
            <telerik:GridBoundColumn UniqueName="DocumentType" HeaderText="Document Type" DataField="DocumentTypeName">
            </telerik:GridBoundColumn>
            <telerik:GridHyperLinkColumn UniqueName="DocumentLink"
                HeaderText="Document"
                DataTextFormatString="{0}" DataTextField="DocumentTitle"
                DataNavigateUrlFormatString="{0}" DataNavigateUrlFields="URL">
            </telerik:GridHyperLinkColumn>
            <telerik:GridBoundColumn UniqueName="Stage" HeaderText="Stage" DataField="StageName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Remarks" HeaderText="Remarks" DataField="Remark">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="UploadedBy" HeaderText="Uploaded By" DataField="UploadedBy">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="UploadedDate" HeaderText="Uploaded Date" DataField="UploadedDate">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Status" HeaderText="Status" DataField="Status">
            </telerik:GridBoundColumn>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" ItemStyle-Width="10px" Visible="true">
<ItemStyle Width="10px"></ItemStyle>
                        </telerik:GridEditCommandColumn>
                          
                    <telerik:GridButtonColumn ButtonType="ImageButton" ConfirmDialogType="RadWindow"
                            HeaderButtonType="None" ImageUrl="~/Resources/Images/Bin.gif" ItemStyle-Width="10px" UniqueName="colActionDelete"
                            Visible="true" CommandName="Delete" ConfirmText="Confirm to delete?" ConfirmTitle="Action confirmation">
                            <ItemStyle Width="10px" />
                        </telerik:GridButtonColumn>
        </Columns>
        <EditFormSettings UserControlName="~/UserControl/CommonFunctionality/DocumentCheckList/DocumentAddEdit.ascx" EditFormType="WebUserControl">
            <EditColumn UniqueName="EditCommandColumn1">
            </EditColumn>            
        </EditFormSettings>
    </MasterTableView>    
</telerik:RadGrid>


I found this link http://www.telerik.com/help/aspnet-ajax/upload_uploadingajax.html, and under "Workaround for RadGrid for ASP.NET AJAX" i found a great solution for using GridTemplateColumn. But how can I do it if I use my own control to add and edit?

Thank you.

AGT
Yana
Telerik team
 answered on 23 Aug 2010
3 answers
236 views
I am building a form where a user can upload multiple files and am showing a RadProgressArea on the page for status. Is it possible to have this status pop up in a modal window with RadWindow instead of being inline on the page?
digitall
Top achievements
Rank 1
 answered on 23 Aug 2010
2 answers
72 views
On a drag and drop, how can I control the layout of the row being dragged?  Below is my master grid, please note that the first column is only 18px wide.  When dragging the first column becomes 1/2 the width of the grid.  How can I force the same layout for the row being dragged?

Thanks

 

 

<telerik:RadGrid runat="server" ID="grdKCGs" AllowPaging="False" Width="100%" AllowMultiRowSelection="false">

 

 

 

<MasterTableView DataKeyNames="TopicKCGID" Width="100%" TableLayout="Fixed" AutoGenerateColumns="false">

 

 

 

<Columns>

 

 

 

<telerik:GridDragDropColumn HeaderStyle-Width="18px"></telerik:GridDragDropColumn>

 

 

 

<telerik:GridBoundColumn UniqueName="TopicKCGID" DataField="TopicKCGID" Visible="false" />

 

 

 

<telerik:GridBoundColumn UniqueName="KCGDescription" DataField="KCGDescription" HeaderText="Description" ReadOnly="true" />

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

<ClientSettings AllowRowsDragDrop="true">

 

 

 

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

 

 

 

</ClientSettings>

 

 

 

</telerik:RadGrid>

 

Chris Trina
Top achievements
Rank 1
 answered on 23 Aug 2010
2 answers
209 views
Typically I use virtual directories in my websites,  so that when I publish a new version,  the directories the client works in,  do not get overwritten.

In using the File Explorer control,  I can not seem to get the control to see the virtual directories.

I could have sworn I have used server.mappath() on virtual directories before,  but rad file explorer doesnt return the directories or files.

Am I missing something? 

I will do a test on server.mappath to make sure im not crazy, which is entirely possible.  But I thought I would put the question out there to see if anyone can shine some light on it,  while I perform some tests.

Thanks,
M2
Fiko
Telerik team
 answered on 23 Aug 2010
1 answer
252 views
I am currently using many of the rad controls in my application, RadMenu, RadGrid, RadTabStrip, RadPanel, RadDock all of which have the default skin applied.  I would like to change the font that is being used but I cannot find how to do this.  I did find other posts that say that there has to be an override in the css for each control but not the format to use to override the font.  I was trying to use .RadMenu_Default { font-family: arial,Helvetica,sans-serif !important; } with no luck, I also tried .RadMenu, .RadGrid, .RadGrid_Default.... 

Can you please help?  Font changes should not be this complicated!

Paula
Dimo
Telerik team
 answered on 23 Aug 2010
12 answers
328 views
When I try to start the VSX, there's a dialog to remind me that VS.NET should run with admin privileges.
I never develop with admin privilieges. Why needs the VSX adminisrtator privilieges?

Absolutly not useful. I don't see any reason why this is should be needed (unless for installing an update).

I got also an error when I check for the update:
"Error retrieving latest version information"

Thanks
Eric
Erjan Gavalji
Telerik team
 answered on 23 Aug 2010
5 answers
136 views
I am having an issue getting the insert and delete to function correctly when working client side.  IF I bind the data client side, the insert works but the inline delete does not, if I bind server side the insert does not render correctly (until I refresh the page) but the delete works fine.  Please help.

Thanks,

Michael
Daniel
Telerik team
 answered on 23 Aug 2010
1 answer
239 views
Hi Telerik!

I am currently working on a project where we need to show some Charts. The standard Charts within VS2010 isn't all that beautiful and neat - so we decided to try your AJAX package. But we have run into some problems we can't solve or find a solution to on your FAQ, Forum or Documentation.

We are trying to create a Chart where the Data is bound through a ObjectDataSource. But it creates to many series and and 7 unnamed items as you can se in the "chart Wizard" picture. It was supposed to create one or two series and with sales statistics from this year and last year as you can se in picure "Noerror". Here we have the standard Chart from VS2010 showing blue and orange bars (blue for this year and orange for last year). This works fine but sure isn't very attractive. Your RadGrid works fine as you can see on the same picture. But as soon as we databind your radChart with our ObjectDataSource and then it tells us that fx. "Kuverter" isn't numeric... We have tried to change and delete different series and Columns and it always comes down to this error. We have also tried to manually create the series and Items as we want, but then it doesn't databind with ObjectDataSource. WE know for sure that all the data is in numeric (Decimal and int). Besides "Afdeling" and "Firma" column, which should represent the Firm and the different sections within it (see the standard chart). Its driving us nuts, because it doesn't make any sense. We have tried creating a little test method that also returns a Array and with some numbers... which again returns the numeric error...

I hope you can help us and please write asap if you need any extra doc. or explaination.

Friendly regards
Nicklas Vind
Kokken & Jomfruen

Ves
Telerik team
 answered on 23 Aug 2010
4 answers
434 views
I have a custom DB layer that accepts a "where" clause as part of retrieving a collection of a specific type that my page needs for existing processing.

I'd like to be able to use the filters in the RadGrid to manipulate my SQL to generate the contents of the "where" clause (rather than having a separate section on the page that would contain the filter inputs).

Is this possible?

I found the column.EvaluteFilterExpression() which returns the info I'm looking for but in a format that would be difficult to manipulate.

At this point I'd even be okay with just getting the TEXT that was entered into the filter box and forcing everyone to use contains if that's the only way to get this done.

Thanks!
Kevin
Mira
Telerik team
 answered on 23 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?