Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
190 views
I'm using a nested RadGrids, three layers deep, where the third RadGrid is databinding to a database table with around 300,000 records.  I only need to retrieve a few records based on filter criteria that I enter in the filter boxes at the top of the columns.  If there is no text in the filter boxes, then I don't want to retrieve any records from the database at all.  I only need to retrieve records once the user has typed in some filter criteria.

I'm having three issues with this:
1.  RadGrid is retrieving the records at initial load, without the user having entered any filter criteria.  I need the RadGrid to be blank prior to the user entering the filter criteria.
2.  Upon entering the filter criteria, RadGrid is retrieving all the records form the DB (around 300,000), and then filtering them, rather than the other way around.
3.  I would like the "onitemcommand="CustomMatches_TelerikRadGrid3_ItemCommand"" event to be fired before the "CustomMatches_TelerikRadGrid3_NeedDataSource" event.  Is there a way to switch their order of execution?

The relevant code segments are as follows:
protected void CustomMatches_TelerikRadGrid3_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            // get the parent customer for whom the custom matches are being searched
            GridDataItem parentItem_UnMatchedCustomer_TelerikRADGrid2Row = ((sender as RadGrid).NamingContainer as GridNestedViewItem).ParentItem as GridDataItem;
 
            string unMatched_MemberID = parentItem_UnMatchedCustomer_TelerikRADGrid2Row.GetDataKeyValue("MemberID").ToString();
            string unMatched_CustomerID = parentItem_UnMatchedCustomer_TelerikRADGrid2Row.GetDataKeyValue("CustomerID").ToString();
 
            List<MatchToMember> UnMatchedDetails_PotentialMatches_BindToTelerikRadGrid = new List<MatchToMember>();
 
            isCustomSearchExpanded = (sender as RadGrid).Visible;
 
            if (unMatched_CustomerID == customFilterRow_CustomerID)
            {
                if (isCustomSearchExpanded && isRadGrid3CurrentlyCustomFiltering)
                {
 
                    using (appsEntities appsContext = new appsEntities())
                    {
 
                        UnMatchedDetails_PotentialMatches_BindToTelerikRadGrid = appsContext.membership_all
                                    .Select(y => new MatchToMember()
                                    {
                                        CustomerID = unMatched_CustomerID,
                                        MemberDetails = y
                                    })
                                    .Distinct()
                                    .ToList();
                    }
                }
            }
 
            if (UnMatchedDetails_PotentialMatches_BindToTelerikRadGrid != null)
            {
                (sender as RadGrid).DataSource = UnMatchedDetails_PotentialMatches_BindToTelerikRadGrid;
            }
            //include this if statement so that if the custom search does not return a match, the expanded child datagrid shows "No Records to Display", rather than a blank line.
            else
            {
                (sender as RadGrid).DataSource = new List<MatchToMember>();
            }
            //}
 
            wasRadGrid3BindAttempted = true;
 
        }





The line"tempRadGrid3.Rebind();" in the following code does not cause the "CustomMatches_TelerikRadGrid3_NeedDataSource" event from above to be called, as I was hoping that it would.

protected void CustomMatches_TelerikRadGrid3_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.FilterCommandName)
            {
                // get the parent customer for whom the potential matches are being searched
                GridDataItem parentItem_UnMatchedCustomer_TelerikRADGrid1Row = ((sender as RadGrid).NamingContainer as GridNestedViewItem).ParentItem as GridDataItem;
 
                string unMatched_MemberID = parentItem_UnMatchedCustomer_TelerikRADGrid1Row.GetDataKeyValue("MemberID").ToString();
                string unMatched_CustomerID = parentItem_UnMatchedCustomer_TelerikRADGrid1Row.GetDataKeyValue("CustomerID").ToString();
 
                isRadGrid3CurrentlyCustomFiltering = true;
 
                customFilterRow_CustomerID = unMatched_CustomerID;
 
                if (wasRadGrid3BindAttempted)
                {
                    RadGrid tempRadGrid3 = sender as RadGrid;
                    tempRadGrid3.Rebind();
                }
            }
        }


These variables are defined at the top of the code behind page, right above the "Page_Load" method, in order to keep track of the state of different events/objects, between the different functions on the page.

// Hack3:  keep track of whether or not the Custom Search is expanded
bool isCustomSearchExpanded = false;
 
// Hack 4:  determine if currently custom searching for State Bar member
bool isRadGrid3CurrentlyCustomFiltering = false;
 
// Hack 5:  keep track of which row of Customer is expanded for custom search
string customFilterRow_CustomerID;
 
// Hack 6:
bool wasRadGrid3BindAttempted;

Is this enough information to help answer my questions?  I can provide additional information if need be.
Thanks!
Konstantin Dikov
Telerik team
 answered on 10 Oct 2013
1 answer
75 views
Hello @ all

A short question on this scenario:

I have customized the listview and treeview context menue with a new item called Create New .txt File
after the click event i would like to show a radwindow where i put in the filename and hit OK
take the return argument (filename) and just copy an empty .txt file to the current directory and rename it to (filename).txt

