Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
204 views
I have a grid with a template form for editing. I initially load my controls on the item data bound event but would like to also postback and update a series of dropdowns before the final insert or update.  My problem is that when I postback from the RadComboBox I can not seem to get access to the container to update the other dropdown. If I, as an option, create a custom command and use ItemCommand I am unable to see the GridDataItem.IsInEditMode as true nor cast to a GridEditFormItem to access these other fields.  BTW if the command is one of the core CRUD commands like update or insert I have no problem with accessing these fields.

Ideally I'd like to just autopost the dropdowns to update but I can live with a button if I can get that to work. 

Hope all that makes sense. Any ideas? Thanks.

Sample code
aspx:

 

 
<EditFormSettings EditFormType="Template" >   
 <FormTemplate>   
 <asp:Panel ID="Panel1" runat="server" DefaultButton="btnUpdate">   
 ...  
   <asp:Button ID="btnTest" Text="Test" runat="server" CausesValidation="False" CommandName="InterimUpdate"></asp:Button>   
 
 </asp:Panel>   
 
</FormTemplate>   
 
</EditFormSettings>   
 
  

 

 

protected void rg_ItemCommand(object source, Telerik.WebControls.GridCommandEventArgs e)   
{  
    if (e.CommandName == "InterimUpdate")        <== simple embeded command button see above   
 
    {  
          if (e.Item is GridEditFormItem && e.Item.IsInEditMode)            <== Never gets past this on custom command    
           {   
 
                string s = ((RadComboBox)e.Item.FindControl("rcb1")).SelectedValue; 
                RadComboBox rcb = new RadComboBox();
                rcb = e.Item.FindControl("rcb2"as RadComboBox;   
                rcb.DataTextField = "Name";   
                rcb.DataValueField = "ID";   
                rcb.DataSource = getAllXXX(s);   
 
                rcb.DataBind();  
            }  
 
    }  
 

 

 

 

 

 

 



Thanks in advance.
Eyup
Telerik team
 answered on 24 Dec 2012
2 answers
111 views
Hi,

i want to develop a hierarchy grid with pragmatically Binding using DetailTableDataBind Event in this i have different tables and based on id i may get different structured tables with different columns how can i bind these tables to  GridTableView  in Telerik please help in this aspect 


am using this code for  DetailTableDataBind Event
protected void Rgrid_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
        {
            GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
            int PNameID = Convert.ToInt16(dataItem.GetDataKeyValue("PNameID"));
             
                try
                {
                    Common ObjCommon = new Common();
 
                    DataSet ds = ObjCommon.DocumentsWithFields(PNameID);
                       
                          
                  
                    if (ds.Tables.Count > 0)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            
 
                            e.DetailTableView.Columns.Clear();
                           e.DetailTableView.DataSource= ds.Tables[0];
                            
                           
                        }
                    }
                    else
                    {
                        var PropertyDocs = (ObjCommon .DocumentsWithoutFields(PNameID)).ToList();
                        e.DetailTableView.DataSource = PropertyDocs;
                        
                    }
                    
                }
               
                catch (Exception ex)
                {
            Response.Write(ex.Message);
                }
             
        }

above code return correct table structure but not binding to Gridtable view
Eyup
Telerik team
 answered on 24 Dec 2012
7 answers
753 views
I have 2 RadNumericTextBoxs and what I want to do is change the value of the second text box based on the value the user enters into the first.  For example I want the 2nd text box to always show the square of the value of the first and I want this to happen client side.  How do I do this?

I tried the following:

 

<telerik:RadNumericTextBox ID="originalNumber" runat="server" Label="Number"

 

 

Type="Number" DataType="long" NumberFormat-DecimalDigits="0" Width="250px" >

 

 

<ClientEvents OnValueChanged="squareValue" />

 

 

<NumberFormat DecimalDigits="0"></NumberFormat>

 

 

</telerik:RadNumericTextBox>

 

 

<telerik:RadNumericTextBox ID="squaredNumber" runat="server" Label="number Squared"

 

 

