Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
158 views

To all,
   This is basically a how to do question:  First my scenario:

With Radgrid:

     EditMode is set to InPlace

     All rows within the grid are set to edit = true through the Pre-Render event of the grid.
    All editable columns have a custom editor in the EditItemTemplate; RadCombos, raedNumerics and simple asp textboxes.
    Date is retrieved through a DAL object within the NeedDataSource event
    All editors retrieve their values through the ItemDataBound event of the grid
    I have a custom ItemCommand template setup with Linkbuttons to perform the insert,update,delete commands

Here is the challenge I am facing:

 

When the grid appears all of my items are in edit mode which is desirable

 

I make a change to one of the textboxes on the grid and then I press Add New record in the ItemCommand template.

I want the new row to appear and it does but what is happening is that I am losing all other edits in all other rows.

 

I tried the solution of e.cancel in ItemCommand event but that doesn't seem to work, not only did I lose my edits but I did not get my new row to appear.

So I need advice on the following:

1. How do I preserve all data changes within all of my rows by simply clicking the Add new record itemcommand template and still get my new row to appear in the grid?
2. How can I also click on the Add new record template and receive multiple new rows as of now I only see that working one time until the data has been saved?

Thanks to all,
Rick

   

Shinu
Top achievements
Rank 2
 answered on 23 Feb 2009
1 answer
87 views
Hi

How to keep customized controls inside  <GroupByExpressions> in rad oulookstyle grid. i followed the below demo example
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/webmail/defaultcs.aspx

in which right side to to received header i want to keep one button . i tried using commanditemtemplate  but no chance, how to keep

Any help appreciable.


Princy
Top achievements
Rank 2
 answered on 23 Feb 2009
1 answer
97 views
Our application is experiencing major performance issues. IE load time is more than a 1 minute; mouse overs cause long periods of 100% cpu. Problem is reduced to somewhat usable state in firefox, and almost non-existent in IE.
Here is a load profile done in firefox.

The page has radpanel, radspiltter, radpanelbar, and a lot of user controls inside radpanelbars.

1. What can we do to kill performance issue?
2. From experimenting, radpanelbar appears to be the main culprit. Just plain radpanelbars with no inner content do not cause a problem, but for radpanelbars with say 2 datepickers, just mousing-over causes 100% cpu spike. Can you replicate this?

thanks.
Paul
Telerik team
 answered on 23 Feb 2009
9 answers
160 views
Hi there,
For some reason when I add say a calendar control into the contenttemplate section within a RadDock control, the ending tag </contenttemplate> disappears...

No big drama, but just wondered if this is a known issue, or is there something I am doing wrong?
Georgi Tunev
Telerik team
 answered on 23 Feb 2009
1 answer
133 views
Okay here are the details first.  I have the Grid bound to a SQLDataSource which is running a Stored Procedure returning a record set.  The grid looks great and works fine except for 2 issues.  The filters work fine expect in  regards to columns of data that have some null data and if I select the IsEmpty, NotIsEmpty, IsNull, NotIsNull it gives me the following message:


Server Error in '/EmpSearch' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>
Rosen
Telerik team
 answered on 23 Feb 2009
1 answer
135 views
Hi,

I have a grid with an editable column which needs to be enabled with filtering. I have set AllowFilteringByColumn=true for the grid and the DataField for the templatecolumn is also set. I have added the code below. Please let me know if I am missing something. The filtering is not working only for the grid with EditItemTemplate. Any help would be highly appreciated. Thanks.
 
