Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
78 views
I have a RadDropDownColumn and I would like to fill it using DataSoruceID='<%# GetCompany() %>' excuse me if I make a mistake using this way, just I need to know if this way is possible..otherwise how can I fix it?

Regards


Pavlina
Telerik team
 answered on 19 May 2010
1 answer
131 views
I have an issue validating GridDropDownList - it does not validate as other controls do. I have created a custom validator in the code behind but it does not fire when no value selected.


Thank you,

Steve O...

 

 

<telerik:RadGrid ID="RadGrid2"

 

runat="server"

 

GridLines="None"

 

DataSourceID="SqlDataSource11"

 

OnPageIndexChanged="dgIncidents_PageIndexChanged"

 

AllowAutomaticDeletes="True"

 

AllowAutomaticInserts="True"

 

AllowAutomaticUpdates="True"

 

OnItemInserted="RadGrid2_ItemInserted"

 

OnItemUpdated="RadGrid2_ItemUpdated"

 

OnDataBound="RadGrid2_DataBound"

 

AllowPaging="True"

 

ShowStatusBar="True"

 

AutoGenerateColumns="False"

 

Skin="Simple" >

 

 

 

 

 

 

<ValidationSettings CommandsToValidate="PerformInsert,Insert,Update,Delete"

 

EnableValidation="true" ValidationGroup="FormValidationGroup" />

 

 

 

 

 

------------------------------------------------------------------------------------------------------- 

 

 

 

 

<telerik:GridDropDownColumn DataField="UnitNameId"

DataSourceID="SqlDataSource3" DropDownControlType="DropDownList"

ListTextField="UnitName" ListValueField="UnitNameId" HeaderStyle-Font-Bold="true" UniqueName="UnitNameId"

HeaderText="Unit Name">

<HeaderStyle Font-Bold="True"></HeaderStyle>

</telerik:GridDropDownColumn>

 ----------------------------------------------------------------------------------------

 

GridDropDownColumnEditor editor = (GridDropDownColumnEditor)item.EditManager.GetColumnEditor("UnitNameId");

DropDownList ddl = (DropDownList)((Telerik.Web.UI.GridDropDownListColumnEditor)(editor)).DropDownListControl;

TableCell cell = (TableCell)ddl.Parent;

ddl.ID =

 

 

"UnitNameId";

 

 

ddl.AutoPostBack =

true;

 

ddl.CausesValidation =

 

 

true;

 

 

 

 

 

 

 


RequiredFieldValidator
validator = new RequiredFieldValidator();

 

 

 

validator.ControlToValidate = ddl.ID;

validator.ErrorMessage =

 

 

" * Unit Name Value Required";

 

 

cell.Controls.Add(validator);

Rosen
Telerik team
 answered on 19 May 2010
1 answer
359 views
Hi,

I have a Rad menu control, in that I added the controls (e.g. link button, Login Status) to the item template .I want to add the styles for the item template.
When we click on the menu item it needs to be highlight and show in different color.

i try to do this ,but styles are not applied for item template.

code :
 <telerik:RadMenu ID="radLoginInfo" runat="server" EnableEmbeddedSkins="False" Skin="MySkin"> 
                    <Items> 
                        <telerik:RadMenuItem> 
                            <Items> 
                                <telerik:RadMenuItem Text="Change Password"> 
                                    <ItemTemplate> 
                                        <asp:LinkButton ID="lnkChangePW" runat="server" OnClientClick="openWin(); return false;">Change Password</asp:LinkButton> 
                                    </ItemTemplate> 
                                </telerik:RadMenuItem> 
                                <telerik:RadMenuItem> 
                                    <ItemTemplate> 
                                        <asp:LoginStatus ID="LoginStatus1" runat="server" /> 
                                    </ItemTemplate> 
                                </telerik:RadMenuItem> 
                            </Items> 
                        </telerik:RadMenuItem> 
                    </Items> 
                </telerik:RadMenu> 

 

please help me as soon as possible, this is urgent.

thanks
waruni



Peter
Telerik team
 answered on 19 May 2010
1 answer
92 views
Hey guys,
I've just purchased the full licence of ASP.NET AJAX yesterday.
I want to have a grid with this layout for each row:
<ul>
       <li class="hover">
        <span class="result-check">
         <input type="checkbox" name="test" value="more-sub" />
        </span>
        <span class="result-img">
         <img src="#" />
        </span>
        <span class="result-detail">
         <span class="info-1">
          <label>Unit</label><span class="value"><%# Eval("Unit")%></span>
          <label>Name</label><span class="value"><%# Eval("Name")%></span>
          <label>Type</label><span class="value"><%# Eval("Type")%></span>
         </span>
         <span class="info-1">
          <label>Area m<sup>2</sup></label><span class="value"><%# Eval("Area")%></span>
          <label>Divisible area</label><span class="value"><%# Eval("DArea")%></span>
         </span>
         <span class="info-1">
          <label>Rent m<sup>2</sup></label><span class="value"><%# Eval("RArea")%></span>
          <label>Rent p.a</label><span class="value"><%# Eval("RPA")%></span>
         </span>
         <span class="hover-info">
          <span><a href="#" class="view">View</a></span>
          <a href="#">Edit</a>
          <a href="#">Email</a>
          <a href="#">Print</a> |
          <a href="#">Add an enquiry</a> |
          <a href="#">Create note</a>
         </span>
        </span>
        <span class="result-medium">
         <span>M</span>
        </span>
       </li>
