Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
153 views

<

 

 

telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateEditColumn="True" CellSpacing="0" DataSourceID="objGetHaulsByTripcode" GridLines="Horizontal" AutoGenerateColumns="False">

 

 

 

 

 

 

 

<MasterTableView DataSourceID="objGetHaulsByTripcode">

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="TripCode" FilterControlAltText="Filter TripCode column" HeaderText="TripCode" SortExpression="TripCode" UniqueName="TripCode"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="VessReg" FilterControlAltText="Filter VessReg column" HeaderText="VessReg" SortExpression="VessReg" UniqueName="VessReg"></telerik:GridBoundColumn>

 

 

 

 

 

 

 

<telerik:GridDropDownColumn DataField="TechniqueName" DataSourceID="getTechniques"

 

 

 

HeaderText="Technique" ListTextField="TechniqueFullName"

 

 

 

ListValueField="TechniqueCode" UniqueName="TechniqueName"

 

 

 

ColumnEditorID="TechniqueName" Reorderable="False"

 

 

 

Resizable="False"></telerik:GridDropDownColumn>

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

 

 

</MasterTableView>

 

 

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 

 

 

 

 

<asp:SqlDataSource ID="objGetHaulsByTripcode" runat="server" ConnectionString="<%$ ConnectionStrings:FisheriesConnectionString %>"

 

 

 

SelectCommand="SELECT [TripCode], [VessReg], [TechniqueName] FROM [vwDisHaulsDetailsAll] WHERE ([TripCode] = @TripCode) ORDER BY [TripCode], [VessReg]">

 

 

 

 

 

 

 

<SelectParameters>

 

 

 

 

 

 

 

<asp:ControlParameter ControlID="ddlTripCode" Name="TripCode" PropertyName="SelectedValue" Type="String" />

 

 

 

 

 

 

 

</SelectParameters>

 

 

 

 

 

 

 

</asp:SqlDataSource>

 

 

 

 

 

 

 

 

<asp:SqlDataSource ID="getTechniques" runat="server" ConnectionString="<%$ ConnectionStrings:FisheriesConnectionString %>"

 

 

 

ProviderName="System.Data.SqlClient" SelectCommand="SELECT DisTechnique.Code AS [TechniqueCode], DisTechnique.Name AS [TechniqueFullName] FROM DisTechnique INNER JOIN DisGearTechniqueAllowed ON DisTechnique.Code = DisGearTechniqueAllowed.Code INNER JOIN DisTrips ON DisGearTechniqueAllowed.METHOD_CODE = DisTrips.GearCode WHERE ([TripCode] = @TripCode)">

 

 

 

 

 

 

 

<SelectParameters>

 

 

 

 

 

 

 

<asp:ControlParameter ControlID="ddlTripCode" Name="TripCode" PropertyName="SelectedValue" Type="String" />

 

 

 

 

 

 

 

</SelectParameters>

 

 

 

 

 

 

 

</asp:SqlDataSource>



Hi,

For my GridDropDownColumn DataField="TechniqueName" how can I show the [TechniqueName] FROM [vwDisHaulsDetailsAll] WHERE ([TripCode] = @TripCode) in the grid?

In select mode, the dropdown does not show anything in the row(s). I wish it to show what it stored in the database table, based on a TripCode.

Now, in Edit mode, it lists the 4 options ok. But I wish the selected value to be what has been already stored in the database for a row, based on a Trip Code.

Any advice please? Hope this question makes sense!

Thanks, Ida

 

Ida
Top achievements
Rank 1
 answered on 11 Oct 2013
3 answers
306 views

Hi,

How to populate a radcombobox in edit mode from code behind. I tried hard its not populating.

Thanks,
Dawson.
Princy
Top achievements
Rank 2
 answered on 11 Oct 2013
1 answer
143 views
I want to disable another button on my page when the user chooses a file for upload.  It looks like this has to be client side, which is fine, but when I wire up the OnClientAdding function it gets called when the page loads, and the ClientID of the RadUpload control evaluates to null.

How can I achieve what I want?

Thanks.
Shinu
Top achievements
Rank 2
 answered on 11 Oct 2013