<rad:RadGrid ID="rgDocuments" CssClass="ms-WPTitle" PageSize="10" AllowPaging="True"
                                    AllowSorting="True" runat="server" AllowFilteringByColumn="True" AutoGenerateColumns="False"
                                    OnNeedDataSource="rgDocuments_OnNeedDataSource" FilterMenu-CssClass="FilterMenuClass1"
                                    HorizontalAlign="NotSet" ShowGroupPanel="True" Skin="Default" GridLines="None"
                                    Width="100%" OnItemCreated="rgDocuments_OnItemCreated" OnDataBound="rgDocuments_DataBound"
                                    OnItemDataBound="rgDocuments_OnItemDataBound" AllowAutomaticDeletes="true" AllowAutomaticInserts="true"
                                    AllowAutomaticUpdates="true" OnUpdateCommand="rgDocuments_OnUpdateCommand">
                                    <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True">
                                        <Scrolling UseStaticHeaders="true" ScrollHeight="150px" AllowScroll="True" />
                                        <Resizing AllowColumnResize="True" AllowRowResize="True" />
                                    </ClientSettings>
                                    <MasterTableView GridLines="None" CommandItemDisplay="Top" Width="100%" EditMode="InPlace" DataKeyNames="FileType" AllowAutomaticUpdates="true">
                                        <EditFormSettings CaptionFormatString="Edit File Type {0}" ColumnNumber="6" CaptionDataField="FileType">
                                            <FormMainTableStyle BackColor="White" CellPadding="3" Width="100%" CellSpacing="0"></FormMainTableStyle>
                                            <FormTableStyle BackColor="White" CellPadding="2" Height="110px" CellSpacing="0"></FormTableStyle>
                                            <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                                            <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                                            <EditColumn CancelImageUrl="\Img\Cancel.gif" EditImageUrl="..\Img\Edit.gif" CancelText="Cancel edit"
                                                InsertText="Insert User" InsertImageUrl="..\Img\Save.gif" UniqueName="EditCommandColumn1"
                                                UpdateImageUrl="\Img\Save.gif" ButtonType="ImageButton" UpdateText="Update record">
                                            </EditColumn>
                                            <FormTableButtonRowStyle CssClass="EditFormButtonRow" HorizontalAlign="Right"></FormTableButtonRowStyle>
                                            <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                                        </EditFormSettings>
                                        <CommandItemStyle HorizontalAlign="Right" />
                                        <CommandItemTemplate>
                                            <asp:LinkButton ID="lnkRefreshDocument" runat="server" CommandName="RebindGrid"><img style="border:0px" alt="" src="/wpresources/VesselAssurance/Images/Refresh.gif" /> Refresh </asp:LinkButton>
                                        </CommandItemTemplate>
                                        <Columns>
                                            <rad:GridEditCommandColumn UniqueName="EditCommandName" ButtonType="ImageButton">
                                                <ItemStyle Width="10%" HorizontalAlign="left" />
                                                <HeaderStyle HorizontalAlign="left" />
                                            </rad:GridEditCommandColumn>
                                            <rad:GridTemplateColumn UniqueName="TemplateColumn4" DataField="DocumentName" FilterListOptions="AllowAllFilters"
                                                HeaderText="Documents" HeaderStyle-HorizontalAlign="Left" SortExpression="DocumentName"
                                                Groupable="false" HeaderStyle-Width="25%">
                                                <ItemTemplate>
                                                    <a href="#" onclick="javascript:OpenDocumentsWindow('<%#DataBinder.Eval(Container.DataItem,"FilePath")%>','Vessels')">
                                                        <%#DataBinder.Eval(Container.DataItem, "DocumentName")%>
                                                    </a>
                                                </ItemTemplate>
                                                <HeaderTemplate>
                                                    Documents
                                                </HeaderTemplate>
                                            </rad:GridTemplateColumn>
                                            <rad:GridTemplateColumn UniqueName="FileType" DataField="FileType" FilterListOptions="AllowAllFilters"
                                                HeaderText="File Type" HeaderStyle-Width="25%" HeaderStyle-HorizontalAlign="Left" SortExpression="FileType">
                                                <ItemTemplate>
                                                    <%#DataBinder.Eval(Container.DataItem, "FileType")%>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <asp:DropDownList ID="ddlFileType" runat="server"></asp:DropDownList>
                                                </EditItemTemplate>
                                                <HeaderTemplate>
                                                    File Type
                                                </HeaderTemplate>
                                            </rad:GridTemplateColumn>
                                            <rad:GridBoundColumn DataField="DateCreated" HeaderStyle-HorizontalAlign="Left" UniqueName="DateCreated"
                                                HeaderText="Created Date" HeaderStyle-Width="25%" ReadOnly="true">
                                            </rad:GridBoundColumn>
                                            <rad:GridTemplateColumn ItemStyle-HorizontalAlign="center" UniqueName="TemplateColumn2"
                                            AllowFiltering="false" Groupable="false" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="10%">
                                            <ItemTemplate>
                                                <asp:Button ID="imgDelete" Style="position: relative; background:url(/RadControls/Grid/Skins/Default/Delete.gif) no-repeat; border:none 0px; width:15px; height:20px; cursor:pointer;" runat="server" UseSubmitBehavior="false" ToolTip="Del" OnClick="imgDocumentDelete_Click" />
                                            </ItemTemplate>
                                            </rad:GridTemplateColumn>
                                        </Columns>
                                        MasterTableView>
                                    <FilterMenu CssClass="FilterMenuClass1"></FilterMenu>
                                </rad:RadGrid>


