Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
85 views
Hi,

I have a datagrid with a custom filter column defined that gets a distinct list of values to use for the filter.  I have a second dropdownlist on the page that has a list of countries and I want to filter my grid filter list down by the value from this country drop down list..

So my filter column has names : fred, tom, harry, bill, betty, but fred, tom and harry are from Australia, and Bill and Betty are from USA..
The names are coming from a database table, so they can't be hardcoded..  they have a country id value against them in the database table.

Currently I have a grid with:
<custom:MerchCustomFilteringColumn HeaderText="Added By" DataField="SubmittedByInitials" UniqueName="Source" SortExpression="SubmittedByName">
  <ItemTemplate>
    <%# Eval("User Name")%>
  </ItemTemplate>
</custom:MerchCustomFilteringColumn>

I have a MerchCustomFilteringColumn class defined:
Public Class MerchCustomFilteringColumn
  Inherits GridTemplateColumn
    Dim db As New MerchandisingRepoDataContext
    Private _CountryGroup As String = "2"
    Public Property CountryGroup() As String
      Get
        Return _CountryGroup
      End Get
      Set(ByVal value As String)
        _CountryGroup = value
      End Set
  End Property
 
  Private lDataSource As Object = Nothing
  'RadGrid will call this method when it initializes the controls inside the filtering item cells
 
  Protected Overrides Sub SetupFilterControls(ByVal cell As TableCell)
    MyBase.SetupFilterControls(cell)
        list.DataSource = (From i In db.Items Where i.CountryGroupID = _CountryGroup Group By i.itemLocationCountryCode Into code = Group Order By itemLocationCountryCode Select itemLocationCountryCode).Distinct().ToList()
  End Sub
End Class

This works great if I go to the page, select the country, the dropdown list has autopostback enabled, and the filtering dropdown works fine.

If I select a new country, it "should", set the country Group property of the filter column class, change the list of names in the filter column based on _CountryGroup and show a different list of names to filter by..

In the Pre_Render event of the Grid, I have a rgdMerchItemList.MasterTableView.Rebind() statement, that then fails at this point because the datasource is nothing.

Have I gone about this the wrong way...???  Well I guess the answer to that is "YES, cause it doesn't work"...

Does my explanation of what I'm trying to achieve make sense...??  I've tried to cut down the example code for ease of reading..

If there is an example of this somewhere, can you point me in the direction and I'll see if I can change my code to match it..

Many thanks.
Angel Petrov
Telerik team
 answered on 21 Aug 2013
1 answer
59 views
I want to display paging on a tree list i am using pager template for that but i could not find the code to implement page page size drop down in pager template plzz help..
Eyup
Telerik team
 answered on 21 Aug 2013
1 answer
130 views
i have a treelist which has a parent and some child nodes when i am expanding the parent the child nodes exceed the page size limit and the child nodes are shifted to next page but on the next page i am not able to see the parent to which these child nodes belong.
Kostadin
Telerik team
 answered on 21 Aug 2013
1 answer
333 views
Hi,

We have a dropdown and add button inside edit template of radgrid column, We have a functionality wherein inside the edit mode of a row of radgrid we populate the dropdown and then on clicking the add button open a radwindow to add a new item to dropdown. When the radwindow is closed the dropdown inside the edit template should refresh and show this new item.

Can someone please guide me in achieving the above functionality.

Thanks 
Jayesh Goyani
Top achievements
Rank 2
 answered on 21 Aug 2013
3 answers
195 views
Hi,

I would like to use a webservice to fetch the search results for my searchbox. I've created an .asmx file as shown in the examples online, and can get to the webservice call and grab the searchbox context without issue.

SearchRows = new RadSearchBox() { ID = pv.ID + "_SearchRows", OnClientButtonCommand = "RowSearchBox_ClientButtonCommand",
                EnableAutoComplete = true, ShowSearchButton = false, EmptyMessage = "Search Rows", Width = Unit.Parse("300px"), Skin = "Metro",
                OnClientSearch = "RadRowsSearch_ClientSearch" };
            SearchRows.DropDownSettings.Width = Unit.Parse("300px");
            SearchRows.DropDownSettings.Height = Unit.Parse("400px");
            SearchRows.WebServiceSettings.Path = "~/WebServices/LoadSearchResults.asmx";