</ui>

My datasource is a Generic List. When I use Itemtemplate, my grid stays empty.
I would be so thankful if you can reply ASAP.

Cheers
Nikolay Rusev
Telerik team
 answered on 19 May 2010
5 answers
296 views
Hi All,

I am using the RadGrid and have added a GridBinaryImageColumn. The ROW gets bigger when an image is in the record (rows where there are NO image data, are lean, this is just because I defined width and height manually in order to see if something is happening once there is an image in the database).

However, although there is a larger space in the column I cannot see any picture. The database table itself has an image field. I tried to read binary date through writing a memory stream to a bitmap and this worked fine.

Working with the BinaryImageColumn doesnt show any picture. Please find below the code.

I have set HeaderText and DataField to the name of the database table field, which is 'Signature'.

I have set DataType to System.Byte

  <Columns>
        <telerik:GridBoundColumn DataField="OrderNumber" DataType="System.Int32"
            HeaderText="OrderNumber" SortExpression="OrderNumber"
            UniqueName="OrderNumber">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ParcelNumber" HeaderText="ParcelNumber"
            SortExpression="Parcelnumber" UniqueName="ParcelNumber">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="DeliveryTime"
            DataType="System.DateTime" HeaderText="DeliveryTime"
            SortExpression="DeliveryTime" UniqueName="DeliveryTime">
        </telerik:GridBoundColumn>
        <telerik:GridBinaryImageColumn AlternateText="" DataField="Signature"
            HeaderText="Signature" ImageAlign="Left" ImageHeight="100px"
            ImageWidth="200px" UniqueName="Signature">
        </telerik:GridBinaryImageColumn>
        <telerik:GridCheckBoxColumn DataField="Retoure" DataType="System.Boolean"
            HeaderText="Retoure" SortExpression="Retoure" UniqueName="Retoure">
        </telerik:GridCheckBoxColumn>
    </Columns>
sunita ahire
Top achievements
Rank 1
 answered on 19 May 2010
3 answers
238 views
Hi there,

Happy new year for all!!!
How to use a radiobutton inside gridTemplateColumn as editcommand button?
When you check a radiobutton, the corresponding row should get changed to edit mode.

Thanks in advance,

Toby
Shinu
Top achievements
Rank 2
 answered on 19 May 2010
14 answers
570 views

I have followed the example here to the letter:

http://www.telerik.com/help/aspnet-ajax/radgrid-filter-template.html

I have used the code-behind method since I am not using an EntityDataSource. However, it just doesn't work. After selecting a different item from the combobox it goes through the code to set the filter but then the combobox just gets reset to it's original value and nothing is filtered.

Here is my grid:

<telerik:RadGrid ID="RadGridEmployeeTransactions" runat="server"   
    AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True"   
    AutoGenerateColumns="False" GridLines="None" ShowGroupPanel="False" Width="620px" 
    EnableLinqExpressions="false">  
    <HeaderContextMenu> 
        <CollapseAnimation Duration="200" Type="OutQuint" /> 
    </HeaderContextMenu> 
    <PagerSTyle AlwaysVisible="true" Mode="NextPrevNumericAndAdvanced" /> 
    <MasterTableView> 
        <Columns> 
            <telerik:GridBoundColumn DataField="TransactionID" Groupable="False"   
                HeaderText="ID" ReadOnly="True" SortExpression="TransactionID"   
                UniqueName="TransactionID" 
                FilterControlWidth="50px">  
                <HeaderStyle HorizontalAlign="Center" Width="70px" /> 
                <ItemStyle HorizontalAlign="Center" Width="70px" />                                          
            </telerik:gridboundcolumn> 
            <telerik:GridBoundColumn DataField="DateSubmitted" Groupable="True"   
                HeaderText="Date Submitted" ReadOnly="True" SortExpression="DateSubmitted"   
                UniqueName="DateSubmitted" GroupByExpression="DateSubmitted" > 
                <HeaderStyle HorizontalAlign="Left" Width="130px" /> 
                <ItemStyle HorizontalAlign="Left" Width="130px" /> 
                <FilterTemplate> 
                    <telerik:RadComboBox ID="RadComboboxDateSubmittedFilter" 
                        runat="server" AutoPostBack="true" OnSelectedIndexChanged="RadComboboxDateSubmittedFilter_SelectedIndexChanged">  
                        <Items> 
                            <telerik:RadComboBoxItem Value="2009" Text="2009" /> 
                            <telerik:RadComboBoxItem Value="2008" Text="2008" /> 
                        </Items> 
                    </telerik:RadComboBox> 
                </FilterTemplate> 
            </telerik:gridboundcolumn> 
            <telerik:GridBoundColumn DataField="Tooltip" Groupable="True"   
                HeaderText="Transaction Type" ReadOnly="True" SortExpression="Tooltip"   
                UniqueName="Tooltip" GroupByExpression="Tooltip"   
                FilterControlWidth="200px">  
                <HeaderStyle HorizontalAlign="Left" Width="250px" /> 
                <ItemStyle HorizontalAlign="Left" Width="250px" /> 
            </telerik:gridboundcolumn> 
            <telerik:GridBoundColumn DataField="Status" Groupable="True"   
                HeaderText="Transaction Type" ReadOnly="True" SortExpression="Status"   
                UniqueName="Status" GroupByExpression="Status"   
                FilterControlWidth="100px">  
                <HeaderStyle HorizontalAlign="Left" Width="150px" /> 
                <ItemStyle HorizontalAlign="Left" Width="150px" /> 
            </telerik:gridboundcolumn> 
        </Columns> 
    </MasterTableView> 
    <ClientSettings AllowDragToGroup="True">  
    </ClientSettings> 
    <FilterMenu> 
        <CollapseAnimation Duration="200" Type="OutQuint" /> 
    </FilterMenu> 