The filtering works for all the other columns but not for the template column with EditTemplate. Please check this asap. Thanks.
Yavor
Telerik team
 answered on 23 Feb 2009
5 answers
555 views
Hi Experts ..


I am trying create css elements to be applied on RadTabs similar to the image in this link : http://cid-ec0cd14d5f0b59d3.skydrive.live.com/self.aspx/telerik/radTabs.bmp, I tried  the following but it does not work!!!

.tab  
    background:  transparent url(i/navigation-sprite.png) no-repeat; 
    width:95px; 
    height:26px; 
    text-decoration:none; 
    font-size:13px; 
    color:white !important; 
    background-position:0 0;         
    float:left; 
    text-align:center; 
    margin:0 2px; 
    line-height:26px; 
 
.selectedTab  
    background-position:0 -26px; 
    font-weight:bold; 
    font-size:13px; 
    color:#187ecc !important;    
    background-image:  transparent url(i/navigation-sprite.png) no-repeat !important; 
 
.hoveredTab  
     background-image:url(i/navigation-sprite.png); 

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0"  
        style="margin-top: 0" > 
<Tabs> 
<telerik:RadTab Text="Tab 1" CssClass="tab" SelectedCssClass="selectedTab"  
        HoveredCssClass="hoveredTab" Selected="True"
</telerik:RadTab> 
<telerik:RadTab Text="Tab 2" CssClass="tab" SelectedCssClass="selectedTab" HoveredCssClass="hoveredTab" > 
</telerik:RadTab> 
<telerik:RadTab Text="Tab 3" CssClass="tab" SelectedCssClass="selectedTab" HoveredCssClass="hoveredTab"
</telerik:RadTab> 
</Tabs> 
</telerik:RadTabStrip> 
Kamen Bundev
Telerik team
 answered on 23 Feb 2009
1 answer
77 views
Hi,

I am having the problem in generating the 4th level hierarhy in the rad grid, I am dynamically generating the tables and biding it to the grid at the server side. Below is my code.

 

<telerik:RadGrid ID="RadGrid1" Skin="Office2007" runat="server" Width="95%" AutoGenerateColumns="False"

 

 

PageSize="7" AllowSorting="True" AllowPaging="True" GridLines="None" ShowStatusBar="true" AllowMultiRowSelection="true" >

 

 

<PagerStyle Mode="NumericPages"></PagerStyle>

 

 

<MasterTableView AllowMultiColumnSorting="True" DataKeyNames="dt1Id,Type" Width="100%" EnableNoRecordsTemplate="false" HierarchyLoadMode="serverBind" >

 

 

<Columns>

 

 

<telerik:GridBoundColumn SortExpression="dt1Id" HeaderText="DTID" HeaderButtonType="TextButton"

 

 

DataField="dt1Id" Resizable="True" Reorderable="True" Display="false">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn SortExpression="Type" HeaderText="Type" HeaderButtonType="TextButton"

 

 

DataField="Type" Resizable="True" Reorderable="True">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn SortExpression="Date" HeaderText="Date" HeaderButtonType="TextButton"

 

 