However, in order to generate the results I want to show, I need to pass along a few additional parameters. Is there any way to do this? Looks like there's nothing I can set in the OnClientDataRequesting client handler. And I tried setting HttpGet to true and passing parameters through the URL string, but it returns a 500 Page not found error.

Thanks,

Ajit
Dimitar Terziev
Telerik team
 answered on 21 Aug 2013
2 answers
140 views
Hi all

I have used RadEditor which is displayed as Textbox. I want to have HTML, design and preview options in it. How do i do this? 

Thanks
Kamini
kamini
Top achievements
Rank 1
 answered on 21 Aug 2013
2 answers
146 views
I am working on a helpdesk solution for tracking issues within tests, candidates doing the tests have information stored against sessions.
When the page loads, it loads in a manner that depends on whether a ticket has already been created.
One of the parts of the page is a radtabstrip and multi page.
The problem is that when a ticket is being created, the attendant cannot switch tabs. The radtabstrip seems to do nothing.
However when a ticket that has been created is reloaded for editing, the attendant can switch tabs.
I have set causesValidation=false within the page, and I can see no way in which one loads significantly enough from the other for it to cause a problem.

Does anyone have any ideas? I imagine its one of those silly, "ohh I didn't know that" kind of things", any help is appreciated :D

Here is my code-behind
loadDDLs();
if (Request["Ticket"] != "0")// if a ticket exists
{
    var objRec = objDb.QuerySingle("Query removed for your sake");
    loadCommonFields(objRec);
 
 
    ///This block should cause no problems
    ///---------------------------------
    txtTicketNum.Text = objRec.TicketID.ToString();
    txtFaultDescription.Text = objRec.FaultDescription;
    txtNotes.Text = objRec.Notes;
    txtLastAction.Text = objRec.LastActioned.ToString();
    txtDateLogged.Text = objRec.DateLogged.ToString();
    txtLoggedBy.Text = objRec.LoggerName;
    txtCampaignDescription.Text = objRec.CampaignDescription;
    lblLoggedByID.Text = objRec.LoggerID.ToString();
    lblLoggedByID.Visible = false;
 
    setDDLs(objRec);
    setDDLs2(objRec, objDb);
    if (objRec.SessionID != null)
    {
        txtSessionID.Text = objRec.SessionID;
        m_strID = objRec.SessionID;
        loadCurrentStatus(objDb);
        ddlCompany.Enabled = false;
        ddlCampaign.Enabled = false;
        txtInitLastAccess.Text = objRec.im;
        initModule.Visible = true;
        initStatus.Visible = true;
        txtInitModuleStatus.Text = objRec.il.ToString();
    }
}
else
{
    lblLoggedByID.Text = objUser.UserID.ToString();
    lblLoggedByID.Visible = false;
    txtLoggedBy.Text = objUser.DisplayName;
    txtDateLogged.Text = DateTime.Now.ToString();
    txtLastAction.Text = "No Prior Action";
 
    if (Request["ID"] == "0")
    {
        //  This section is used if there is no session at all, not a concern so I truncated this section
    }
    else
    {
 
        if (m_strID == null)
            m_strID = Request["ID"];
 
        var objRec = objDb.QuerySingle("Query removed for your sake");
        var objModPage = objDb.QuerySingle("Query removed for your sake");
        if (objModPage != null)
        {
            lblModuleID.Text = objModPage.moduleID.ToString();
            txtModuleName.Text = objModPage.Name;
            lblPageNum.Text = objModPage.CurrentPage;
            rowModule.Visible = true;
            rowPageNum.Visible = true;
        }
        txtCampaignDescription.Text = objRec.CnDn;
        txtStatus.Text = objRec.StatusName;
        txtSessionID.Text = Request["ID"];
        m_strStatus = objRec.Status;
        ddlCompany.Enabled = false;
        ddlCampaign.Enabled = false;
        loadCurrentStatus(objDb);
        loadCommonFields(objRec);
        setDDLs(objRec);
    }
}
:
Here is what I deem to be the relevant aspx code
<telerik:RadTabStrip ID="RadTabStrip" runat="server" MultiPageID="RadMultiPage" >
      <Tabs>
          <telerik:RadTab causesvalidation="false" runat="server" PageViewID="Status" ID="StatusTab"
             Text="<%$ Resources:Platform, Status %>">
          </telerik:RadTab>
          <telerik:RadTab causesvalidation="false" runat="server" ID="ProgressTab" PageViewID="Progress"
              Text="<%$ Resources:Platform, Progress %>">
          </telerik:RadTab>
          <telerik:RadTab causesvalidation="false" runat="server" ID="NotesTab" PageViewID="Notes"
              Text="<%$ Resources:Platform, Notes %>">
          </telerik:RadTab>
      </Tabs>
  </telerik:RadTabStrip>