Type="Number" DataType="long" NumberFormat-DecimalDigits="0" Width="250px">

 

 

<NumberFormat DecimalDigits="0"></NumberFormat>

 

 

</telerik:RadNumericTextBox><br />

 

<

 

script type="text/javascript">

 

 

function squareValue(sender, eventArgs) {

 

originalValue = parseInt(document.getElementById(

"originalNumber").value);

 

document.getElementById(

"squaredNumber").value = originalValue * originalValue;

 

}

 

 

</

 

script>

 

 

 


The value changes, but it never changes on screen.

 

 

Eyup
Telerik team
 answered on 24 Dec 2012
3 answers
90 views
I have a unique situation. We are developing a Timecard Entry system with "Time In" and "Time Out" pickers for each day of the week. I have attached a screenshot for reference. When a blank timecard initially loads, the time pickers should have an empty message of "Time In" and "Time Out" accordingly. I do this by settings the DateInput.EmptyMessage property. When a user selects the Time In/Out values, the DATE portion of the time picker needs to be the date corresponding to the day of the week. Instead, each time picker's date is always defaulted to TODAY's date. The only way I know to change this default behavior is to manually set the "SelectedDate" property on each time picker for each day of the week but then I lose my EmptyMessage of "Time In" or "Time Out".  My question is, is there a way to set the SelectedDate property but not have it actually be visually "selected" per se? I need the time pickers to display the EmptyMessage when the page loads. But I still need to have full control over which date the control uses when something is selected.
Vasil
Telerik team
 answered on 24 Dec 2012
2 answers
73 views
Hi,

Could you, please, suggest how to change the original code from this article:

Grid's context menu

in case we have multiple grids?

Thank you in advance.

Goran
Eyup
Telerik team
 answered on 24 Dec 2012
1 answer
66 views

Bullet list and chrome problem.

Screen shots proccess:
1.

http://i48.tinypic.com/zivms1.jpg
2.
http://i46.tinypic.com/9htavd.jpg
3.
http://i47.tinypic.com/2ezjsed.jpg
4.
http://i46.tinypic.com/a5lxf.jpg


How to prevent editor to add "font-size:0px" ?

Misho
Telerik team
 answered on 24 Dec 2012
1 answer
198 views
Hello Team,
I have a web form with a button control.
On click of a button, I start a sql job. The job takes almost 20 min to complete.
I want to check the progress of the job like out of 100, how many percent has completed.
I want to show a progress bar on the page showing how many percent the job has completed.
As the job takes 20 min to complete, I should be able to navigate to other pages and do the other tasks/transactions. Whenever I return to my JOB page, the progress bar should show me the percent completed.
 
Any help appreciated.
 
Thanks,
Lok..
Princy
Top achievements
Rank 2
 answered on 24 Dec 2012
1 answer
173 views
When ExportToExcel is called, and OnBiffExporting is triggerred.  But we don't enable ajax on the post back using this ClientEvents-OnRequestStart for the RadAjaxPanel:

function onRequestStart(sender, args)
{
  if (args.get_eventTarget() == "btnExport") {
    args.set_enableAjax(false);
  }
  else {
    document.body.style.cursor = "wait";
  }

  return true;
}

Is there anyway to detect when the file has been generated so we could manually put up a wait state and then turn off the wait state when the file has been presented to the user?

Thanks
Daniel
Telerik team
 answered on 24 Dec 2012
1 answer
61 views
You can't link an IMAGE now in the latest RadEditor internal build 1218, I had to downgrade to 1212 for linking images to work again.
Misho
Telerik team
 answered on 24 Dec 2012
1 answer
81 views

Hi have an updated control (cboplayer - native asp control) as follows;

<

 

 

telerik:AjaxUpdatedControl ControlID="cboplayer" />

I popup a Radwindow, the user can add an item then closes the window. When the rebind event fires it repopulates the control.

However, I have the control to autopost back when an item is selected and it does not work. If i change it so its not an updated control the autopost back works again.

Any idea what I am doing wrong?

 

Pavlina
Telerik team
 answered on 24 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?