Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
158 views

Hai! I have editable radgrid with two columns..one is subject column and another one is marks column..I have dropdownlist_index changed event..In this event  change subject's  depend on dropdownlist selected value in grid..In run time I enter marks in marks column and then click button1..In button1 click event I need to get the value of editable column...but I can not get  run time editable value..I can get only column default value that is 0..why i cannot get the runtime edited value.. can anyone help me? 
protected
void Button1_Click(object sender, EventArgs e)

 

{

 

foreach (GridEditableItem grdRow in grdMarksEntry.Items)

 

{

 

string str = (grdRow["Marks"].Controls[0] as TextBox).Text;

 

}

 

}

 

 

 

protected void grdMarksEntry_ItemCreated(object sender, GridItemEventArgs e)

 

{

 

for (int i = 0; i <= grdMarksEntry.PageSize; i++)

 

{

 

grdMarksEntry.EditIndexes.Add(i);

 

}

}

 

protected void grdMarksEntry_ColumnCreated(object sender, GridColumnCreatedEventArgs e)

 

{

 

if (e.Column.UniqueName == "Id")

 

{

e.Column.Visible =

false;

 

}

}

 

 

protected void DDLCourses_SelectedIndexChanged(object sender, EventArgs e)

 

{

 

SqlConnection Cnn = new SqlConnection();

 

Cnn.ConnectionString =

@"Data Source=DEVI\SQLEXPRESS;Initial Catalog=Acarin_SchoolManagement;Integrated Security=True";

 

Cnn.Open();

 

DataSet ds = new DataSet();

 

 

SqlCommand cmd = new SqlCommand("SELECT SubjectName,Id FROM [tblCourseSubject] WHERE ([CourseId] = '" + DDLCourses.SelectedValue + "' )", Cnn);

 

 

SqlDataReader dr = cmd.ExecuteReader();

 

 

DataTable dt = new DataTable("StudentMarks");

 

dt.Load(dr,

LoadOption.OverwriteChanges);

 

ds.Tables.Add(dt);

 

DataColumn dc = new DataColumn("Marks", System.Type.GetType("System.Int32"));

 

dc.DefaultValue =

"0";

 

dc.ReadOnly =

false;

 

ds.Tables[

"StudentMarks"].Columns.Add(dc);

 

ds.Tables[

"StudentMarks"].Columns[0].ReadOnly = true;

 

grdMarksEntry.DataSource =

null;

 

grdMarksEntry.DataSource = ds;

grdMarksEntry.DataBind();

 

}

saroja
Top achievements
Rank 1
 answered on 13 Aug 2009
0 answers
39 views
Appoinment show one day less in Rad Sheduler

for ex === start date : 10th aug 12 AM , End Date : 15th aug 12 AM

but in Scheduler it mapping from 10th aug to 14th aug
Rajesh
Top achievements
Rank 1
 asked on 13 Aug 2009
1 answer
100 views
I've had a desire to add a search field to my radtoolbar, but I can't seem to find any built in way to add custom html or radinputbox to the toolbar.

When I came to this site I looked at the toolbar at the top of the page and noticed the telerik site has a search bar in the toolbar.  After inspecting the source I noticed it isn't a radtoolbar it is a radmenu.  Do I have to convert my toolbar to menu to have a search box?

Thanks
Veselin Vasilev
Telerik team
 answered on 13 Aug 2009
8 answers
177 views
Hello,

I have in my website a combobox multi-columns.

I define the columns like the online example : http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multicolumncombo/defaultcs.aspx

my code is :

<telerik:RadComboBox ID="Pays" runat="server" Height="190px" Skin="Sunset"
                        Width="320px" MarkFirstMatch="true"  EnableLoadOnDemand="true" HighlightTemplatedItems="true"
                        ItemRequestTimeout="500"  OnItemsRequested="Pays_ItemsRequested" OnItemDataBound="Pays_ItemDataBound" DataSourceID="SqlDataSource1" ExpandDelay="1">
                        <HeaderTemplate>
                            <ul>
                             <li class="col2">Pays</li>
                             <li class="col1">Lieu</li>
                            </ul>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <ul>
                             <li class="col2"><%# DataBinder.Eval(Container.DataItem, "Designation") %></li>
                             <li class="col1"><%# DataBinder.Eval(Container.DataItem, "Information_supp1")%></li>
                            </ul>
                        </ItemTemplate>
                <CollapseAnimation Duration="200" Type="OutQuint" />
             </telerik:RadComboBox>

When visualize the page the combobox don't have columns like a grid but it have bulleted list

Can you help me?

Thanks




Thierry Treunet
Top achievements
Rank 1
 answered on 13 Aug 2009
2 answers
214 views

Hello, Telerik Team

I got a problem to register the httphandler for the captcha control. Like this document says I placed this two codes in the web.config

<httpHandlers>  
      
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.CaptchaImageHandler" verb="*" validate="false" />  
</httpHandlers>  
 
<handlers>  
     
<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.CaptchaImageHandler" />  
</handlers>