Aaron
Top achievements
Rank 1
 answered on 21 Aug 2013
0 answers
130 views
Hi there. I'm pretty new to both asp.net and sql so this might be a common question. I have a microsoft sql 2008 R2 server with a certain database which has many branching sub-directories. All of which end with different folders with data tables in them. I was wondering how I could bind this hierarchy to a data source (I'm using sqlDataAdapter) and attach it to the radMenu so that it would neatly re-produce this hierarchy. It looks like there are a few ways to go about it. Mostly I'm uncertain of how to query the database to get a folder with children (and sub-children) and how it's organized as a table, set, etc. I only really know the basic SELECT*. UPDATE, DELETE commands.

From what I've read, the radMenu binding uses a parentID, childID system. How does that work exactly? Does my hierarchy or it's tables have to be organized a certain way?


So I guess that's more than one question, but any help is appreciated!

thanks

Will
Will
Top achievements
Rank 1
 asked on 20 Aug 2013
3 answers
174 views
I have a problem that after run time modification labels at YAxis are not readable. I`m trying to convert time format from minutes to hour:minutes format at run time. It seems that these new labels doen`s fit to the area and result is mess. Timeformat is changed at PrePaint event handler. Control doesn`t update it`s measures after that.

protected void MyChart_PrePaint(object sender, EventArgs e)
{
            RadChart are = (RadChart)sender;
            ChartYAxis yAxis = are.PlotArea.YAxis;

            are.Series[0].Appearance.LabelAppearance.Dimensions.AutoSize = false;
            are.Series[0].Appearance.LabelAppearance.Dimensions.Width = 500;          

            yAxis.Appearance.TextAppearance.AutoTextWrap = AutoTextWrap.False;
            yAxis.Appearance.TextAppearance.Dimensions.Width = 500;
            yAxis.Appearance.TextAppearance.Dimensions.AutoSize = false;



            foreach (ChartAxisItem axisItem in yAxis.Items)
            {
                axisItem.TextBlock.Text = "some text here";
            }
}

Jaseem
Top achievements
Rank 1
 answered on 20 Aug 2013
1 answer
187 views
Hello I have a RadButton that I am using on Click to Hide and Show two Divs. In order for the event to fire the button needs to be clicked twice. After that It works fine.

<telerik:RadButton ID="rbShowServiceMonitorDialog" runat="server" Text="Add A Service To Monitor"
                   OnClientClicked="showServiceMonitorConfig" ButtonType="LinkButton" UseSubmitBehavior="False" AutoPostBack="false"/>
function showServiceMonitorConfig() {
    $telerik.$('#<%= rbShowServiceMonitorDialog.ClientID %>').click(function() {
        $telerik.$('.serviceMonitorView').hide('slide');
        $telerik.$('.ServiceMonitorConfiguration').show('slide');
 
    });
}
Will
Top achievements
Rank 1
 answered on 20 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?