Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
530 views
I need to find the data key value (the identity value) of a record immediately after it is inserted.  I tried the GetDataKeyValue method on the GridEditFormInsertItem in the ItemInserted event but it is coming back null.  See below...

 

GridEditFormInsertItem i = (GridEditFormInsertItem)e.Item;

 

 

string keyValue = i.GetDataKeyValue("id").ToString();

I am able to this in the ItemUpdated using almost the exact same code...

 

 

GridEditableItem i= (GridEditableItem)e.Item;

 

 

string keyValue = i.GetDataKeyValue("id").ToString();

and that works.

Anyone know how to do this?

 

Marin
Telerik team
 answered on 02 Nov 2010
1 answer
92 views
Hi Telerik Team,

  Could you please clarify the below query ?

    How can I child grid (DetailsTable) kept open after page refreshing ?
                       

Regards,
Rajesh Kumar C
Mira
Telerik team
 answered on 02 Nov 2010
1 answer
129 views
I wish to read the files uploaded right after they are uploaded.
I tried to use _FileUploaded event but the files are not copied into the target directory until after this event ends.
I don't want two buttons for the user, one for copying the files to the target directory and the other to read the file.

Any sugestions?
Genady Sergeev
Telerik team
 answered on 02 Nov 2010
3 answers
124 views
My Design page
<
telerik:RadTreeView ID="tvPropertyType" runat="server" Skin="Outlook" EnableDragAndDrop="True" OnClientNodeDropping="onNodeDropping" CheckBoxes="True" CheckChildNodes="True" TriStateCheckBoxes="True" EnableDragAndDropBetweenNodes="True" DataSourceID="ObjectDataSource1" DataTextField="DocumentType" DataValueField="DocumentTypeID">
    <Nodes>
    <telerik:RadTreeNode runat="server" Text="Root RadTreeNode1">
        <Nodes>
              <telerik:RadTreeNode runat="server" Text="Child RadTreeNode 1">
                  <NodeTemplate>
                    <telerik:RadGrid ID="rgForTree" runat="server">
                  </telerik:RadGrid>
              </NodeTemplate>
              </telerik:RadTreeNode>
              </Nodes>
        </telerik:RadTreeNode>
     </Nodes>
</telerik:RadTreeView>

My Code Behind
Protected Sub tvPropertyType_NodeDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles tvPropertyType.NodeDataBound
 
Dim rgForTree As RadGrid = DirectCast(e.Node.FindControl("rgForTree"), RadGrid)
        rgForTree.DataSource = Documents.GetPropertyDocumentsForUser(CInt(Me.lblPropertyID.Text), CurrentUser.UserID, e.Node.Value)
        rgForTree.DataBind()
 
    End Sub

I am not able to get the reference for the grid.
I have tried the code in "tvPropertyType_DataBound" as well.
I have tried the same code in a button click which is outside the tree.

Still not able to refer the grid in the treeview node
Nikolay Tsenkov
Telerik team
 answered on 02 Nov 2010
1 answer
94 views
Hi,

I have a Treeview control nested inside a RadComboBox. The Expand mode is ServerSideCallBack. I want to select a node in the tree through javascript. But the branch for that node is not expanded. I know all the ancestors of that node. So I tried to expand that branch starting from the top level parent. I use the following piece of code to expand the parent.

if

 

(parentNode != null && !parentNode.get_expanded()) {

 

_treeFirst.trackChanges();

parentNode.set_expandMode(Telerik.Web.UI.TreeNodeExpandMode.ServerSideCallBack);

parentNode.set_expanded(

true);

 

_treeFirst.commitChanges();

}


This expands only the second level parent (the first level parent is already there and expanded on the initial load). I am not able to expand further from the second level. Please help!!
Nikolay Tsenkov
Telerik team
 answered on 02 Nov 2010
4 answers
188 views

Hi,

 


I’m trying to install “Telerik_AJAX_controls_2010_2_929_for_SharePoint_2010_Dev.msi” and I have a rollback installation failure.

 


I’m very interested to know why the installer tries to access the "SharePoint_Config" database:

 


Looking in “event log”:

 


SQL database login for 'SharePoint_Config' on instance 'SP2010D' failed. Additional error information from SQL Server is included below.

Login failed for user 'PHARMA\GTYSAPPSPTT01$'.

 


Looking in “installation wizard log”:

 


System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Management.Automation.CmdletInvocationException: Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have the appropriate permissions to access the database before trying again. ---> Microsoft.SharePoint.PowerShell.SPCmdletException: Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have the appropriate permissions to access the database before trying again.

 


Regards,
Frederic Dobon

Frederic Dobon
Top achievements
Rank 1
 answered on 02 Nov 2010
1 answer
389 views
Hi, I am using rad controls for asp.net ajax 3.5 and trying to implement captcha on  login page but it's not showing me image.
Here is my code
     <telerik:RadCaptcha ID="recaptcha" Runat="server">
                   </telerik:RadCaptcha>

     <telerik:RadCaptcha ID="recaptcha" Runat="server">
                   </telerik:RadCaptcha>
