Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
68 views
Dear All,

I need to use Scheduler Control to create Schedule based on Time and Week Days regardless the Date. let me give you example:

I have an Employee who will work in Sat., Mon., and Thu. form 8:00 AM to 5:00 PM and in Sun., Tue., and Wed. from 10:00 AM to 7:00 PM. I want to display this schedules on Scheduler Control and Save the Time/Week Days values to database.
Please take a look to Attached image
Is it possible via using Scheduler Control??? 
Plamen
Telerik team
 answered on 21 Jan 2013
3 answers
142 views
Hello,

I have a standard GridNumericColumn that I would like to filter.  It's set to "Currency" and the DataField is set to a "money" field in my database.

When I filter the column with any number, I get the following result:

The string was not recognized as a valid format.

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.FormatException: The string was not recognized as a valid format.

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:

[FormatException: The string was not recognized as a valid format.]
Telerik.Web.UI.RadNumericTextBox.ParseDbValueString(String sValue) +221
Telerik.Web.UI.RadNumericTextBox.set_DbValue(Object value) +844
Telerik.Web.UI.GridNumericColumn.SetCurrentFilterValueToControl(TableCell cell) +121
Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +5748
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1546

Here is the definition in my ASPX page:

<telerik:GridNumericColumn HeaderText="Order Total" DataField="order_total" NumericType="Currency" AllowFiltering="true" SortExpression="order_total" AllowSorting="true" /> 

Is there something I'm missing?

Thanks!!



Angel Petrov
Telerik team
 answered on 21 Jan 2013
1 answer
126 views
Hi
I have 1 treeview and 1 combobox that used for filter of treeview. this two controls is one set. i have 3 set controls that have 3 related treeview and 3 filter combobox.these 3 treeviews is related each other.  I used openaccesslinqdatasource that get a selectedvalue of treeview. if OALDS has not data, treeview doesnt appear, automaticly  appears if there is data at OALDS
this is good for me. i dont need to manage to show or hide treeview.  But i have to show or hide comboboxes sametime with treeview.
how can i do that.
I tried treeview node count at serverside onnodeclick event but showing or hiding of combobox event goes one stepback from treeview. 
how can i show hide combobox sametime with these related treeview. 


Kate
Telerik team
 answered on 21 Jan 2013
1 answer
151 views
Hello,

Please, I am trying to submit data from controls like the textbox to the database from the panelbar containing them.

The problem is I cannot access the textbox properties in my code behind. Like I am not doing something right.

Thanks for the anticipated help.
Princy
Top achievements
Rank 2
 answered on 21 Jan 2013
3 answers
190 views
1.  I have Dropdown controls that get styled with the decorator.  When the user clicks on the down button, the dropdown list expands, but then clicking the button again will not contract the list.  This is breaking the correct operation of the dropdownlist.

<asp:DropDownList ID="AddressDropDownList" runat="server" DataSourceID="AddressSqlDataSource" DataTextField="adrFullname" DataValueField="adrIdx" AppendDataBoundItems="True" AutoPostBack="True">
    <asp:ListItem Value="" Text="--All--"></asp:ListItem>
</asp:DropDownList>


2.  The styling doesn't match a RadCombo on the same form.  The RadCombo has the text box area shaded, the dropdownlist doesn't.  Makes it pretty obvious where one or the other was used and provides inconsistent UI.  Is there a way to get them to match?
<telerik:RadComboBox ID="xrcarCarIdxRadComboBox" runat="server" DataSourceID="CarrierListSQLDataSource" DataTextField="carName"
    DataValueField="carIdx" SelectedValue='<%# Bind("xrcarCarIdx") %>' Width="300" HighlightTemplatedItems="true">
    <ItemTemplate>
        <asp:Label runat="server" ID="CarrierListLabel" >
            <b><%# Eval("carName") %></b><br /><%# Eval("carAddress")%><br /><%# Eval("carCSZ")%>
        </asp:Label>
    </ItemTemplate>
</telerik:RadComboBox>


In the master page:
<telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all" >
</telerik:RadFormDecorator>
Danail Vasilev
Telerik team
 answered on 21 Jan 2013
5 answers
1.1K+ views
Hi, 
I  am trying to get a Datagrid to work using Self Referencing heirarchy, but I get the error: No property or field 'ParentID' exists in type 'DataRowView'  when I add the FilterExpression:

RadGrid1.MasterTableView.FilterExpression =

"ParentID is null "

The code is modeled after the sample here

I can get it to work without the FilterExpression, but all items show up under the main grid, and then again as children.  It seems very simple, but I must be missing something.

 

Marin
Telerik team
 answered on 21 Jan 2013
7 answers
428 views

Hello, I´m using a RadGrid for displaying data bound using the "NeedDataSource"-event. It works almost perfectly. Since I want a combobox in one of the columns, i have a GridTemplateColumn which looks like this:

<telerik:GridBoundColumn DataField="CommunicationModule" HeaderText="CommunicationModule" UniqueName="CommunicationModule" ></telerik:GridBoundColumn>
                        
                       <telerik:GridTemplateColumn DataField="Module" HeaderText="Module" UniqueName="Module" ItemStyle-Width="400px">
                           <ItemTemplate>
                                <%#DataBinder.Eval(Container.DataItem, "Module")%>
                           </ItemTemplate>
                           <EditItemTemplate>
                                <telerik:RadComboBox runat="server" ID="cboModule">
                           </telerik:RadComboBox>
                           </EditItemTemplate>
                       </telerik:GridTemplateColumn>


