Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
225 views
Hi Support,
      I'm currently doing a popup for my data selection, this popup is a usercontrol with radgrid inside,
when i use this popup usercontrol inside another usercontrol , I'm encountering a problem,
On the first load / display of the popup the paging ,filtering and rowclick work well but when i press the paging button then use the filtering or the rowclick the grid not response anymore and when i try to check on the error console of the firefox I got the error tableView is null


regards,
Pavlina
Telerik team
 answered on 26 Jul 2011
1 answer
222 views
Hi, I have a RadGrid with a nested GridTableView. I am trying to hook up the OnPreRender event, but it doesn't ever seem to get called. After further experimentation, none of the events seem to be called on this object. The grid exhibits the same behaviour when removed from the AjaxManager. Do I need to do something else to hook up these events?

Thanks

ROSCO
Vasil
Telerik team
 answered on 26 Jul 2011
1 answer
87 views
Hi, I want to know if when using grouping if it is possible to change the group for an item. I have an item that has Group A in the database, but in the vb code-behind I need to change the item to Group B so it gets reported under Group B. I have tried changing the  GridItem("MyGroup").Text  in the ItemDataBound event, but the item doesn't appear under the correct group (even though the text has been changed.

Thanks.
Vasil
Telerik team
 answered on 26 Jul 2011
3 answers
255 views
Hi,
I'm using RadNumericTextBox. In a database I have a column e.g.: Preis decimal(12,2) - oracle.
How can I set in RadNumeric maxlength of digits to 12 for non-decimal digits and 2 for decimal digits?
And another question: when I set maxvalue, when user inputs more digits, the value is automatically sets to maxvalue without any question or warning. Why?
Martin
Telerik team
 answered on 26 Jul 2011
1 answer
127 views
Using this example, http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multicolumncombo/defaultcs.aspx

How can I show the all of the columns from the selected row in the dropdown after it has been selected?

Thanks
Princy
Top achievements
Rank 2
 answered on 26 Jul 2011
1 answer
273 views
Hi all,
  I am using Rad Date Ticker and Rad Time Picker for entering date range. For 2 Rad Date Picker i used one compare validator and also use one compare validator for 2 Rad Time Picker. If i chnage any startime i got error from compare validator even if endtime is greater than starttime. For date comparison i added type as date in compare validator. But how can i configure for radtime picker?
But if i change or just select end time again error is cleared.

<telerik:RadTimePicker ID="radstarttime" runat="server"  Width="225px" >
    <TimeView CellSpacing="-1" Columns="6" Interval="00:30:00" ></TimeView>
</telerik:RadTimePicker>
<asp:RequiredFieldValidator ID="rfvStartTime" Display="Dynamic" ValidationGroup="EditValidation" SetFocusOnError="true" runat="server" ControlToValidate="radstarttime" ErrorMessage="Start Time is Mandatory!!!" Text="*" ForeColor="Red">
</asp:RequiredFieldValidator>
   
<telerik:RadTimePicker ID="radendtime" runat="server" Width="225px"
    <TimeView CellSpacing="-1" Columns="6" Interval="00:30:00"></TimeView>
</telerik:RadTimePicker>
<asp:RequiredFieldValidator ID="rfvEndTime" Display="Dynamic" ValidationGroup="EditValidation" SetFocusOnError="true" runat="server" ControlToValidate="radendtime" ErrorMessage="End Time is Mandatory!!!" Text="*" ForeColor="Red">
</asp:RequiredFieldValidator>
  
<asp:CompareValidator ID="crvEndTime" runat="server" ControlToCompare ="radstarttime" ControlToValidate ="radendtime" Operator ="GreaterThanEqual" ErrorMessage ="End Time Must be Greater than Start Time" >
</asp:CompareValidator>


Shinu
Top achievements
Rank 2
 answered on 26 Jul 2011
0 answers
115 views
HI,
I want to filter second grid by first grid(rgrdcontrireport) filtering options.
I have two grids ,when i filter first grid   with that filtering option i want to filter second grid also
suppose in first grid i have batchid,userid,familyid. and i filtered first grid by batchid>12,
now this filtering i want to apply to second grid(rgrdexport)
how can i do this?
i am working on this code to get value of filtering but it is not applying to second grid(rgrdexport)
first grid (rgrdcontrireport)
second grid (rgrdexport)

  rgrdexport.AllowFilteringByColumn = true;
        GridColumn batchidexport = rgrdexport.MasterTableView.GetColumnSafe("BatchId");
        GridColumn batchid = rgrdcontrireport.MasterTableView.GetColumnSafe("BatchId");
        batchidexport.CurrentFilterFunction = batchid.CurrentFilterFunction;
        batchidexport.CurrentFilterValue = batchid.CurrentFilterValue;
       // rgrdexport.Rebind();
        expression = "BatchId " + batchid.CurrentFilterFunction + " " + batchid.CurrentFilterValue;
        rgrdexport.MasterTableView.FilterExpression = rgrdcontrireport.MasterTableView.GetColumnSafe("BatchId").EvaluateFilterExpression();

thanks ,
sameer
sameer
Top achievements
Rank 1
 asked on 26 Jul 2011
1 answer
195 views

We have a diamically created radgrid with lots checkbox column in it. They all display fine. But I have problem for looping through it and get it's value. It seems can't find the checkbox control on the page. Not sure where I missed.

