Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
103 views
Hello Sir ,

 Is it possible to load the list in Radgrid Item by column If my grid contains 3 column
one Emp Name EmpNo Marks

i want
EmpName        EmpNo         Marks
Rahul               1                       45  
xyz                     7                     34  
pqr                   3                       232
skks               4                          34

and i bind this data to radgrid using databind through codebehined. And i want to show the drop down list to every column but in column 3rd Marks columns that time marks is 34 repteted two times that time it will added automatically added once time. 

 I dont want to add the Filter template option ,, Is any thing is happen with defalut filter textbox, when it focus out it will drop the list automatically  load the list of current column

Kindley please help how to achive this functionality ?


M
Top achievements
Rank 1
 answered on 02 Sep 2009
1 answer
85 views
Hi,

Had a problem with the exporting data of the DetailTable.
Found the solution on one of the forums.

Added those lines:
myGrid1.MasterTableView.HierarchyDefaultExpanded = true;
myGrid.Rebind();

Thank you very much.
Daniel
Telerik team
 answered on 02 Sep 2009
1 answer
121 views
Hi,
I am trying to access a RadEditor inside a FormTemplate.  when I examine the content property of the RadEditor, it is spaces.  Please let me know what I am doing wrong.

Thanks!

Suresh

vb Code Behind:

 

Protected Sub btnUpdate_Click(ByVal sender As Object, ByVal e As System.EventArgs)

 

 

Dim s As String

 

s =

""

 

 

For Each item As GridEditableItem In RadGridEmpData.MasterTableView.GetItems(GridItemType.EditFormItem)

 

 

If item.IsInEditMode Then

 

 

Dim objRadEditor As RadEditor

 

objRadEditor =

CType(item.FindControl("RadEditorNotes"), RadEditor)

 

s = objRadEditor.Content

 

 

End If

 

 

Next

 

 

End Sub

 



ASPX Code:

 

<ProgressTemplate>

 

 

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

 

 

<asp:Image ID="ImageSearch" runat="server" ImageAlign="AbsMiddle" ImageUrl="Images/indicator_mozilla_blu.gif" />

 

Processing...

 

</ProgressTemplate>

 

 

</asp:UpdateProgress>

 

 

&nbsp;<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" Visible="true" runat="server">

 

 

<ContentTemplate>

 

 

<telerik:RadGrid ID="RadGridEmpData" runat="server" Width="800px" AllowPaging="True"

 

 

AutoGenerateColumns="False"

 

 

ShowStatusBar="true" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"

 

 

AllowAutomaticUpdates="True"

 

 

GridLines="None" Height="200px" ShowGroupPanel="True" AllowFilteringByColumn="True" >

 

 

<ClientSettings AllowDragToGroup="True">

 

 

<Scrolling FrozenColumnsCount="4"/>

 

 

</ClientSettings>

 

 

<MasterTableView EditMode="PopUp" CommandItemDisplay="Top" Height="200px" >

 

 

<columns>

 

 

<telerik:GridEditCommandColumn EditImageUrl="IMAGES/Editor.gif"></telerik:GridEditCommandColumn>

 

 

<telerik:GridTemplateColumn AllowFiltering="False" SortExpression="EmployeeNo" DataField="EmployeeNo" HeaderText="Employee No" UniqueName="EmployeeNo">

 

 

<ItemTemplate>

 

 

<asp:LinkButton ID="LinkButtonEmployeeNo" runat="server" Text='<%#Eval("EmployeeNo")%>'></asp:LinkButton>

 

<%

--<asp:LinkButton ID="LinkButton1" runat="server"><%#Eval("EmployeeNo")%></asp:LinkButton>--%>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn AllowFiltering="False"

 

 

DataField="ProposalVersionID"

 

 

HeaderText="Proposal Version"

 

 

SortExpression="ProposalVersionID"

 

 

UniqueName="ProposalVersionID">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Site" HeaderText="Site" SortExpression="Site" UniqueName="Site"></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="EmployeeName" HeaderText="Employee Name" SortExpression="EmployeeName" UniqueName="EmployeeName"><ItemStyle Width="250px" /></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="OriginalCC" HeaderText="OriginalCC" SortExpression="OriginalCC" UniqueName="OriginalCC"><ItemStyle Width="150px" /></telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn DataField="LevelDesc" HeaderText="LevelDesc" UniqueName="TemplateColumn">

 

 

<ItemTemplate>

 

<%

# Eval("LevelDesc") %>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<custom:MyCustomFilteringColumn DataField="LevelDesc" FilterControlWidth="180px" HeaderText="Custom TemplateColumn LevelDesc" UniqueName="TemplateColumn1">

 

 

