Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
354 views
Is there a resource that explains the difference between GridDataInsertItem, GridDataItem, GridEditableItem, etc...  I'm working with doing the edit form functionality but getting confused who and what I should use when I do either EditMode=InPlace or EditMode=EditForms. 

For instance if do EditMode=InPlace and have a GridBoundColumn, how do I reference it in an insertCommand?  If its EditMode=EditForms I might do this:
GridEditFormInsertItem edititem = (GridEditFormInsertItem)e.Item;  
 
string EquipShortName = ((TextBox)edititem.FindControl("TextBoxName")).Text;  
 

where 'TextBoxName' is a TextBox control that exists in the FormTemplate on my designer page AND as a GridBoundColumn:
<MasterTableView CommandItemDisplay="Bottom" EditMode="EditForms">  
    <Columns> 
        <telerik:GridBoundColumn UniqueName="TextBoxName" DataField="TextBoxName">  
        </telerik:GridBoundColumn> 
        <telerik:GridEditCommandColumn   
            UniqueName="EditCommandColumn"   
            CancelText="Cancel" 
            UpdateText="Update"   
            InsertText="Insert"   
            EditText="Edit" 
            > 
        </telerik:GridEditCommandColumn>     
        <telerik:GridButtonColumn CommandName="Delete" Text="Delete"></telerik:GridButtonColumn>                           
    </Columns>    
    <EditFormSettings EditFormType="Template">  
        <FormTemplate> 
            <div style="color:#333333;">  
                <table width="100%" border="1"   
                style="  
                    background-color:#D9F0FF;  
                    font-family:Arial;  
                    font-size:9pt;  
                    border-color:Black;  
                    border-left-color:Black;  
                "  
                cellpadding="2" cellspacing="2" 
                > 
                <tr> 
                    <td style="width:50%">  
                        <table cellpadding="0" cellspacing="0" border="0" width="100%">  
                            <tr> 
                                <td>Name</td> 
                                <td align="right</td> 
                            </tr> 
                        </table>                                              
                    </td> 
                    <td style="width:50%">  
                        <asp:TextBox ID="TextBoxName" runat="server" 
                        Text='<%# Bind("TextBoxName") %>'   
                        Width="99%" TextMode="MultiLine" Rows="3" 
                        ></asp:TextBox> 
                    </td> 
                </tr> 
            </table> 
        </FormTemplate> 
    </EditFormSettings>                                                
</MasterTableView> 

But if you do EditMode=InPlace I think I would do the following:
<MasterTableView CommandItemDisplay="Bottom" EditMode="InPlace">  
    <RowIndicatorColumn> 
        <HeaderStyle Width="120px"></HeaderStyle> 
    </RowIndicatorColumn> 
    <ExpandCollapseColumn> 
        <HeaderStyle Width="120px"></HeaderStyle> 
    </ExpandCollapseColumn> 
    <Columns> 
        <telerik:GridBoundColumn DataField="TextBoxName" HeaderText="TextBoxName" UniqueName="TextBoxName">  
        </telerik:GridBoundColumn> 
        <telerik:GridEditCommandColumn   
            UniqueName="EditCommandColumn"   
            CancelText="Cancel" 
            UpdateText="Update"   
            InsertText="Insert"   
            EditText="Edit" > 
        </telerik:GridEditCommandColumn> 
        <telerik:GridButtonColumn CommandName="Delete" Text="Delete"></telerik:GridButtonColumn>   
    </Columns> 
  <EditFormSettings > 
  </EditFormSettings> 
  </MasterTableView> 

Basically not sure how to get value of TextBoxName when doing InPlace EditMode
Tsvetoslav
Telerik team
 answered on 19 Mar 2010
1 answer
310 views
Hi - I have an integer value that is being pulled from my db and displayed in my grid like this:

 <telerik:GridBoundColumn DataType="System.Int32" UniqueName="UserAccountStatus" 
                        SortExpression="UserAccountStatus" HeaderText="Status" DataField="UserAccountStatus"></telerik:GridBoundColumn>   

But that value is actually the numeric value of an enum. So - rather than displaying the numeric value of the enum, I need to display the text value of the enum.

How do I do this?

Thanks.
Shinu
Top achievements
Rank 2
 answered on 19 Mar 2010
1 answer
83 views
Hey all,

I'm setting up a grid with some GridBoundColumns and as I was building it I eventually got around to setting the CommandItemDisplay property from None to Top.  When I did this I could see the data in the columns but not the column headers (or filtering boxes)??  When I set the property back to none I could see the column headers and filtering boxes but not the Add New Record or Refresh button.

Any ideas?
Tsvetoslav
Telerik team
 answered on 19 Mar 2010
1 answer
212 views
Hi,

What is VirtualItemCount ? What is it related the total count in the datasource bounded to RadGrid?

Thanks

 

Shinu
Top achievements
Rank 2
 answered on 19 Mar 2010
1 answer
95 views
hi

I would like to disable gridHyperlinkcolumn based on condition of a gridboundcolumn value. How should i go about it ? Thanks
L
Top achievements
Rank 1
 answered on 19 Mar 2010
6 answers
156 views