1 answer
56 views
I have RadGrid with a quit extended NestedView where I show the details if the Item in a Html table. The Html is styled and there is photos in the table.

Now I would like to export only this NestedViewTemplate from this one Grid Item when the user click on a button inside the NestedViewTemplate.

Is this possible?

I have tried modify this sample:

http://www.telerik.com/community/forums/aspnet-ajax/grid/grid-export-to-excel-biff-format-hierarchy-and-selected-items.aspx#2816333 

By adding a NestedViewTemplate an expand those in the Prerender event. But first of I can't it to print the NestedViewTemplate and the export contains the headers.

Could some one point me in the right direction?  Thanks :-)

bool isExport = false;
protected void Button1_Click(object sender, EventArgs e)
{
    Session["SelectedItems"] = RadGrid1.SelectedItems;
    isExport = true;
 
    RadGrid1.ExportSettings.IgnorePaging = true;
    RadGrid1.ExportSettings.UseItemStyles = true;
    RadGrid1.ExportSettings.ExportOnlyData = true;
 
    RadGrid1.MasterTableView.ExportToExcel();
}
 
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    if (isExport)
    {
        foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
        {
            item.Expanded = true;
        }
    }
}

Anders Pedersen

Kostadin
Telerik team
 answered on 11 Oct 2013
6 answers
506 views
Is there a quick an easy way to make sure that first item is selected?  After data-binding, the control doesn't have a selection (and the default message would show if set).  I was looking for a property to make sure the first item is selected instead of no selection.  I can easily set it in code-behind, but thought I might be missing something.

Thanks,
Chris
Bozhidar
Telerik team
 answered on 11 Oct 2013
1 answer
74 views
Guys i need your help. I recently work on C# .NEt and now i am looking for some good stuff that helps me in learning Asp.Net from scratch. Is there any one who can help me??
Shinu
Top achievements
Rank 2
 answered on 11 Oct 2013
3 answers
207 views
Hi. I added a telerik radgrid to my aspx page. Then I add values dynamically to it. I create a Datatable , and I add datas to it. After that, I set radgrid's datasource to datatable. It works good. Now I need to show export to excel, pdf buttons on this grid,, and export this datas to excel, word. How can I add export buttons and run thme  in dynamically created grid. Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 11 Oct 2013
2 answers
55 views
I would like to know if its possible to work out which item, by its initial Position, is being removed.
My preference is to do this in the Code Behind, but the only Event that is vaguely right is the autoCompleteRecipients_EntryRemoved event, but i believe this event fires too late for what i need.

in Javascript, the event seems to be OnClientEntryRemoving.

basically, when the Token is clicked to be removed - lets say its the 5th Token out of 10 - i want to store the fact that it is the 5th Token.
I will then use this number else-where in my code.

EDIT: it is possible for my AutoCompleteBox to have two different Tokens (entities) with the same text although they are not the same entity from the database.
e.g: my AutoCompleteBox would have a Token called 'David' which refers to the 'Manager' Entity, and another Token called 'David' which refers to the 'Director' Entity, so i cant find the position simply by the Text showing on the Token.

thanks for any help you can give.
David
Top achievements
Rank 1
 answered on 10 Oct 2013
1 answer
123 views
Using the TagCloud control, how can I set the selected Tag from the server-side code? I need the TagCloud control pre-select one of the items when the control is loaded. For example if the items = tag1, tag2, tag3, I want to set the initial selection to tag2 in the Page_Load event. How can I achieve this? Thanks!
Slav
Telerik team
 answered on 10 Oct 2013
1 answer
32 views
Hi,

We are trying to use Lightweight rendering on RadWindow, but ran into problems...

When using AutoSize and the title is set, the title is resized to 1px width!!!

Did the following sample:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="window.aspx.vb" Inherits="TestaTredjepartWeb.window" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="s" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
            <Windows>
                <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true" AutoSize="true" RenderMode="Lightweight" Title="Hello">
                    <ContentTemplate>
                        Some content
                    </ContentTemplate>
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
    </div>
    </form>
</body>
</html>
In this sample the title should be "Hello", but that isn't visible at all...
Same behavior in Q2 2013.2.717 and in the Q3 Beta!

Regards
Andreas
Marin Bratanov
Telerik team
 answered on 10 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?