<headerstyle width="25%" />

 

 

<itemtemplate >

 

<%

# DataBinder.Eval(Container.DataItem, "LevelDesc") %>

 

 

</

 

itemtemplate>

 

 

</custom:MyCustomFilteringColumn>

 

 

 

<telerik:GridBoundColumn AllowFiltering="False" DataField="CostRate" DataType="System.Decimal" HeaderText="CostRate" SortExpression="CostRate" UniqueName="CostRate"><ItemStyle Width="120px" /></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn AllowFiltering="False" DataField="AssessmentDate" DataType="System.DateTime" HeaderText="AssessmentDate" SortExpression="AssessmentDate" UniqueName="AssessmentDate"><ItemStyle Width="120px" /></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn AllowFiltering="False" DataField="CostRate" DataType="System.Decimal" HeaderText="CostRate" SortExpression="CostRate" UniqueName="CostRate"><ItemStyle Width="120px" /></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn AllowFiltering="False" DataField="BurdenRate" DataType="System.Decimal" HeaderText="BurdenRate" SortExpression="BurdenRate" UniqueName="BurdenRate"><ItemStyle Width="120px" /></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn AllowFiltering="False" DataField="LaborSchedule" HeaderText="LaborSchedule" SortExpression="LaborSchedule" UniqueName="LaborSchedule"><ItemStyle Width="120px" /></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn AllowFiltering="False" DataField="LaborCategoryCode" HeaderText="LaborCategoryCode" SortExpression="LaborCategoryCode" UniqueName="LaborCategoryCode"><ItemStyle Width="120px" /></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn AllowFiltering="False" DataField="ChangedUserId" HeaderText="ChangedUserId" SortExpression="ChangedUserId" UniqueName="ChangedUserId"><ItemStyle Width="120px" /></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn AllowFiltering="False" DataField="EnteredBy" HeaderText="EnteredBy" SortExpression="EnteredBy" UniqueName="EnteredBy"><ItemStyle Width="120px" /></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn AllowFiltering="False" DataField="Notes" HeaderText="Notes" SortExpression="Notes" UniqueName="Notes"><ItemStyle Width="120px" /></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn AllowFiltering="False" DataField="Education" HeaderText="Education" SortExpression="Education" UniqueName="Education"><ItemStyle Width="120px" /></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn AllowFiltering="False" DataField="Experience" HeaderText="Experience" SortExpression="Experience" UniqueName="Experience"><ItemStyle Width="120px" /></telerik:GridBoundColumn>

 

 

</columns>

 

 

<EditFormSettings EditFormType="Template" CaptionDataField="EmployeeNo" CaptionFormatString="Edit Employee Number: {0}" >

 

 

<FormTemplate >

 

 

<table id="Table2" cellspacing="2" cellpadding="1" width="50%" border="1" rules="none"

 

 

style="border-collapse: collapse; background: white;">

 

 

<tr class="EditFormHeader">

 

 

<td colspan="2" style="font-size: small">

 

 

<b> </b></td>

 

 

</tr>

 

 

<tr>

 

 

<td colspan="2">

 

 

<b>Employee Info:</b></td>

 

 

</tr>

 

 

<tr>

 

 

<td style="vertical-align: top; height: 248px; text-align: left">

 

 

<table id="Table6" cellspacing="1" cellpadding="1" width="200" border="0" class="module">

 

 

<tr>

 

 

<td>

 

 

</td>

 

 

<td>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Employee No:

</td>

 

 

<td>

 

 

<asp:Label ID="LabelEmployeeNo" runat="server" Text='<%# Bind( "EmployeeNo" ) %>'>

 

 

</asp:Label></td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Employee Name:

</td>

 

 

<td>

 

 

<asp:TextBox ID="TextBoxEmployeeName" runat="server" Text='<%# Bind( "EmployeeName") %>' tabindex="1"></asp:TextBox></td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

CC:

</td>

 

 

<td>

 

 

<asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind( "OriginalCC") %>' TabIndex="2">

 

 

</asp:TextBox></td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Site:

</td>

 

 

<td>

 

 

<asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind( "Site") %>' TabIndex="3">

 

 

</asp:TextBox></td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Education:

</td>

 

 

<td>

 

 

<asp:Label ID="LabelEducation" Text='<%# Bind( "LevelDesc") %>' runat="server"></asp:Label></td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Experience:

</td>

 

 

<td>

 

 

<asp:Label ID="LabelExperience" Text='<%# Bind( "BurdenRate") %>' runat="server"></asp:Label></td>

 

 

</tr>

 

 

</table>

 

 

</td>

 

 

<td style="height: 248px; vertical-align: top; text-align: left;">

 

 