DataField="Date" Resizable="True" Reorderable="True">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn SortExpression="Description" HeaderText="Description" HeaderButtonType="TextButton"

 

 

DataField="Description" Resizable="True" Reorderable="True">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

<DetailTables >

 

 

<telerik:GridTableView Caption="" AllowSorting="false" DataKeyNames="dt1Id,dt2Id" Width="100%" ShowHeader="false" EnableNoRecordsTemplate="false" HierarchyLoadMode="serverBind">

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields DetailKeyField="dt1Id" MasterKeyField="dt1Id" />

 

 

</ParentTableRelation>

 

 

<Columns>

 

 

<telerik:GridBoundColumn HeaderText="dt2Id" HeaderButtonType="TextButton"

 

 

DataField="dt2Id" Display="false">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Type" HeaderButtonType="TextButton"

 

 

DataField="Type">

 

 

<ItemStyle Width="207px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Date" HeaderButtonType="TextButton"

 

 

DataField="Date">

 

 

<ItemStyle Width="67px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn HeaderText="">

 

 

<ItemTemplate>

 

 

<asp:ImageButton id="imgbtn" imageurl="~/Images/btn_Edit.gif" runat="server" visible= <%# DataBinder.Eval(Container.DataItem, "Status")%>>

 

 

</asp:ImageButton>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn HeaderText="Description" HeaderButtonType="TextButton"

 

 

DataField="Description">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

<DetailTables>

 

 

<telerik:GridTableView Caption="" AllowSorting="false" DataKeyNames="dt2Id,dt3Id" Width="100%" ShowHeader="false" EnableNoRecordsTemplate="false" >

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields DetailKeyField="dt2Id" MasterKeyField="dt2Id" />

 

 

</ParentTableRelation>

 

 

<Columns>

 

 

<telerik:GridBoundColumn HeaderText="dt2Id" HeaderButtonType="TextButton"

 

 

DataField="dt2Id" Display="false">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Type" HeaderButtonType="TextButton"

 

 

DataField="Type">

 

 

<ItemStyle Width="207px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Date" HeaderButtonType="TextButton"

 

 

DataField="Date">

 

 

<ItemStyle Width="67px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn HeaderText="">

 

 

<ItemTemplate>

 

 

<asp:ImageButton id="imgbtn" imageurl="~/Images/btn_Edit.gif" runat="server" visible= <%# DataBinder.Eval(Container.DataItem, "Status")%>>

 

 

</asp:ImageButton>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn HeaderText="Description" HeaderButtonType="TextButton"

 

 

DataField="Description">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

<DetailTables>

 

 

<telerik:GridTableView Caption="" AllowSorting="false" DataKeyNames="dt3Id,Ins#" Width="100%" ShowHeader="false" EnableNoRecordsTemplate="false" >

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields DetailKeyField="dt3Id" MasterKeyField="dt3Id" />

 

 

</ParentTableRelation>

 

 

<Columns>

 

 

<telerik:GridBoundColumn HeaderText="dt3Id" HeaderButtonType="TextButton"

 

 

DataField="dt3Id" Display="false">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Ins#" HeaderButtonType="TextButton"

 

 

DataField="Ins#" Display="True">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="P/A" HeaderButtonType="TextButton"

 

 

DataField="P/A" Display="True">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Date" HeaderButtonType="TextButton"

 

 

DataField="Date" Display="True">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Batch#" HeaderButtonType="TextButton"

 

 

DataField="Batch#" Display="True">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Type" HeaderButtonType="TextButton"

 

 

DataField="Type" Display="True">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="EDI File Name" HeaderButtonType="TextButton"

 

 

DataField="EDIFileName" Display="True">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Status" HeaderButtonType="TextButton"

 

 

DataField="Status" Display="True">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="HBOC File" HeaderButtonType="TextButton"

 

 

DataField="HBOCFile" Display="True">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Rec.Date" HeaderButtonType="TextButton"

 

 

DataField="RecDate" Display="True">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Rec.By" HeaderButtonType="TextButton"

 

 