</telerik:RadGrid> 

And here is the event handler:

    Public Sub RadComboboxDateSubmittedFilter_SelectedIndexChanged(ByVal sender As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs)  
 
        Dim lBeginDate As String = "1/1/" & e.Value + " 12:00:00 AM" 
        Dim lEndDate As String = "12/31/" & e.Value  + " 11:59:59 PM" 
 
        Dim lFilterExpression As String = String.Format(CultureInfo.CurrentCulture, "([DateSubmitted] BETWEEN '{0}' AND '{1}'", lBeginDate, lEndDate)  
 
        RadGridEmployeeTransactions.MasterTableView.FilterExpression = lFilterExpression   
        RadGridEmployeeTransactions.MasterTableView.Rebind()  
 
    End Sub 

What gives? It seems like the filtering is a great feature but once you start getting into a complicated design (multiple master pages, user controls etc. all of the functionality is broken. I wouldn't even be trying to use the FilterTemplate if the normal filters worked on this page but they don't. No filteroptions are even displayed upon clicking the filter image.

Filtering on this grid is needed and I do not want to have to re-write my query so that I can pass in all of the filter criteria and then do all the filtering manually, that kind of defeats the purpose of using your controls.

Any help to get this resolved is greatly appreciated.

Thanks!
newbie
Top achievements
Rank 1
 answered on 18 May 2010
1 answer
103 views
I have some hidden columns and some external comboboxes that controls the filter mechanism in the grid.
I filter using the hidden columns (I don't want to show these columns in the grid).
If I set allowfilteringbyColumn = "true" then the filter row shows up. I don't want to show the filter row but still aloowcolumnfiltering on my grid. Without that feature the grid loses its filterexpression and I find it hard and messy to apply multple filters.

Can you show me how to hide the filter row. I use multiple instances of grid throughout my application, so I don't want to change the grid css.

Thanks,
Daniel
Telerik team
 answered on 18 May 2010
2 answers
190 views
I created a simple page with a button inside a RadAjaxPanel and several labels inside their own RadAjaxPanels.  I set the update mode on each RadAjaxPanel to Always using the AjaxSettingCreating event.  The button click event sets the text property of each label to the current DateTime.  In theory, when I click the button, every label should update to the current DateTime.  However, none of the labels update. 

I also put two ASP.NET UpdatePanels on the page with labels in them and their update modes set to Always.  They do update correctly, but not the RadAjaxPanels.

What am I missing?
Fred Wesson
Top achievements
Rank 1
 answered on 18 May 2010
1 answer
84 views
Hello,

I'm trying to change the "Grid / Using Server-side API" demo to have the drop-down list pull data from a different data table or data source.

To illustrate the scenario, here is a theoretical example:

1. Lets say I have a stored proc called SP1 returning a list of customers who bought cars. The proc returns customer_id, customer_name and car_make_id.
2. Lets say I have another stored proc called SP2 that returns a list of the car makes (make_id and make_name).
3. Lets say I'm implementing a structure very similar to the "Grid / Using Server-side API" demo.

How could I arrange the bindings if I want the grid to show customer data based on the data from SP1 displaying a customer name (just a textbox - easy stuff) and a car make (a drop-down list with a list of all makes returned by SP2, with the customer's car make selected)?

To clarify the situation a little bit:

The demo is located here: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/extractvalues/defaultcs.aspx
It has a drop-down box that is bound to the same datasource as everything else and therefore would not display a distinct list of items... or car makes in the example I've made up above. Instead it would just show a non-unique list of all make IDs associated with the customers so far (and would not show makes that exist in the Make database table, but haven't been yet associated with the customers).


Any help would be truly appreciated.

Thank you!
Vassili King
Top achievements
Rank 1
 answered on 18 May 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?