<table id="Table7" cellspacing="1" cellpadding="1" width="250" border="0" class="module">

 

 

<tr>

 

 

<td style="width: 600px">

 

Notes:

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td >

 

 

<telerik:RadEditor ID="RadEditorNotes" runat="server" Height="411px" Width="333px">

 

 

<Content>

 

</

 

Content>

 

 

</telerik:RadEditor>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td align="right" colspan="1" style="vertical-align: top; text-align: left">

 

 

<asp:Button ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>'

 

 

runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>' BackColor="AliceBlue" OnClick="btnUpdate_Click">

 

 

</asp:Button></td>

 

 

<td align="right" colspan="2" style="vertical-align: top; text-align: left">

 

<

 

asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"

 

CommandName

 

="Cancel" BackColor="AliceBlue"></asp:Button>

 

 

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</FormTemplate>

 

 

<EditColumn UniqueName="EditCommandColumn1">

 

 

</EditColumn>

 

 

<PopUpSettings Modal="True" />

 

 

<FormMainTableStyle Height="200px" Width="400px" />

 

 

</EditFormSettings>

 

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>

 

Daniel
Telerik team
 answered on 02 Sep 2009
1 answer
102 views
Hi

How to set the focus of a text box of usercontrol which is using in on edit  item or adding  new item to grid?

I tried a solution given in link http://www.telerik.com/help/aspnet-ajax/grdsetfocusontextboxesineditcontrol.html but it's not wroking for me. when i trying to run application, showing the  that "htmlfile: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.
Daniel
Telerik team
 answered on 02 Sep 2009
0 answers
63 views
Telerik -

I have a question regarding the TreeView / First Look Live Demo for the 2009 Q1 release of RadControls. When dragging a travel package from TreeView1 to TreeView2, the TreeNode is moved to the desired TreeView and is properly shown. However, if you drag a TreeNode from TreeView2 and place it back into TreeView1 (removing it from your favorites), the node disappears until you cause an Ajax request. Another thing I noticed is that if you try to drag a package from TreeView2 to the PriceChecker, the same thing occurs. PriceChecker does not reflect the package price unless an Ajax request occurs. The same goes for dragging from TreeView2 to the RadGrid, since there is no Ajax request fired from TreeView2 the RadGrid does not update until an Ajax Request is fired. Try dragging over multiple items from TreeView2 and placing them in the RadGrid and then move a TreeNode from TreeView1 to cause an Ajax request. All of the TreeNodes that were placed in the RadGrid from TreeView2 now appear - causing undesired results.

Wouldn't it be best to ensure that TreeNode movement from TreeView2 causes an Ajax request to update the other controls, since the drag and drop functionality appears to be there for TreeView2? IMO it would better highlight the capabilities of the controls involved.

Casey
Casey
Top achievements
Rank 1
 asked on 02 Sep 2009
4 answers
100 views
Hi,

I have a standard grid and when the EnableLinqExpressions is not set on the grid (ie is True I think) the grid won't find values properly.  Ie say that there are two rows in the grid and in the filtered column there are values of Abb in the first row and Cdd in the second row.  If I enter a as the filter the Abb row isn't found.  If I enter A then the row is found.  When I set EnableLinqExpressions to false the filter works properly.

Is there a case option on the filter when EnableLinqExpressions = True?

I assume that as EnableLinqExpressions is true by default is there some performance benefit to it? 

Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 02 Sep 2009
11 answers
309 views

To my loving Telerik Community:

