Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
70 views
Hi Telerik Team,

I use this link and found that this is a very good example of showing something into my product.
http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/draganddrop/defaultcs.aspx

I open the code and implement the things as discussed in this particular page and found the things proper.

Now the problem is this that I bind the ListBox with the database and try to drag the listbox item from there into the textbox. but now it is giving me that in the function RadListBox_Dropped, e.SourceDragItems.Count become 0 every time.

I am writing my code here.

protected void RadListBox_Dropped(object sender, RadListBoxDroppedEventArgs e)
    {
        if (txtNoteArea.ClientID == e.HtmlElementID)
        {
            txtNoteArea.Text = String.Empty;
            foreach (RadListBoxItem item in e.SourceDragItems)
            {
                txtNoteArea.Text += item.Text + ", \n";
            }
            if (txtNoteArea.Text.Length > 0)
                txtNoteArea.Text = txtNoteArea.Text.TrimEnd(new char[] { ',', ' ', '\n' });
        }
    }
    public void BindStandardNotes()
    {
        DataSet dsMC = new DataSet();
        SqlConnection con = new SqlConnection(System.Web.Configuration.WebConfigurationManager.AppSettings["con"]);
        SqlDataAdapter adp = new SqlDataAdapter("SPNAME", con);
        adp.SelectCommand.CommandType = CommandType.StoredProcedure;
        adp.Fill(dsMC);
        lstStandardNotes.DataSource = dsMC;
        lstStandardNotes.DataValueField = "ID";
        lstStandardNotes.DataTextField = "TEXT";
        lstStandardNotes.DataBind();
    }

<telerik:RadListBox ID="lstStandardNotes" runat="server" Width="90%" Height="200px" SelectionMode="Multiple"
                                                                        AutoPostBackOnReorder="false" EnableDragAndDrop="true" OnDropped="RadListBox_Dropped" />
<asp:TextBox ID="txtNoteArea" runat="server" Wrap="true" Rows="8" TextMode="MultiLine" Width="90%" Height="200px" ValidationGroup="QAN" />

This code is working fine if I put some static items into the ListBox, but when I bind with the Database, the SourceDragItem count become 0.

Please assist me ASAP.

Regards,
Steve Austin
Peter Filipov
Telerik team
 answered on 12 Aug 2011
1 answer
233 views
Hello people...

I'm having a problem with my RadGrid...Can you show me how can i on my asp.cs file(code behind) set the column value of my grid with a navigation property field?
RadGrid1.DataSource = this.SapDocuments;
            RadGrid1.
            RadGrid1.UniqueID.Equals("Process") =
public List<SapDocuments> GetSapDocumentsByUser(string userName)
        {
var documentsQuery = from sd in spDocs.SapDocuments
                                     join ua in spDocs.UsersAssign
                                     on new { sd.Staging.Process, sd.Priorities.Priority }
                                     equals
                                     new { ua.Process, ua.Priority }
                                     where ua.UserName == userName
  
                                     //ALterar User
  
                                     select sd;
  
  
            return documentsQuery.ToList();
        }
  
    }
  
    }

I'm using Entity, and I have the a table SapDocuments with a foreign Key of the field Process to another Table "Staging",

At this moment my grid comes with Priority and Stagin values at null and the others are fine...

<MasterTableView GridLines="None" Width="100%" ViewStateMode="Disabled" CommandItemSettings-ShowExportToCsvButton="True"
                CommandItemSettings-ShowAddNewRecordButton="false" CommandItemDisplay="Top">
                <Columns>
                    <telerik:GridBoundColumn DataField="SequencialNumber" HeaderText="SequencialNumber"
                        UniqueName="SequencialNumber" SortExpression="SequencialNumber">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn  DataField="Priority" HeaderText="Priority" UniqueName="Priority"
                        FilterControlAltText="Filter Priority column" SortExpression="Priority" DataType="System.Int32">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Process" HeaderText="Staging" UniqueName="Process"
                        SortExpression="Process" FilterControlAltText="Filter Process column">
                    </telerik:GridBoundColumn>


I need to set those two column values with the value of my navigation property....I can access to it like that:

SapDocuments.Staging.Process;
SapDocuments.Priorities.Priority;

I needed to change my datamodel and know i have the exception for Priority and Process :

 {"The ObjectContext instance has been disposed and can no longer be used for operations that require a connection."}

I have already set LazyLoad enabled...

Tsvetina
Telerik team
 answered on 12 Aug 2011
2 answers
282 views
Hi,

I have below code structure. and also note that all my parent elements including body has 100% height defined as you mentioned in http://demos.telerik.com/aspnet-ajax/splitter/examples/resizewithwindow/defaultcs.aspx.

But RadPageView doesn't take the 100% height it only takes fixed heights.

<RadSplitter height="100%" width="100%" orientation="vertical">
<RadPane width="22%" height="100%">
Some contents goes here
</RadPane>
<RadPane width="76%" height="100%">
<telerik:RadMultiPage height="100%">
<telerik:RadPageView height="100%">
Some contents goes here
</telerik:RadPageView>
</telerik:RadMultiPage>
</RadPane>
</RadSplitter>

any special ways that I should use height attribute for the RadPageView ?

Thanks
Malinda
Kate
Telerik team
 answered on 12 Aug 2011
2 answers
399 views
Hi,

Am using a RadGrid in my application. When I enter data  without any space in between(ex: HI_How_Are_You_?) in one of the columns, the data does not wrap. Kindly help me in fixing this issue as early as possible.