But as this is done I still get this error on my page.
 

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'Telerik.Cms.Web.UI' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 61: 			<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
Line 62: 			<add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/>
Line 63: <add verb="GET" path="CaptchaImage.axd" type="Telerik.Web.UI.SpamProtection.Captcha.CaptchaImageHandler, Telerik.Cms.Web.UI" />Line 64:     </httpHandlers>
Line 65: 		<httpModules>

Source File: C:\Users\jmi01\Desktop\custom-image-editor-updated\Custom_Image_Editor\web.config    Line: 63

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Cms.Web.UI' could not be loaded.

=== Pre-bind state information ===
LOG: User = WALBEEKGROEP\jmi01
LOG: DisplayName = Telerik.Cms.Web.UI
 (Partial)
LOG: Appbase = file:///C:/Users/jmi01/Desktop/custom-image-editor-updated/Custom_Image_Editor/
LOG: Initial PrivatePath = C:\Users\jmi01\Desktop\custom-image-editor-updated\Custom_Image_Editor\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\jmi01\Desktop\custom-image-editor-updated\Custom_Image_Editor\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/ace6216c/3fd55b01/Telerik.Cms.Web.UI.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/ace6216c/3fd55b01/Telerik.Cms.Web.UI/Telerik.Cms.Web.UI.DLL.
LOG: Attempting download of new URL file:///C:/Users/jmi01/Desktop/custom-image-editor-updated/Custom_Image_Editor/bin/Telerik.Cms.Web.UI.DLL.
LOG: Attempting download of new URL file:///C:/Users/jmi01/Desktop/custom-image-editor-updated/Custom_Image_Editor/bin/Telerik.Cms.Web.UI/Telerik.Cms.Web.UI.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/ace6216c/3fd55b01/Telerik.Cms.Web.UI.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/ace6216c/3fd55b01/Telerik.Cms.Web.UI/Telerik.Cms.Web.UI.EXE.
LOG: Attempting download of new URL file:///C:/Users/jmi01/Desktop/custom-image-editor-updated/Custom_Image_Editor/bin/Telerik.Cms.Web.UI.EXE.
LOG: Attempting download of new URL file:///C:/Users/jmi01/Desktop/custom-image-editor-updated/Custom_Image_Editor/bin/Telerik.Cms.Web.UI/Telerik.Cms.Web.UI.EXE.

 


Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016


Hope you guyes can help me out with this problem.

Thanks in advance,
Jeroen Speldekamp

Suneco
Top achievements
Rank 2
 answered on 13 Aug 2009
1 answer
149 views
Hello,

For RadComboBox, what JS events fire after SelectedIndexChanged?   If you select something, and the menu closes, does the DropDownClosed event fire after this?

Thanks.
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2009
3 answers
129 views
Hi,
How to export only filterd data from Radgrid to excel/pdf.

Thanks
Rakesh G
Pavlina
Telerik team
 answered on 13 Aug 2009
1 answer
98 views
I am using Telerik Calendar control and setting Current Culture on ASP.NET page using following code

System.Threading.Thread.CurrentThread.CurrentCulture = new GCAACulture(System.Threading.Thread.CurrentThread.CurrentCulture.Name);
System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.DateSeparator = " ";

public class GCAACulture : CultureInfo
    {
       public GCAACulture(string cultureName) : base(cultureName)
       {
          this.DateTimeFormat = new System.Globalization.DateTimeFormatInfo();
          this.DateTimeFormat.ShortDatePattern = "dddd, dd MMMM yyyy";
          this.DateTimeFormat.LongDatePattern = "dddd, dd MMMM yyyy";
       }
    }


But whenever I select date using date picker popup always current day is selected. When I debug the telerik javascript code then I found that code fails to parse of day of selected dated and as result it selected current (Today) date as an alternate. The day part of selected date returning null value.

While debugging I  found that something is wrong in following method.