Before i start with this scenario i just wanted to ask you guys if this scenario is possible and if there is some sort of code somewhere provided for a scenario like this.

THX in advance!
Vessy
Telerik team
 answered on 10 Oct 2013
1 answer
140 views
Hi
In ASP.Net Ajax Grid is any Helper Class available.
For example In my design page i just place a RadGrid.
In my Code behind init i call a helper class function for data bind.
using helper class i send coulns for creating bound colums.
In helperclass which might have textbox column ,check box column and etc
and all client side events and serverside events from the helper class.
Means my Design and CS page should be simple in Init method i should define all grid functions rest should be happen using Helper class.
Vasil
Telerik team
 answered on 10 Oct 2013
1 answer
168 views
I have a page that is used primarily on smartphones. On the page I have a button that pops a modal tooltip with some F&C information. I have set the height and width plus all of the other dimensional and positional values. On iOS and Android 4 it renders correctly and has the ability to scroll the tooltip content, the content is much longer than the window is height. On Android 2.3 Gingerbread however the scroll does not work and the tooltip is positioned all the way to the top of the page even though the position is set to "center". Any advice would be greatly appreciated.

<telerik:RadToolTip ID="RadToolTip_feesandcharges" runat="server"
TargetControlID="RadButton_feesandcharges"
Title="Fees and Charges"
ShowEvent="OnClick"
Position="Center"
HideEvent="ManualClose"
ContentScrolling="Auto"
Width="300px"
Height="300px"
RelativeTo="BrowserWindow"
Style="display: none;"
Skin="WebBlue"
Modal="true"
RenderInPageRoot="true"
RenderMode="Lightweight">
Marin Bratanov
Telerik team
 answered on 10 Oct 2013
4 answers
249 views
My rad grid is currently has full CRUD functionality.  It gives the end user the ablity to manage Encounters by Date.

They want me to add a check to see if an encounter has already been added for a date, if there has, promp the user with a message saying something like "There is already an encounter for this Date.. If you continue and additional encounter will be added."

Not really sure how to accomplish this in the RADGRID..I am tempted to pull the ADD portion of this form out and create a separate page for this.

Can this be done in the radgrid?  if so... any examples or help would be great.

Thanks
Ryan
Top achievements
Rank 1
 answered on 10 Oct 2013
1 answer
125 views
Hi
I have a checkboxlist in the edititemtemplate of my radgrid.i want its value to be checked to the default value on edit.

Thanks,
Erin.
Shinu
Top achievements
Rank 2
 answered on 10 Oct 2013
5 answers
197 views
Hi,

is there any tool from telerik asp.net ajax to create a webpage with an product configurator like here:
http://www.giffits.de/herbst-regenschirm-werbeartikel-10691.htm
Please click on "Mit Ihrem Logo gestalten" Button!

Thanks
Best Regards
Rene
Marin Bratanov
Telerik team
 answered on 10 Oct 2013
5 answers
98 views
Hi,
 
We are using RadControls for ASP.NET AJAX Q2 2013 SP1.

We have some important issue in Rad editor control with spell checker Implementation.

Currently we have found that built in spell checker working only with Firefox, Chrome. etc., But not in IE versions.

In IE we have to include the Ajax spellchecker icon, once we click that,then only spell checker is functioning in IE.

But we want ajax spell checker functionality automatically works in IE versions 7, 8 & 9, without clicking on spell checker icon.

Kindly check the 2 attached screen shots. We want the Firefox functionality in IE 7,8 & 9.  Kindly solve this issue as soon as possible.

Thank you.
Marin Bratanov
Telerik team
 answered on 10 Oct 2013
1 answer
168 views
Team

I want to filter some option form code behind.

In one popup first name, last name, city is there, IF i entered First Name : Shinu and click on search button then grid will display result start with Shinu

I tried sample code but in my case grid is not refereshing. How to acheive Start with filter from code behind.

THanks
Princy
Top achievements
Rank 2
 answered on 10 Oct 2013
3 answers
138 views
Consider the following design: 

  Page "X"  has many user controls
user control UA has a modal rad window displayed when Show() is called
user control UB has a modal rad window displayed when Show() is called

user control UX & UY can request X to display the modal rad window of UA. 

Steps: (4 screen shots are attached)
  1. Page X is displayed.
  2. User is editing the data on UX. UX requests X to display the UI of UA modal rad window.  (Step 1: Add button
  3. UA is displayed i.e. the modal rad Window with controls is displayed. (Step 2: UA is displayed correctly)
  4. While user is editing the data in UA, UB is invoked by the actions. But the UB which should have been on top of UA is not displayed correctly. even though the functionality is fine. (Step 3: UB is displayed but incorrectly)
  5. When the title bar of UB is clicked the UI of UB is displayed correctly. (Step 4: after clicking the title bar of UB, prob solved)

Question: 
 How to make the modal rad window of UB displayed correctly?
Marin Bratanov
Telerik team
 answered on 10 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?