I write this post just in case there are others who get themselves into a situation as did I. 
I have been using 2009 Q1 release since purchasing the Telerik suite of controls.   The steps I took to upgrade to 2009 Q2 gave me a bit of a headache and took 2 days of productive time away. Here are the steps I took and advice what not to do.

  1. When I ran the Q2 Installer it reported back that a previous version was already installed and that I must remove prior to installation.
    • I later fould a fourm that talked about an upgrade installer.  I never did find such a download.  If you can find it, use it.  The normal installer requires the previous version to be removed, which did not fully work for me.
    • If such an upgrade installer is not available.  It is my advice to download the mannual install zip file. (Go to step 3)
  2. I removed the telerik using the normal process.  Everything was removed as expected except the Visual Studios Extentions.  When I went to install Q2, I got an error "Visual Studios Extension Installed, please remove ..
    • I am not sure why the Q1 Extension were not removed.  This is something Telerik folks may want to look at.  One possibilty is I am using Vista 64 and was not removing as Admin.  I am willing to bet that is the root cause. 
    • I had a heck of a time figuring out how to remove Visual Studios Extensions.  I am using VS 2005 and 2008 (I find that 2005 works best for ASP 2 and 2008 for ASP 3.5).  I found a post on how to remove extensions with 2010 but nothing for 2005 and 2008.
    • Advice:  make sure your Admin when you deinstall.  Not positive that will help, but it might work better.   If you know how to manually remove extensions, then that is another route you can take.  I never did figure that out.
  3. I downloaded the Manual Install zip and extracted the files to similar location as q1, Changing the folder to reflect Q2 (It is Not important where you extract).
  4. I moved the Q2 DLLs to my local wesite bin folder (Obviously Mandatory)
  5. I went back to one of my projects (A WAP DotNetNuke module) and found multiple errors for obvious reasons.
    • Looking in Visual Studios Object browser, the deinstall rightfully removed the telerik controls.  I added the custom by going to Edit Custom Component set (an option in the Object Browser).  I added a reference to the telerik dll.
    • If you did not uninstall then you will have a potential path issue, as it will be looking for the component in the Q1 path.  You will obviously change that so it finds the right dll.
  6. Interestingly my project compiled without error, but I was getting run time errors.  I then looked at the ascx file and saw an error in the Register tag.  It indicated a mismatch.  The error made it obvious that my project was still looking for the Q1 version
    • I looked at the project's References, located the Telerik.Web.UI and saw that it was, as expected still looking for the Q1 version.
  7. I removed the Q1 Telerik.Web.UI from the project's reference and then added a new reference using the Path to the new dll.
  8. Everything now compiles and I am happy.
  9. I add a control to the page.  As expected the deinstall removed them from the Toolbox.  I can still type them in mannually, but what a pain.  Fortunatly it is easy to add tools to the toolbox
    • If you did not remove the previous version and took the Manual Install approach, you probably have a path issue.
  10. I restored the tool box to default (not mandatory but all references to Q1 controls need to either change or be removed.  This seemed the easies)
  11. I right clicked the Toolbox and added a new tab in which I added the telerik controls
  12. I right clicked the newly created tab in the tool box and selected "Choose Items"   From there I pointed to the Q2 dll and all is working again

          

Marcos Roque Villa
Top achievements
Rank 2
 answered on 02 Sep 2009
2 answers
1.7K+ views
Hello,

I want to call a javascript method from the server side using the RadAjaxManager when the user clicks a button.  The javascript method is:

    function RunReport(viewId) { 
        var reportWindow = window.open('DisplayView.aspx?viewId=' + viewId, '_blank', "height=700,width=900,left=20,top=20,scrollbars=auto,status=no,resizable=yes,toolbar=no,menubar=no,location=no"); 
    } 
 

and the server-side handler for the button is:

        protected void testReport_Click(object sender, EventArgs e) 
        { 
            radViewAjaxManager.ResponseScripts.Add(string.Format("RunReport(\"{0}\");", workingView.Id)); 
        } 
 

The text I'm passing as the viewId has a backslash in it, like "sometext\moretext".  When debugging on the server side, I see that the value of workingView.Id is "sometext\\moretext", so the backslash is being escaped.  However, when I debug the javascript line on the client side as it's being called I see that the viewId is being set to "sometextmoretext", with NO backslash at all in it.

I also tried wrapping the parameter in the server side in single quotes RunReport('{0}') but that didn't change the behavior.  I feel like I'm overlooking something obvious, but can't quite figure it out.

Any help would be much appreciated.

Thanks!

Eddie

Eddie
Top achievements
Rank 2
 answered on 02 Sep 2009
1 answer
65 views
On the aspx page i have:

<telerik:RadGrid ID="grdAvailActions" runat="server" Width="200px" OnRowDrop="grdAvailActions_RowDrop" AllowMultiRowSelection="false" PageSize="30" OnNeedDataSource="grdAvailActions_NeedDataSource" GridLines="None">
.
.
.

and on the code behind I have:

protected void grdAvailActions_RowDrop(object sender, GridDragDropEventArgs e)
    {
.
.
.   

grdAvailActions_RowDrop is not being called when I drag an item.  What's up with this?






Mira
Telerik team
 answered on 02 Sep 2009
0 answers
147 views

Hello All,

Is it possible to code using Telerik components a dynamic BreadCrumb without any fancy Menus and get those BreadCrumb items from URLs not from xml files or Database? Like below, and those items should be links.

Home > Customer Search > Customer Results > Customer

I looked basic SiteMap control from asp.net but it seemed to have so tight connection to xml/databases.

So, has Telerik ASP.NET Ajax components have anything to offer to this issue?

I would be very glad to find a sample and/or article how to impelment it.

Cheers.

MiK

Mike
Top achievements
Rank 1
 asked on 02 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?