Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
131 views
Hello,

I am editing my grid inline one row at a time.  Is there a way to make it so my users can tab out of the last editable column of one row and automatically start editing the next row? In other words, take the row I was in and commit it to the db onBlur and  move the next row into edit mode.

Iana Tsolova
Telerik team
 answered on 02 May 2012
1 answer
165 views
I've got an issue submitted but as I've been exploring solving it I realized I can't do something seemingly simple. I can't hide the toolbar. Is there a way to do this or can I only do it through manipulating the css styles?
Pero
Telerik team
 answered on 02 May 2012
1 answer
98 views
Title says it all really.

--
Stuart
Dimitar Terziev
Telerik team
 answered on 02 May 2012
1 answer
221 views
Hello,

Has anyone experienced an issue with a multi lined text box not displaying text when ReadOnly=False or Enabled=false?
Changing the property ReadOnly=true or Enabled=true displays the text.

currently using Telerik WebUI VSExtensions   2011.02.915.0

Regards,
K

Princy
Top achievements
Rank 2
 answered on 02 May 2012
7 answers
290 views
So I am running into this error after a postback on my radgrid, and I cannot figure out what the heck it is.  so its on teh following command in my radgrid.  So when it initially binds it might have a sub record or not, if they have sub record they have to choice accept it or deny it.  I the follwoing they deny it, which updates a few bits and does a rebind.  But on rebind is when i get the error its like it does not see the record or something.  but if i response.write out all the statements the data is there.


If TypeOf e.Item Is GridDataItem AndAlso e.Item.OwnerTableView.Name = "myReIssueGrid" Then
          If (e.CommandName = "Cancel") Then
              Dim ReIssueId As Integer = e.CommandArgument
              sql = "Execute sp_ReIssueCancel " & ReIssueId & ", " & Convert.ToInt32(HFPersId.Value)
              insertUpdateDelete(sql)
              'FillIssue(HFPersId.Value)
              myIssueGrid.Rebind()
          End If
      End If

after this it should do a rebind
Protected Sub myIssueGrid_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles myIssueGrid.NeedDataSource
      sql = "Select dr.strSN, dr.intTranstypeId, dm.strManufacturer + '  ' + mm.strMake + ' - ' + m.strModel Item, tt.strTransaction, i.intIssuedId, CONVERT(varchar(10), i.dtIssued, 111) DT_Issued, " _
         & "p.strFullname + '\' + p.strRank IssuedTo, ftQTY From Drat_Issued i INNER JOIN Drat_Received dr on dr.intRecId = i.intRecId INNER JOIN Drat_TransactionType tt on tt.intTransTypeId = dr.intTransTypeId " _
         & "INNER JOIN Drat_Model m on m.intModelId = dr.intModelID INNER JOIN Drat_Make mm on mm.intMakeId = m.intMakeId INNER JOIN Drat_Manufacturer dm on dm.intManufacturerId = mm.intManufacturerID INNER JOIN " _
         & "MnNgPersonnel.dbo.tblMNNatPersonnel p on p.intPersonnelId = i.intIssuedTo Where bitSigned Is Not NULL And bitTakeOffHR Is NULL And bitTransfer Is NULL and intIssuedto = " & HFPersId.Value & ""
      myIssueGrid.DataSource = getData(sql)
  End Sub