The first column holds the database value (int) and the second column contains the combobox. My plan is to use the first column (which in the end is supposed to be hidden) to set the SelectedValue of the combobox. 

I´m using the ItemDataBound event to detect when to populate the combobox and set the selected item. The problem is that every time I try to access the cell value of the "CommunicationModule" cell, it contains &nbsp. I try to do this using the e.item["CommunicationModule"].Text. 

Since I populate the grid using entity framework and a anonymous list created by a query, I cannot directly cast the e.Item.DataItem either. In that case I need to create a helper class that matches the signatures of my query and that would create much more work for me since I´m doing several pages with grids populated with different data. The Grid is in "EditForms" Editmode

So:

protected void RadGridCU_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.IsInEditMode)
        {
            if (!(e.Item is IGridInsertItem)) //Is this a new item?
            {
                GridEditFormItem item = (GridEditFormItem)e.Item;
                
                RadComboBox cmb = (RadComboBox)item.FindControl("cboModule");
                cmb.DataSource = //Here I have logic to set the datasource (works);
                cmb.DataTextField = "Name";
                cmb.DataValueField = "OID";
 
                //I tried to use
                //item["CommunicationModule"].Text.ToString();
 
                //But to get it to work, I needed to create helper class and then cast the dataitem..
                cmb.SelectedValue = ((MyGridHelperClass)e.Item.DataItem).CommunicationModule.ToString();
                cmb.DataBind();
            }
        }
    }



How can I really access the cell value without the need of accessing the DataItem?



When using EditForms, I can access the value using 
item.ParentItem["CommunicationModule"].Text.ToString();

But when using InForms edit, I cannot access the value using item["CommunicationModule"].Text.ToString().


Jayesh Goyani
Top achievements
Rank 2
 answered on 21 Jan 2013
5 answers
206 views
I have a radgrid using a ItemTemplateColumn.  I have GridLines="None" and BorderStyle="None".  My display looks wonderfull until I click on one of the links in the masterview.  I see a yellow 'focus' box around my display.  Is there a way to turn this off?
Vasil
Telerik team
 answered on 21 Jan 2013
2 answers
94 views
Hello !

I am using Page Properties dialog in order to set background color or background image of RadEditor window. What I have noticed is there is not any control for uploading background image from local computer. We can just specify path of directory where images are exists on server using ImageManager's ViewPaths property. Is there any solution if I want to upload the image from local computer and set it as background image?

Awaiting for your valuable response.

Thanks
Dev
Dev
Top achievements
Rank 1
 answered on 21 Jan 2013
1 answer
257 views
Hi
I have a grid with follwing columns.. the Calumn TRANSACTION_CURRENCY_CD should be a DropDown list

.....
      <Columns>   
      <telerik:GridBoundColumn ReadOnly="true" DataField="ACCOUNT_ID" UniqueName="ACCOUNT_ID"
        HeaderText="Account ID">
        </telerik:GridBoundColumn>
     <telerik:GridDropDownColumn UniqueName="TRANSACTION_CURRENCY_CD" ListTextField="TRANSACTION_CURRENCY_CD"
  ListValueField="TRANSACTION_CURRENCY_CD" HeaderText="DropDown Column"
  DataField="TRANSACTION_CURRENCY_CD" DropDownControlType="RadComboBox" AllowSorting="true">
</telerik:GridDropDownColumn>
       <telerik:GridBoundColumn DataField="TRANSACTION_AMT" UniqueName="TRANSACTION_AMT" HeaderText="TRANSACTION_AMT">
      </telerik:GridBoundColumn>
             <telerik:GridBoundColumn DataField="LOCAL_CURRENCY_CD" UniqueName="LOCAL_CURRENCY_CD" HeaderText="LOCAL_CURRENCY_CD">
      </telerik:GridBoundColumn>
             <telerik:GridBoundColumn DataField="LOCAL_AMT" UniqueName="LOCAL_AMT" HeaderText="LOCAL_AMT">
      </telerik:GridBoundColumn>
             <telerik:GridBoundColumn DataField="SUB1" UniqueName="SUB1" HeaderText="SUB1">
      </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="SUB2" UniqueName="SUB2" HeaderText="SUB2">
      </telerik:GridBoundColumn>
    </Columns>
 
.....

public DataTable  CustomersTable
{
 
    get
    {
        DataTable  res = (DataTable)this.Session["CustomersTable"];
        if (res == null)
        {
            res = (DataTable)Table0021.Lade("1").Tables[0];
            this.Session["CustomersTable"] = res;
        }
 
        return res;
    }
}

    protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = this.CustomersTable;
    }

TRANSACTION_CURRENCY_CD is the column name in the Datatable

2 questions /problems:

- the CalumnTRANSACTION_CURRENCY_CD is always Empty (in the edit mode, too)
- I get a List<String> with the Elemts for the DropDownList. How can I bind this to the dropdownlist


Thank you very much!
Shinu
Top achievements
Rank 2
 answered on 21 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?