Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
132 views
hey - i have a custom filter for combox in a telerik filter  that i'd like to be typeable.
it's built in to the other radComboboxes:
can you suggest anything that i could use to make this possible - below is part of that initialize of the class:
i tried using [comboBox.EnableLoadOnDemand = true;] - but i dont know how to refernce the Object DataSouce to pick what's being typed in the filter ComboBox.
mark up is included:

 

 

<telerik:RadFilter ID="InventoriesRadFilter" runat="server" Skin="WebBlue" ShowApplyButton="true"

 

 

 

OnPreRender="InventoriesRadFilter_PreRender" OnApplyExpressions="InventoriesRadFilter_Apply"

 

 

 

ApplyButtonText="Filter Inventory" OnFieldEditorCreating="RadFilter_FieldEditorCreating" OnItemCommand="InventoriesRadFilter_ItemCommand">

 

 

 

<FieldEditors>

 

 

 

<goldcustom:RadFilterComboBoxEditor DataSourceID="GetCustInvODS" FieldName="OWNER_COMPANYNAME" DisplayName="Owner Name" ComboBoxSkin="WebBlue" ComboBoxWidth="350px"

 

 

 

DataType="System.String" />

 

 

 

</FieldEditors>

 

 

 

</telerik:RadFilter>

 

THE ODS [need somehow to get what's typed in the RadFilterComboBoxEditor above

 

 

public DataTable getCustForInventory()

 

{

 

 

DataTable dt = new DataTable();

 

 

 

int[] myLoc = DivisionIDArray;

 

 

 

using (InventoryBC ibc = new InventoryBC())

 

{

dt = ibc.GetCustomerForInventory(myLoc,

 

"" );

 

 

 

return dt;

 

}

}




THE CLASS:

 

 

public override void InitializeEditor(Control container)

 

{

comboBox =

 

new RadComboBox();

 

comboBox.ID =

 

"ComboBoxEditor" + FieldName;

 

comboBox.DataSourceID = DataSourceID;

comboBox.OnClientSelectedIndexChanged =

 

"clientSelectedIndexChanged";//changes focus to the default button of the page

 

comboBox.OnClientLoad =

 

"clientSelectedIndexChanged";//changes focus to the default button of the page so, 1st item in the list can be selected

 

comboBox.DataTextField = (

 

String.IsNullOrEmpty(DataTextField)) ? FieldName : DataTextField;

 

comboBox.DataValueField = (

 

String.IsNullOrEmpty(DataValueField)) ? FieldName : DataValueField;

 

comboBox.Skin = ComboBoxSkin;

comboBox.Width = ComboBoxWidth;

container.Controls.Add(comboBox);

}

Antonio Stoilkov
Telerik team
 answered on 05 Jul 2013
1 answer
78 views
I'm currently working with a number of RadCharts and a RadGrid. When a RadChart is clicked I switch its skin from black to deep red to show that it has been selected. This functionality works just fine. When one of the other charts is clicked a message is broadcast to all other charts to change their skin back to black if they were deep red. The line of code is called and the variable RadChart1.Skin is set to black, but the appearance of the chart maintains the deep red skin. If I set "SkinsOverrideStyles" to true the chart does change correctly, but it changes my legend back to SeriesName rather than ItemLabels (as well as changing a few other things I have set) so that solution doesn't seem plausible. Is there any reason why the chart would only correctly change skins once? As I previously stated even with SkinsOverrideStyles set to false it makes the change from Black to Deep Red without any problems, the issue is when I try to switch back from Deep Red to Black.
Nikolay
Telerik team
 answered on 05 Jul 2013
8 answers
481 views
I have a RadGrid that is residing on a small RadWindow.  I want to disable/disallow the Page Size dropdown option on the grid interface.  How can this be done?  Thanks for any help in advance.
he
Top achievements
Rank 1
 answered on 05 Jul 2013
2 answers
51 views
Hi,

Just upgraded radeditor to the latest version from an very old version (.net 1.1 site), now my site is running on .net 4.0, I have removed all the old telerik dll files and new rad editor seems working fine, I can edit/save the content, however, when I open the image manager from rad editor, image manager page is loaded, and the default folder in image manager is correct, I can see the sub-folders, but I can't see the (image) files, although it does say 'items 1 to 100 of 101', also none of the buttons is working on image manager page...

any help would be appreciated!

AUK
Top achievements
Rank 1
 answered on 04 Jul 2013
3 answers
176 views
I have a usercontrol with a radcombobox inside an update panel. I am using many of these user controls on a single page. EDIT: I've enabled load on demand for the combobox.

When I finish using one of these comboboxes and click outside (blur the combobox), it calls the correct usercontrol page_load and the correct validation (validation only for that control).

However, every time I enter a letter into the combobox, it seems to call ALL page_loads and ALL validations.

To recap, selectedindexchanged causes only the required page_loads and validations to fire. Loadondemand causes all page_loads and validations to fire. Its almost as if selectedindexchanged only causes a partial postback while loadondemand causes a full postback. NOTE: LoadOnDemand does not cause the panels to update, it only calls the incorrect page_load and validation.

FYI, I've got the updatemode for the update panels as conditional and children as triggers. Does loadondemand not register as a trigger for this update panel?
If so, how do I add loadondemand as a trigger to the update panel?
If not, then what do you think is the issue here?

P.S.: That was a very confusing post, I'm still not sure if I'm getting my point across. Please let me know if you need more information.
Hristo Valyavicharski
Telerik team
 answered on 04 Jul 2013
3 answers
130 views
I am trying to use an Image and Map inside of a RadMenuItem and I cannot get the image map click events to fire.  If I pull the image and map code outside of the RadMenu, it works as expected?  Any ideas?

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="SOMS.master.cs" Inherits="SOMS.SOMS" %>
 
<!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>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadMenu ID="RadMenu1" runat="server">
            <Items>
                <telerik:RadMenuItem Text="Main Menu" PostBack="false">
                    <Items>
                        <telerik:RadMenuItem>
                            <ItemTemplate>
                                <img id="imgMainMenu" src="images/MainMenu.jpg" usemap="#mapMainMenu" border="0"
                                    width="950" height="510" alt="" />
                                <map id="_mapMainMenu" name="mapMainMenu">
                                    <area shape="rect" coords="46,79,143,148" href="CSRRequestRefill.aspx" alt="Request Refill"
                                        title="Request Refill" />
                                    <area shape="rect" coords="46,293,143,362" href="PHRSubmitRequst.aspx" alt="Submit Request"
                                        title="Submit Request" />
                                    <area shape="rect" coords="233,79,330,148" href="CSRStatus.aspx" alt="CSR Status"
                                        title="CSR Status" />
                                    <area shape="rect" coords="233,179,330,248" href="CSRIntake.aspx" alt="CSRIntake.aspx"
                                        title="CSRIntake.aspx" />
                                    <area shape="rect" coords="233,291,330,360" href="CSRBillPrep.aspx" alt="CSRBillPrep.aspx"
                                        title="CSRBillPrep.aspx" />
                                    <area shape="rect" coords="233,406,330,475" href="CSRApproval.aspx" alt="Approval"
                                        title="Approval" />
                                    <area shape="rect" coords="419,291,516,360" href="PHRRequestHold.aspx" alt="Request Hold"
                                        title="Request Hold" />
                                    <area shape="rect" coords="623,292,720,361" href="PHRFilling.aspx" alt="Filling"
                                        title="Filling" />
                                    <area shape="rect" coords="623,404,720,473" href="PHRShipping.aspx" alt="Shipping"
                                        title="Shipping" />
                                    <area shape="rect" coords="810,90,907,159" href="PHRStatus.aspx" alt="Status" title="Status" />
                                    <area shape="rect" coords="808,291,905,360" href="PHRCompounding.aspx" alt="Compounding"
                                        title="Compounding" />
                                    <area shape="rect" coords="808,405,905,474" href="PHRShipped.aspx" alt="Shipped"
                                        title="Shipped" />
                                </map>
                            </ItemTemplate>
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
 
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>
Boyan Dimitrov
Telerik team
 answered on 04 Jul 2013
3 answers
109 views
I am using the latest Q2 release of 2013 .NET version 4.5.

I have a method that creates a grid programmatically. This method is called on Page_Init wherever it is used. Grid is created and works just fine as long as I do not add "AllowFilteringByColumn = true". Here is the body of the method:
RadGrid grid = new RadGrid();
grid.ID = "CustomViewGrid";
grid.AllowFilteringByColumn = true;
grid.AutoGenerateColumns = false;
grid.AllowPaging = true;
grid.AllowSorting = true;
grid.PageSize = view.PageSize;
grid.ClientSettings.Scrolling.AllowScroll = true;
grid.ClientSettings.Scrolling.SaveScrollPosition = true;
grid.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel( 500 );
grid.ClientSettings.Scrolling.UseStaticHeaders = true;
grid.ClientSettings.Selecting.AllowRowSelect = true;
grid.ClientSettings.Selecting.UseClientSelectColumnOnly = true;
grid.AllowMultiRowSelection = true;
grid.GroupingSettings.CaseSensitive = false;
grid.PagerStyle.Mode = GridPagerMode.NextPrevNumericAndAdvanced;
grid.MasterTableView.AutoGenerateColumns = false;
grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None;
grid.MasterTableView.DataKeyNames = new string[] { view.TableKeyName };
return grid;


I have methods to create the columns, which are added to the master table view column collection:
GridBoundColumn column = new GridBoundColumn();
column.DataField = dataField;
column.UniqueName = dataField;
column.AllowFiltering = true;
column.CurrentFilterFunction = GridKnownFunction.Contains;
column.FilterControlWidth = Unit.Pixel(100);
column.ItemStyle.Width = Unit.Pixel(120);
column.HeaderStyle.Width = Unit.Pixel(120);
column.AutoPostBackOnFilter = true;
column.ShowFilterIcon = false;
return column;

The datasource on the grid is set as follows:
EntityDataSource dataSource = new EntityDataSource();
dataSource.ID = "CustomViewGridDataSource";
dataSource.EntitySetName = view.TableName;
dataSource.ContextCreating += dataSource_ContextCreating; // set the object context here since I am using code-first EF5.0
dataSource.Where = view.Filter;
grid.DataSource = dataSource;

Finally, the grid is added to an ASP Panel placeholder (happens in Page_Init).

I get the following error when having AllowFilteringByColumn = true:

Server Error in '/' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

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: 

[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.GridTableView.CreateDataSourceSelectArguments() +1330
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +66
   Telerik.Web.UI.GridTableView.PerformSelect() +38
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
   Telerik.Web.UI.GridTableView.DataBind() +391
   Telerik.Web.UI.RadGrid.DataBind() +191
   Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +4252
   Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +201
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Control.LoadRecursive() +145
   System.Web.UI.Control.LoadRecursive() +145
   System.Web.UI.Control.LoadRecursive() +145
   System.Web.UI.Control.LoadRecursive() +145
   System.Web.UI.Control.LoadRecursive() +145
   System.Web.UI.Control.LoadRecursive() +145
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18045

Kyle Smith
Top achievements
Rank 1
 answered on 04 Jul 2013
3 answers
95 views
hello,
I load the data in combo with a webservice, you can view the default text in a combo and its value?
Boyan Dimitrov
Telerik team
 answered on 04 Jul 2013
1 answer
95 views
Hi,

I have an application which implemented RadScheduler with server side code and doesn't involves any web service or WCF. I'm now trying to include extra attribute to the Resource so that I can display extra info on the resource header.

The code of adding attribute looks like this:
resource.Attributes.Add("JobTitle", "Software engineer")
Then in the RadScheduler_ResourceHeaderCreated event, I try to read the attribute with the code below:
jobTitle = args.Container.Resource.Attributes("JobTitle")
Unfortunately the attributes of the resource is empty and I couldn't figure out why, is there a known limitation or issue pertaining to this? Please shed some light.



Boyan Dimitrov
Telerik team
 answered on 04 Jul 2013
4 answers
143 views
Hi,
is it possible to set a tooltip on the image of a button's RadButtonToggleState?
If yes, how?

Thank you
Danail Vasilev
Telerik team
 answered on 04 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?