parseDate:function(_fe,_ff){
try{
var _100=new Telerik.Web.UI.DateParsing.DateTimeLexer(this.get_dateFormatInfo());
var _101=_100.GetTokens(_fe);
var _102=new Telerik.Web.UI.DateParsing.DateTimeParser(this.get_dateFormatInfo().TimeInputOnly);
var _103=_102.Parse(_101);
_ff=this._getParsingBaseDate(_ff);
var date=_103.Evaluate(_ff,this.get_dateFormatInfo());
return date;
}




Please help me from where I am making mistake.

Regards
Ayaz Anwar
Software Engineer
Pavel
Telerik team
 answered on 13 Aug 2009
1 answer
145 views
Hi,
Basicaly I am trying to achieve what you guys have shown on the demo
http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipversustooltipmanager/defaultcs.aspx
I have almost duplicate the code , but am running into js error

if

 

(_d[i].id==this._getUpdatePanelID()) where object is expected as "this" is null..

My Code ...

MainUserControl.ascx

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

 

 

 

<%

@ Register src="../ToolTips/ToolTipInfo.ascx" tagname="ToolTipInfo" tagprefix="uc3" %>

 

 

 

<

 

telerik:RadToolTipManager ID="RadToolTipManager1"

 

 

 

 

 

runat="server" Position="Center"

 

 

OnAjaxUpdate="ToolTip_OnAjaxUpdate">

 

 

 

 

 

</telerik:RadToolTipManager>

 

<

 

telerik:RadGrid ID="ClientUserRadGrid" runat="server" EnableEmbeddedSkins="False"

 

 

Skin="Shepherd"

 

 

AutoGenerateColumns="false"

 

 

onitemdatabound="UserDetailRadGrid_ItemDataBound"

 

 

onpagesizechanged="ClientUserRadGrid_PageIndexChanged" AllowSorting="True"

 

 

OnItemCommand="ClientUserRadGrid_ItemCommand"

 

 

AllowPaging="True" PageSize="40" onneeddatasource="User_NeedDataSource"

 

 

AllowFilteringByColumn="true" onitemcreated="ClientUserRadGrid_ItemCreated">

 

 

 

<

 

HeaderContextMenu Skin="Shepherd" EnableEmbeddedSkins="False" EnableTheming="True">

 

<

 

CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

</

 

HeaderContextMenu>

 

 

 

 

 

<PagerStyle AlwaysVisible="True" Mode="NextPrevAndNumeric" PagerTextFormat="{4} Page {0} of {1},items {2} to {3} of {5}" />

 

 

 

 

 

 

 

<

 

MasterTableView DataKeyNames="UserID"  AllowMultiColumnSorting="true">

 

<

 

RowIndicatorColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

RowIndicatorColumn>

 

<

 

ExpandCollapseColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

ExpandCollapseColumn>

 

<

 

Columns>

 

 

 

 

 

<telerik:GridBoundColumn DataField="UserName" HeaderText="Logon Name"

 

 

UniqueName="UserName" >

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="Department" HeaderText="Department"

 

 

UniqueName="Department" >

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="Name" HeaderText="Name"

 

 

UniqueName="Name" >

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

<telerik:GridBoundColumn DataField="ProductType" HeaderText="Product Type"

 

 

UniqueName="ProductType">

 

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

 

 

 

 

</Columns>

 

 

 

 

 

</

MasterTableView>

 

 

 

 

 

 

 

 

<

FilterMenu Skin="Shepherd" EnableEmbeddedSkins="False" EnableTheming="True">

 

<

 

CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

</

 

FilterMenu>

 

</

 

telerik:RadGrid>

MainUserControl.ascx.cs

 

protected

 

void UserDetailRadGrid_ItemDataBound(object sender, GridItemEventArgs e)

 

{

 

    

 

    if

 

(e.Item is GridDataItem)

 

    {

 

        GridDataItem item = (GridDataItem)e.Item;

 

        RadToolTipManager1.TargetControls.Add(e.Item.ClientID, e.Item.OwnerTableView.DataKeyValues[0][

"UserID"].ToString(),true);

 

    }

 

}

 

protected

 

void ToolTip_OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)

 

{

 

    Control ctrl = LoadControl("ToolTipInfo.ascx");

 

    args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);

 

    ToolTipInfo Info = (ToolTipInfo)ctrl; // this is a control with a only one label and trying to set a text to that Label 

 

    Info.LabelText = args.Value;

}

 

And that is all I have done to get the tooltip, but keep experiencing js error..

thanks,
DIP

Svetlina Anati
Telerik team
 answered on 13 Aug 2009
3 answers
136 views
I have a radwindow that pops up to update data residing record in radgrid2, but when data is successfully updated in database via radwinow and window is closed, the data in radgrid2 is not updated on the screen.  

<

 

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="btnDelete">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" />

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid2" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" />

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid2" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid2">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" />

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid2" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>



 

<

 

telerik:RadWindow

 

 

ID="PostWindow"

 

 

runat="server"

 

 

Modal="true"

 

 

BackColor="Gray"

 

 

Behavior="None"

 

 

 

 

 

InitialBehaviors="Pin"

 

 

 

 

 

ShowContentDuringLoad="false"

 

 

 

 

 

Title="Add/Edit Post (Fields in BOLD are required!)"

 

 

Width="650"

 

 

 

 

 

Height="470"

 

 

 

 

 

ReloadOnShow="true"

 

 

 

 

 

DestroyOnClose="true"

 

 

 

 

 

KeepInScreenBounds="true"

 

 

 

 

 

BorderStyle="None"

 

 

OnClientClose="refreshGrid1()"

 

 

>

 

 

 

 

 

</telerik:RadWindow>


1) when user clicks on close button it passes arg value called 'editPost'

 

<

 

telerik:RadScriptBlock runat="server">

 

 

 

 

 

<script type="text/javascript">

 

 

 

 

 

function refreshGrid1(arg)

 

{

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest(arg);

 

 

 

 

 

 

 

}

 

</script>

 

 

 

 

 

</telerik:RadScriptBlock>

2) RadAjaxManager1_AjaxRequest is then fired and the following code is performed but nothing happens

 

if

 

(isPost)

 

{

radGrid = radGrid2;

RadGrid1.MasterTableView.Rebind();

radGrid.MasterTableView.Rebind();

Veli
Telerik team
 answered on 13 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?