<telerik:RadCaptcha ID="recaptcha" Runat="server" />


I used Fiddler to debug it and found Telerik.Web.UI.WebResource.axd?type=rca&guid=d0e22fea-8a18-473b-b726-240bdbde0f6b is missing so I think there is some setting in web.config that is missing..

Please help me.

Thanks
Pero
Telerik team
 answered on 02 Nov 2010
1 answer
52 views
   Can anybody suggest a solution or workaround to this issue - Whitespace between the header and the content in IE7? It appears in the static header mode when the amount of rows is high (200 rows or so). It looks fine in IE8 or FF or Safari. The problem seems to pertain to the client RadGrid functionality which sets the Y offset incorrectly for the content table. It happens when the mouse cursor is lingered over the content table or when it's clicked on the content table.

Thank you,
Alex
Dimo
Telerik team
 answered on 02 Nov 2010
1 answer
125 views

I need to do client side validation in radgrid for this above scenario and i need to disable link button it criteria doesnot match.







Thanks,

Nagendra Prasad

Tsvetina
Telerik team
 answered on 02 Nov 2010
1 answer
86 views
I'm using details table on radgrid.Row select is not working for details table only when i set HierarchyLoadMode="ServerOnDemand".Please Help me to out of this.
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource"
                        OnDetailTableDataBind="RadGrid1_2Bind" OnItemDataBound="RadGrid1_OnDataBound" OnPreRender="RadGrid1_OnPreRender"
                    <HeaderStyle CssClass="RadGridHeader" />
                    <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true"/>
                    <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                        <ClientEvents  OnRowDblClick="RowDblClicked"  />
                        <Selecting AllowRowSelect="True"  />
                    </ClientSettings>
                    <MasterTableView  AutoGenerateColumns="False"  HierarchyLoadMode="ServerOnDemand" ShowHeadersWhenNoRecords="false" NoDetailRecordsText="">
                        <CommandItemSettings ExportToPdfText="Export to Pdf" ShowAddNewRecordButton="False"
                            ShowExportToExcelButton="True" ShowExportToPdfButton="True" ShowExportToWordButton="True"
                            ShowRefreshButton="False" />
                             
                            <DetailTables>
                                <telerik:GridTableView runat="server"  Name="RedGrid_2"   
                                    AllowPaging="true" AutoGenerateColumns="False" NoMasterRecordsText="" PageSize="10" Width="100%">
                                    <Columns>
                                        <telerik:GridBoundColumn SortExpression="SupplierName" HeaderText="Supplier Name"
                                            DataField="SupplierName"> 
                                        <telerik:GridTemplateColumn  HeaderText="DM" SortExpression="DMetrix" DataType="System.String"
                                        UniqueName="DM" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                           <a><%# ((Int32)(DataBinder.Eval(Container.DataItem, "DMetrix")) == -2) ? ("--") : DataBinder.Eval(Container.DataItem, "DMetrix")%></a>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </telerik:GridTemplateColumn>                                                                         
                                    </Columns>
                                </telerik:GridTableView>
                            </DetailTables>
             
                        <Columns>
                            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" SortExpression="ID"
                                UniqueName="ID"  Visible="false">
                            </telerik:GridBoundColumn> 
<%--                            <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name"
                                UniqueName="Name" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                            </telerik:GridBoundColumn>--%> 
                            <telerik:GridTemplateColumn HeaderText="" UniqueName="UpANDDown" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                <itemtemplate>
                                    <asp:ImageButton ID="btnUp" runat="server" OnClick="btnUp_Click" ImageUrl="images/UP_Arrow_Icon.png" CommandName="UP" />
                                    <asp:ImageButton ID="btnDown" runat="server" OnClick="btnDown_Click" ImageUrl="images/DOWN_Arrow_Icon.png" CommandName="DOWN"/>
                                </itemtemplate>
                                <itemstyle horizontalalign="Center"></itemstyle>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Field Quota" SortExpression="FieldQuota"
                                UniqueName="FieldQuota" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:TextBox ID="tbFieldQuota" runat="server" Text='<%# Bind("FieldQuota") %>' ToolTip="Enter Numeric Value"
                                            Width="50px" MaxLength="5" OnTextChanged="UpdateFieldQuotaInGrid" AutoPostBack="true"></asp:TextBox>  
                                </ItemTemplate>
                            </telerik:GridTemplateColumn> 
  
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Order" HeaderText="Order"
                                UniqueName="IsLock" Visible="false">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                     
                </telerik:RadGrid>
                </ContentTemplate>
                

protected void RadGrid1_2Bind(object source, GridDetailTableDataBindEventArgs e)
        {
           
            try
            {
                GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
                if (e.DetailTableView.Name == " RadGrid1_2Bind")
                {
                    string parentHedgeRemaining = dataItem["ID"].Text;
                     
                        DataTable dt = GetDatatabe();
                        e.DetailTableView.DataSource = dt;
                    
                }
                else
                {
                    e.DetailTableView.DataSource = null;
                }
            }
            catch (Exception ex)
            {
            }
        }

Iana Tsolova
Telerik team
 answered on 02 Nov 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?