And the following is where its breaking on the bind of the subgrid
Protected Sub myIssueGrid_DetailTableDataBind(sender As Object, e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles myIssueGrid.DetailTableDataBind
       If e.DetailTableView.Name = "myReIssueGrid" Then
           sql = "Select ri.intReIssueId, ri.intIssuedId, CONVERT(varchar(10), ri.dtIssue, 111) DT_Issue, intReIssueBy, p.strFullname + '\' + p.strRank IssuedBy, mn.strFullname + '\' + mn.strRank IssuedTo " _
               & "From Drat_ReIssue ri LEFT JOIN Drat_Issued i on i.intIssuedId = ri.intIssuedId LEFT JOIN drat_Received dr on dr.intRecId = i.intRecId LEFT JOIN MnNgPersonnel.dbo.tblMNNatPersonnel p on " _
               & "p.intPersonnelId = ri.intReIssueBy INNER JOIN MnNgPersonnel.dbo.tblMNNatPersonnel mn on mn.intPersonnelId = ri.intReIssueTo Where i.bitReIssue = 1 And ri.bitAccepted Is NULL AND " _
               & "ri.intIssuedId = " & e.DetailTableView.ParentItem.GetDataKeyValue("intIssuedID")
           e.DetailTableView.DataSource = getData(sql)
       End If
   End Sub


error
intReIssueId is neither a DataColumn nor a DataRelation for table Table. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  
Exception Details: System.ArgumentException: intReIssueId is neither a DataColumn nor a DataRelation for table Table.
  
Source Error: 
  
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
  
Stack Trace: 
  
  
[ArgumentException: intReIssueId is neither a DataColumn nor a DataRelation for table Table.]
   System.Data.DataRowView.get_Item(String property) +2725340
   Telerik.Web.UI.GridTableView.PopulateDataKeys(Object dataItem) +238
  
[GridException: There was a problem extracting DataKeyValues from the DataSource. Please ensure that DataKeyNames are specified correctly and all fields specified exist in the DataSource.]
   Telerik.Web.UI.GridTableView.PopulateDataKeys(Object dataItem) +1220
   Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +431
   Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) +161
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +1450
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +858
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +94
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +182
   Telerik.Web.UI.GridTableView.PerformSelect() +206
   Telerik.Web.UI.GridTableView.DataBind() +441
   Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +2337
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +158
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +52
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +50
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +52
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +102
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +52
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707
  
  

Maria Ilieva
Telerik team
 answered on 02 May 2012
1 answer
112 views
I’m creating a radgrid like this, I bound the data to first four columns, in the last column, I create a GridTemplateColumn, and want to do like this: when click “action”, it will generate a dropdown list let you to choose edit, delete or email. The question is, how can I achieve the row data(especially the quote ID) when clicking  the GridTemplateColumn cell, I can’t get it through, please help. Thank you!
I’m creating a radgrid like this, I bound the data to first four columns, in the last column, I create a GridTemplateColumn, and want to do like this: when click “action”, it will generate a dropdown list let you to choose edit, delete or email. The question is, how can I achieve the row data(especially the quote ID) when clicking  the GridTemplateColumn cell, I can’t get it through, please help. Thank you!

<
body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
         
        <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>
 
        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"
            PageSize="26" Height="720px"
         AllowSorting="True" AllowPaging="True" AllowFilteringByColumn="True"
            Skin="Office2010Blue" CellSpacing="0" GridLines="None">
            <ClientSettings EnableRowHoverStyle="true">
                <Selecting CellSelectionMode="None" AllowRowSelect="true"></Selecting>
                <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="686px" />
                <ClientEvents OnRowMouseOver="quotes_DataGridRowMouseOverV2" OnRowSelected="quotes_DataGridFunction_V2"/>
                <Resizing AllowColumnResize="true" AllowResizeToFit="true" ResizeGridOnColumnResize="true" EnableRealTimeResize="true"/>
            </ClientSettings>
 
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" ClientDataKeyNames="ID,Bill_CompanyName"
                            DataSourceID="SqlDataSource1">
                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
 
                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
 
                <Columns>
                    <telerik:GridBoundColumn DataField="ID" DataType="System.Int32"
                        FilterControlAltText="Filter ID column" HeaderText="Quote #" ReadOnly="True"
                        SortExpression="ID" UniqueName="ID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CreateDateTime" DataType="System.DateTime"
                        FilterControlAltText="Filter CreateDateTime column" HeaderText="Create Date&Time"
                        SortExpression="CreateDateTime" UniqueName="CreateDateTime">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Bill_CompanyName"
                        FilterControlAltText="Filter Bill_CompanyName column"
                        HeaderText="Customer Name" SortExpression="Bill_CompanyName"
                        UniqueName="Bill_CompanyName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="QuoteTotal"
                        FilterControlAltText="Filter QuoteTotal column"
                        HeaderText="Quote Total" SortExpression="QuoteTotal"
                        UniqueName="QuoteTotal">
                    </telerik:GridBoundColumn>
 
                    <telerik:GridTemplateColumn
                        HeaderText="Action" UniqueName="TemplateColumn" AllowFiltering="false">
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server">Action</asp:HyperLink>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                     
                </Columns>
 
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                </EditFormSettings>
            </MasterTableView>
 
            <FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
 
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="Data Source=192.168.1.92,32071;Initial Catalog=EZPricing2;Persist Security Info=True;User ID=tem;Password=sim32071#@)&!"
            ProviderName="System.Data.SqlClient"
             
            SelectCommand="SELECT ID, Bill_CompanyName, CreateDateTime, QuoteTotal FROM tb_Quote WHERE (SalesRepId = @SalesRepId)">
            <SelectParameters>
                <asp:Parameter DefaultValue="97" Name="SalesRepId" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
 
    </div>
    </form>