foreach (Functions function in CurrentUserFunctionList)
            {
                // Set up the RadGrid's columns
                // NOTE: We have to use a custom TemplateColumn, because each checkbox is its own unique control, with its own unique ID.
                GridTemplateColumn gtcFunction = new GridTemplateColumn();
                gtcFunction.HeaderText = function.Description;
                gtcFunction.DataField = function.FunctionId.ToString();
                gtcFunction.ReadOnly = false;
                gtcFunction.AllowFiltering = false;
                // NOTE: The FunctionId gets passed in because it's part of each checkbox control's ID...
                gtcFunction.ItemTemplate = new RadGridCheckBoxTemplate(function.FunctionId.ToString());
                rgWeb.MasterTableView.Columns.Add(gtcFunction);
  
                // Set up the Data Table's columns
                DataColumn thiscolumn = new DataColumn();
                thiscolumn.Caption = function.Description;
                thiscolumn.ColumnName = function.FunctionId.ToString();
                thiscolumn.ReadOnly = false;
                thiscolumn.DataType = System.Type.GetType("System.Boolean");
                MyDataTable.Columns.Add(thiscolumn);
            }
}
  
 public class RadGridCheckBoxTemplate : System.Web.UI.ITemplate
    {
        private string colname;
  
        /// <summary>
        /// This class sets up a Template with dynamically named CheckBoxes in the RadGrid. cName is the unique identifier for th column,
        /// which is added to the ID of each CheckBox control.
        /// </summary>
        /// <param name="type"></param>
        public RadGridCheckBoxTemplate(string cName)
        {
            this.colname = cName;
        }
  
        /// <summary>
        /// Create the template
        /// </summary>
        /// <param name="container"></param>
        public void InstantiateIn(System.Web.UI.Control container) 
        {
            CheckBox checkbox = new CheckBox();
            //checkbox.AutoPostBack = true;
            checkbox.DataBinding += new EventHandler(boolValue_DataBinding);
            checkbox.ID = "cbox_" + colname;
            checkbox.CheckedChanged += new EventHandler(ToggleRowSelection);
            container.Controls.Add(checkbox);
        }
  
        void boolValue_DataBinding(object sender, EventArgs e)
        {
            CheckBox cBox = (CheckBox)sender;
            GridDataItem container = (GridDataItem)cBox.NamingContainer;
            cBox.Checked = (bool)((DataRowView)container.DataItem)[colname];
        }
  
        /// <summary>
        /// Check and uncheck
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void ToggleRowSelection(object sender, EventArgs e)
        {
            ((sender as CheckBox).Parent.Parent as GridItem).Selected = (sender as CheckBox).Checked;
        }
    }
I need to loop throug the radgrid to get all the column,

use  CheckBox cb = (CheckBox)gdi.FindControl(controlname);
or :

 

 

foreach (Control ctrl in Page.Controls)

 

{

 

 

if (ctrl is CheckBox)

 

{

 

 

string a = ctrl.ID;// never comes here to show the control id

 

}

}



I can't find any chekbox control on my page, not sure why?
Shinu
Top achievements
Rank 2
 answered on 26 Jul 2011
1 answer
323 views
Telerik,

Im trying to get the value of a TemplateColumn item when the ItemCommand event is raised. My TemplateColumn looks like the following:


<telerik:GridTemplateColumn HeaderText="User" UniqueName="User" Reorderable="false" Display="true" SortExpression="User">
    <ItemTemplate>    
        <asp:LinkButton ID="btnButton1" runat="server" ToolTip="Edit this user" CommandName="EditUser" Visible="<%# Master.UserPrefs.HasEditRights %>"><%# Eval("User") %></asp:LinkButton>                         
        <asp:Label ID="lblLabel1" runat="server" Visible="<%#!Master.UserPrefs.HasEditRights %>"><%# Eval("User") %></asp:Label>
    </ItemTemplate>                   
</telerik:GridTemplateColumn>

Basically, the template is built using a boolean value (determining if the current user logged in has EditRights to the record) to either display a LinkButton (to launch a custom edit screen) or to display a Label (if the current user doesn't have the appropriate permission).

In the ItemCommand, I would like to get the value of the data bound to either the Label or the LinkButton. The closest I got to getting the information is by doing something like the following:

protected void gvUsers_ItemCommand(object sender, GridCommandEventArgs e)
{
        RadGrid grid = (RadGrid)sender;
        switch (e.CommandName.ToUpper())
        {
            case "MyCommandName":               
                foreach (GridDataItem item in grid.MasterTableView.Items)
                {                   
                string cellContent = ((GridLinkButton)item.Cells[3].Controls[0]).Text
                }
      break;
        }
}

Is this the only way to get the Text value of the GridLinkButton? Can you please provide any other information for retrieving the values associated with a TemplateColumn using the markup in my Template?

Thanks
Shinu
Top achievements
Rank 2
 answered on 26 Jul 2011
1 answer
87 views

Hi All,

Is it possible to implement drag  and drop functionality from a treeview to a grid using only javascript. 

I need to populate some hiddedn columns in the grid view that based on the node that is being dropped in the gridview.


Thanks
Abhi

Shinu
Top achievements
Rank 2
 answered on 26 Jul 2011
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?