Thanks,
Sudha.
Sebastian
Telerik team
 answered on 12 Aug 2011
1 answer
95 views
I found GridClientSelectColumn very limited if grid has pages. There are several problems with it.

1. Keeping selected checkboxes while paging. This doesn't work out of the box and I know there are workarounds posted. By the way, I believe Telerik documentation http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html should be updated, since the code simply doesn't work since the array of selected keys needs to be stored in a hidden field.
2. Selecting all checkboxes doesn't affect checkbox at the header. Again the workaround is posted, but I am wondering why isn't it part of the control? Having hundred lines of JavaScript in order to circumvent the limitations of the control, defeats the purpose of even using one.
3. And finaly the biggest roadblock is that checking the box at the header does not check items on all pages and I don't see a way around it since I couldn't find events for the header checkbox.

Maybe it is all by design since the name of the control is GridClientSelectColumn, but it sounds that if grid has pages, I will better off by doing checkboxes manually...

-Stan
Veli
Telerik team
 answered on 12 Aug 2011
1 answer
106 views
Hi.
I have a problem where the input element gets the style below when text is entered into it.
style="background-image: none; background-position: 100% 50%; "

I need the background-image to be visible and stay in its current position. Why is the input elements style changed?
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2011
1 answer
131 views
Hi,

We are getting javascript error while working with asp.net dropdown inside the telerik . OnselectIndex change of dropdown getting javascript error "Sys.WebForms.PageRequestManagerParserErrorException".
 

Please verify the below sample code and provide the resolution.

Thanks InAdvance.

aspx code :

<

 

 

form id="form1" runat="server">

 

 

 

<telerik:RadScriptManager ID="ScriptManager" runat="server" />

 

 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">

 

 

 

<telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem" Width="740px">

 

 

 

<Items>

 

 

 

<telerik:RadPanelItem Expanded="True" Text="Step 1: Account Information" runat="server" Selected="true">

 

 

 

<Items>

 

 

 

<telerik:RadPanelItem Value="AccountInformation" runat="server">

 

 

 

<ItemTemplate>

 

 

 

 

<asp:DropDownList ID="ddTest" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddTest_OnSelectedIndexChanged">

 

 

 

<asp:ListItem>First</asp:ListItem>

 

 

 

<asp:ListItem>Second</asp:ListItem>

 

 

 

<asp:ListItem>Third</asp:ListItem>

 

 

 

 

</asp:DropDownList>

 

 

 

</ItemTemplate>

 

 

 

</telerik:RadPanelItem>

 

 

 

</Items>

 

 

 

</telerik:RadPanelItem>

 

 

 

</Items>

 

 

 

 

</telerik:RadPanelBar>

 

 

 

</telerik:RadAjaxPanel>

 

 

 

 

</form>

 


C# Code :

protected void ddTest_OnSelectedIndexChanged(object sender , Eventargs e)
{
   Response.write("test");
}

Even after removing response.write in the  code part. getting same javascript issue.
Princy
Top achievements
Rank 2
 answered on 12 Aug 2011
1 answer
106 views
I have a grid that, upon new or edited record displays GridNumericColumns with partially prepopulated values (e.g. 1234).

When clicking the cell, the prepopulated value is highlighted. Any typing will clear the prepopulated value. I don't want that.

Ideally, I'd like the cursor to position after the partially prepopulated value when the user clicks the cell, so they can complete the value (e.g. 12345678).

Any ideas?

Richard
Tsvetina
Telerik team
 answered on 12 Aug 2011
2 answers
383 views
Hi there,
        I have a main grid and a parent grid inside the main grid in a nesteview Template. Is there any way to refer the parent GridDataItem in the child grid'd itemDataBound event ? Please find the code below for your reference. Any help would be appreciated
<telerik:RadGridSkin="Office2007"runat="server"ID="rdGd1"ShowFooter="False"
                                AllowSorting="True"AllowPaging="True"   PageSize="10"
                                GridLines="None"
                                <MasterTableViewDataKeyNames="assetNodeID"AutoGenerateColumns="False"Name="MainGrid"
                                    CommandItemDisplay="Top"HierarchyLoadMode="ServerOnDemand"
                                    <CommandItemTemplate
                                        <asp:LabelID="lblHeaderr"runat="server"></asp:Label
                                    </CommandItemTemplate
                                      <Columns
.... 
.... 
..... 
  </Columns
                                    <NestedViewTemplate
    
         <asp:Panel runat="server"ID="InnerContainer"
<telerik:RadGrid id="childGrid" runat="server"  OnItemDataBound="childGrid_ItemDataBound">
 <MasterTableView>
<columns>
.....
....
....
</columns>
 </MasterTableView>
  
  
</telerik:RadGrid ></asp:Panel
                                    </NestedViewTemplate
 <ExpandCollapseColumnVisible="True"
                                    </ExpandCollapseColumn
                                </MasterTableView
                            </telerik:RadGrid>
ProtectedSuchildGrid_ItemDataBound(ByValsource AsObject, ByVale AsTelerik.Web.UI.GridCommandEventArgs)    
            ....   Here Here I need the dataItem details of the parent grid
  EndSub
Muhamed Shafi
Top achievements
Rank 1
 answered on 12 Aug 2011
3 answers
278 views
Is there a way to center the RadGrid Edit Popup Window in the browser window? I have found a way to center it in the RadGrid, but I would prefer it to be in the center of the whole web page. 

Thanks.
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?