DataField="RecBy" Display="True">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

 

</MasterTableView>

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="true" />

 

</ClientSettings>

 

 

</telerik:RadGrid>

My code behind code

 

RadGrid1.DataSource = dtTable1

RadGrid1.MasterTableView.DataSource = dtTable1

RadGrid1.MasterTableView.DetailTables(0).DataSource = dtTable2

RadGrid1.MasterTableView.DetailTables(0).DetailTables(0).DataSource = dtTable3

RadGrid1.MasterTableView.DetailTables(0).DetailTables(0).DetailTables(0).DataSource = dtTable4

Table structure -dtTable1

dt1Id Type Date EmptyColumn Description
1 Patient Encounters 2 Cases. First DOS: 08/11/2006 , Last DOS: 10/31/2006
2 Patient Statements 9 Statements, Last Statement: Monthly Statement on 01/02/2008 - Statement Balance: 308
3 Patient Notes 1 Notes, Last note  on 12/12/2006
Table Structure - dtTable2

dt1Id dt2Id Type Date EmptyColumn Description Status
1 2 Case #: 38253 08/11/2006 Batch #:ACF-081406-001 TRUE
1 3 Case #: 40081 10/31/2006 Batch #:ACF-110106-001 TRUE
2 Daily Statement 12/06/2006 Statement Balance: 658 FALSE
2 Monthly Statement 01/03/2007 Statement Balance: 658 FALSE

Table Structure - dtTable3

dt2Id dt3Id Type Date EmptyColumn Description Status
2 0 08/15/2006 Data Entry Date FALSE
2 0 08/15/2006 Coding Date FALSE
2 3 08/15/2006 Claim - Physician Claim Submitted for 658 for Primary Carrier: MUTUAL OF OMAHA (Carrier Code: 24585) TRUE
2 3 10/03/2006 Claim - Physician Claim Submitted for 658 for Secondary Carrier: UNITED AMERICAN INS CO (Carrier Code: 11088) TRUE
3 0 11/01/2006 Data Entry Date FALSE
3 0 11/02/2006 Coding Date FALSE
3 4 11/07/2006 Claim - Assistant Claim Submitted for 455 for Primary Carrier: MUTUAL OF OMAHA (Carrier Code: 24585) TRUE
3 4 11/30/2006 Claim - Assistant Claim Submitted for 455 for Secondary Carrier: UNITED AMERICAN INS CO (Carrier Code: 11088) TRUE

Table Structure - dtTable4

dt2ID dt3Id Ins# P/A Date Batch#
2 3 48457 P 08/15/2006 ACF-081506-004           
2 3 48458 P 10/03/2006                         
3 4 51376 A 11/07/2006 ACF-110706-002           
3 4 51377 A 11/30/2006 ACF-113006-003           


I am able to get upto 3 level hierachy's but iam not getting the 4th level. Kindly advise.

Regards,

Santhosh

Daniel
Telerik team
 answered on 23 Feb 2009
1 answer
105 views
Hello,

I'm working on a bug tracking system, and I use a RadGrid to display the bugs that have been reported. The grid's data source is a List<Bug>. Originally, the Bug class had only string properties, so filtering was easy, and it worked pretty well. Unfortunately, I now need to use a Priority class instead of string for the bug's priority. So I created that class and overrode the ToString() to display the priority's name. It works well for display, but filtering does not work. I tried setting the column's type to System.String, but it did nothing.

My question: is it possible to filter with an object type, and how?

Thanks in advance.
Yavor
Telerik team
 answered on 23 Feb 2009
5 answers
242 views
Hello,

I'm using the rad context menu as a popup menu, fired up with left mouse click.
problem is that when the menu slides down and opens, it immediatly closes. i noticed that if i keep the mouse button down, the context menu stays open, but i can't really do nothing that way.
unfortunatlly i can't add an example here.
basically, i have a table. each row has an onmousedown event, which fires up the context menu with the help of the contextmenu.show(event) method.

How can i fix this?
Augusto
Top achievements
Rank 1
 answered on 23 Feb 2009
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?