</body>





Princy
Top achievements
Rank 2
 answered on 02 May 2012
4 answers
474 views

I have a RadComboBox and I am attempting to retrieve the selected item in JavaScript.  Using .NET 4.0. in FireFox 11.0.

The RadComboBox is as follows:

<telerik:RadComboBox ID="ddlBillingState" runat="server"
AppendDataBoundItems="True"
DataTextField="Name"
DataValueField="StateProvinceID"
ondatabinding="ddlBillingState_DataBinding"
ondatabound="ddlBillingState_DataBound">
<Items>
<telerik:RadComboBoxItem Text="Select a State" />
</Items>
</telerik:RadComboBox>

 

The above RadComboBox resides inside a FormView ID=VendorFormView.

When I use the following code the JavaScript terminates before the second alert is issued.  The statement with the get_selectedItem call seems to be failing. The following JavaScript is contained with the Header section of the page in which the RadComboBox resides. This JavaScript runs when the user clicks a CheckBox on the page.  The ddlBillingState control does have a selected item, which was selected by the user, but when I attempt to retrieve the selected item the JavaScript terminates.

Any help would be greatly appreciated.

var ddlBillingState = document.getElementById('<%=VendorFormView.FindControl("ddlBillingState").ClientID%>');
var ddlShippingState = document.getElementById('<%=VendorFormView.FindControl("ddlShippingState").ClientID%>');
if (ddlBillingState != null && ddlShippingState != null)
{
alert("Assigning selected billing state");
var selectedBillingItem = ddlBillingState.get_selectedItem();
alert("selectedBillingItem assigned");
var shippingItem = ddlShippingState.findItemByText(selectedBillingItem.get_text());
alert("Shipping Item assigned");
shippingItem.select();
alert("Done");
}
Cat Cheshire
Top achievements
Rank 1
 answered on 02 May 2012
6 answers
263 views
Here's my scenario: I have a master table with some items in it. Through the push of a button, you can choose to edit an item's sub-items. This expands the item, and populates the sub-items, setting each item's Edit=true, and works just fine. However, some items have tons of sub-items, so paging is necessary. When one changes the page, the new items that show up are not in Edit-mode. How do I keep them in edit mode while still allowing paging?
Peter
Top achievements
Rank 1
 answered on 02 May 2012
1 answer
210 views
Hello,

I have a Numeric Textbox in Rad Grid. I have 2 columns in that Grid. Old Price and New Price.

Old Price is dataGridItem and Had a textbox in New Price Column.

My New Price should not be greater than Old Price.

How can I set this Rad Numeric textbox in the Grid. ?

TIA
Shinu
Top achievements
Rank 2
 answered on 02 May 2012
2 answers
112 views
I have same questions here. In listview the order of next data is shown like this :
Data1  Data2  Data3
Data4  Data5  Data6
Data7  Data8  Data9
................................

Instead horizontal, can the next data be shown vertically like this :
Data1  Data4  Data7  ::
Data2  Data5  Data8  ::
Data3  Data6  Data9  ::

Thanks b4.
Michael
Top achievements
Rank 1
 answered on 02 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?