Hi all,
I test this case in 2009 Q3 1314 and 2010 Q1 but the result is same. All of products are binding to each of category master row. But my others web page does not occur this logical bug!
please advice, thank you.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <asp:ScriptManager ID="ScriptManager1" runat="server">  
        </asp:ScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1"   
                            LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">  
        </telerik:RadAjaxLoadingPanel> 
        <asp:AccessDataSource ID="AccessDataSource1" runat="server"   
            DataFile="~/App_Data/dbmx_with_category.mdb"   
            SelectCommand="SELECT * FROM [Categories] where isDelete = false"></asp:AccessDataSource> 
        <asp:AccessDataSource ID="AccessDataSource2" runat="server"   
            DataFile="~/App_Data/dbmx_with_category.mdb"   
            SelectCommand="SELECT * FROM [Products] where isDelete= False"></asp:AccessDataSource> 
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateDeleteColumn="True"   
            AutoGenerateEditColumn="True" DataSourceID="AccessDataSource1" GridLines="None">  
<MasterTableView AutoGenerateColumns="False" DataKeyNames="categoryID"   
                DataSourceID="AccessDataSource1" HierarchyLoadMode="ServerBind">  
    <DetailTables> 
        <telerik:GridTableView runat="server" DataKeyNames="productID"   
            DataSourceID="AccessDataSource2">  
            <ParentTableRelation> 
                <telerik:GridRelationFields DetailKeyField="categoryID"   
                    MasterKeyField="categoryID" /> 
            </ParentTableRelation> 
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
        </telerik:GridTableView> 
    </DetailTables> 
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn Visible="True">  
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
    <Columns> 
        <telerik:GridBoundColumn DataField="categoryID" DataType="System.Int32"   
            HeaderText="categoryID" ReadOnly="True" SortExpression="categoryID"   
            UniqueName="categoryID">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="categoryTitle" HeaderText="categoryTitle"   
            SortExpression="categoryTitle" UniqueName="categoryTitle">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="categoryIcon" HeaderText="categoryIcon"   
            SortExpression="categoryIcon" UniqueName="categoryIcon">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="categorySequence" DataType="System.Int32"   
            HeaderText="categorySequence" SortExpression="categorySequence"   
            UniqueName="categorySequence">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="categoryParentID" DataType="System.Int32"   
            HeaderText="categoryParentID" SortExpression="categoryParentID"   
            UniqueName="categoryParentID">  
        </telerik:GridBoundColumn> 
        <telerik:GridCheckBoxColumn DataField="isDelete" DataType="System.Boolean"   
            HeaderText="isDelete" SortExpression="isDelete" UniqueName="isDelete">  
        </telerik:GridCheckBoxColumn> 
    </Columns> 
</MasterTableView> 
        </telerik:RadGrid> 
    </div> 
    </form> 
</body> 
</html> 
 
louis chan
Top achievements
Rank 1
Iron
 answered on 19 Mar 2010
2 answers
136 views
Hi is it possible to change the size of the popup preview window that displays the image when you double-click on the item in the FileExplorer? I see that I could in the worst case create my own preview display by using the "add_fileOpen(eventHandler)" client event.

Thank you, Christopher
Christopher Zimmermann
Top achievements
Rank 1
 answered on 19 Mar 2010
2 answers
150 views
I'm trying to get a section of code working based upon this example here:

http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx

I am getting an error at the spot where in the Telerik example they are displaying the DetailsView.

The error is saying that the DetailsView can not find the SqlDataSource which it is pointed at and yet the two items are right next to each other in the source code.

Even if I just experimentally add another control right there like a grid and use the smart tag and select a data source it sees it in the dropdown of choices for data sources but when I run the page in testing I get this error.

There must be some loss of context here and I just can't figure out what's going on.

I seem to have made the mistake of wearing my dunce cap to work today.  Any help appreciated.
John Cooney
Top achievements
Rank 1
 answered on 19 Mar 2010
2 answers
241 views
I have been playing with a few ASP AJAX packages including DevExpress, ComponentOne, Infragistics and ofc Telerik. I believe that Telerik offers the best all-round package, however, I noticed that the RadWindow equivalents from the other vendors all offer drop-shadows around the window. Is this something you are planning to add in the (near) future?
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 19 Mar 2010
1 answer
122 views
I was able to get it to build properly, i had a ' instead of a ". However i can not get it to the right level of nodes.

I would like it to start at the 2nd tier of my sitemap, and display only tiers 2, and 3

For example, my XML is formatted:

Tier 0 <HOME>
Tier 1 <Top Level Nav>
Tier 2 <Main Nav Item>
Tier 3< Sub Nav>

<telerik:RadSiteMap runat="server" ID="RadSiteMap1"  
        DataSourceID="SiteMapDataSource1" DataNavigateUrlField="Url"  
            DataTextField="Title"> 
            
            <LevelSettings> 
                
                <telerik:SiteMapLevelSetting Level="3" MaximumNodes="0"> 
                    <NodeTemplate> 
                       <a href="<%# DataBinder.Eval(Container.DataItem, "url") %>"> 
                            <%# DataBinder.Eval(Container.DataItem, "title") %></a> 
                    </NodeTemplate> 
                </telerik:SiteMapLevelSetting> 
                 
                <telerik:SiteMapLevelSetting Level="4" MaximumNodes="0"> 
                    <NodeTemplate> 
                        <div> 
                             <span class="qmdivider qmdividerx" ></span> 
                            <a href="<%# DataBinder.Eval(Container.DataItem, "url") %>"> 
                                <%# DataBinder.Eval(Container.DataItem, "title") %> 
                            </a> 
                        </div> 
                    </NodeTemplate> 
                </telerik:SiteMapLevelSetting> 
                
                
                
            </LevelSettings> 
        </telerik:RadSiteMap> 

djhushd
Top achievements
Rank 1
 answered on 18 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?