Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
142 views
Hello,

I currently have a grid that contains a select column, then all other columns are loaded programmatically during runtime. In my grid I have a "CommandItemTemplate" section where certain buttons are located - one being "Submit". When a user selects rows, and clicks "Submit", I need to retrieve the users selections on server side. 

Using the following code, I can access the data key value, but no other row data. In the example below, "myId" is correct, but the other variables are blank strings. I'm not reloading the grid on this postback, although I tried this and the same issue occurred.  I tried reloading my grid on page_init and page_load - both times I still cannot access my row data. Any suggestions?

foreach (GridDataItem item in this.grdSummary.SelectedItems)
{
    string myID = item.GetDataKeyValue("UidInt").ToString();
    string myOplockColumn = item["opLock"].Text;
    string myOrderColumn = item["order"].Text;
}

** One more thing, the "Submit" button opens a confirmation box (RadWindow) which then causes an ajax request if the user clicks "OK". Clicking "OK" calls "SetSubmitConfirmation". The button click does not fire an "ItemCommand" event, but instead, an ajax request passing an argument - InitiateAsyncRequest 


function InitiateAsyncRequest(argument) {
    var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
    ajaxManager.ajaxRequest(argument);
    return false;
}
 
function SetSubmitConfirmation(comment) {
    document.getElementById('<%=hdnComment.ClientID %>').value = comment;
    InitiateAsyncRequest('submit');
}


Jayesh Goyani
Top achievements
Rank 2
 answered on 24 Jan 2012
1 answer
320 views
hi ,

i write the following code  <MasterTableView EditMode="InPlace" Name="product" DataKeyNames="PKProductID" CommandItemDisplay="Top">  in aspx page
when i go into updatecommand or insert command i want to find out the table name (means product) for that i am using the following code
DirectCast(item.OwnerTableView,Telerik.Web.UI.GridTableView).Name BUT IT GIVE ALWAYS RESULT AS TABLE

what is the way to get that table name ?
Jayesh Goyani
Top achievements
Rank 2
 answered on 24 Jan 2012
2 answers
94 views

Hi,

I'm trying to validate one of a related radcombobox controls, but there is few problems (Please view the sample application):
1) In the usercontrol there is in addition to the radcombobox controls, a RadUpload control which must be validated too (Check size of an image).  So by addding a custom validator to the usercontrol, the related combobox (in the screen-shot) doesn't load the items and allways displays "Loading...".
But by removing the customvalidator control (Or even by removeing the "OnServerValidate="ImgRadUploadDimCustomValidator_ServerValidate"" property), then the related radcombobox loads all required items.

2) As it is known, the related combobox shows items by selecting the required item in the source combobox. So, I'm trying to set a Comparevalidator (Called "ParentIDCompareValidator") to the related comboboX (Which has a "Select Parent" item - default item).So By selecting the "Select Parent" item the validation message must be displayed.
I don't know how can I set a comparevalidator in order to enable it validate the selected item when the required items are loaded. Please try to enable the "ParentIDCompareValidator" control and you will see that the error message is allways displayed.

3) By clicking insert/Edit buttons, Only the default item value saved in the database, and not the selected item. Thats mean, if I select any item (except to the default item) and click submit, then the default item value ("1") saved on the DB.

Please, I need your help in order to solve the above problems.

Regards,
Bader

Bader
Top achievements
Rank 1
 answered on 24 Jan 2012
17 answers
524 views
Hello,

I have a problems with the radtreeview control:
1) Please view the page http://www.telerik.com/help/aspnet-ajax/ajax-ajax.html. You can see that by opeining the page, the radtreeview expands in order to show the appropriate node (Marked in red in the attached screen shot), how can I do that? Is there any sample code which demonstrate how to do that?

2) Some of the radtreeview have the value of "Folder" and other nodes have a value of "Document". Is there any way to drag and drop "Document" nodes into "Folder" nodes? Is there any sample code which demonstrate how to do that?

3) In the attached screen-shot the root node is invisible? How can I do that?

Here is my radtreeview code:
<asp:SqlDataSource ID="QAGuideSqlDataSource" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:GuidesConnectionString %>" 
                    SelectCommand="SELECT [SerID], ([Type] + '~/Guides/Pages/' + [Path] + '.aspx') as TypeAndFullPath, [ParentID], [Title], [Type] FROM [QAGuide] order by [Type],[Title]"></asp:SqlDataSource>
                <telerik:RadTreeView ID="QAGuideRadTreeView" runat="server" OnNodeClick="QAGuideRadTreeView_NodeClick" DataValueField="Type"
                    DataSourceID="QAGuideSqlDataSource" DataFieldParentID="ParentID" DataFieldID="SerID" DataTextField="Title" >
                    <DataBindings>
                        <telerik:RadTreeNodeBinding Depth="0" Expanded="true" />
                    </DataBindings>
                </telerik:RadTreeView>

Please, I need your help in order to handle the above issues.
It is very appreciated to send me a sample code.

Regards,
Bader
Princy
Top achievements
Rank 2
 answered on 24 Jan 2012
1 answer
95 views
Hello

I am using radscheduler 2011 Q2 for viewing appointments. I am using SchedulerWebService for binding data and everything shows up. But when I am adding pdf export button (the same way like in demo) in pop up window I can see empty calendar only (without appointments). Is this known issue (I know that there are other binding ways but binding to web service is my requirement) or am I doing something wrong? Maybe there are some problems with exporting becaues many things in this way of binding data from web service are being made by JavaScript? Thanks in advance

Regards
Peter
Telerik team
 answered on 24 Jan 2012
1 answer
100 views
I have the following in a template for a listview, the title is being evaluated and bound as expected, but the URLToShare is not?
<ItemTemplate>
            <div class="keyTagData">
                     
                <div id="KeyTagLogo">
                    <img id="imgKeyTagLogo" <%#FormatImageData(Eval("OfferGroup.Enterprise.LogoFile").ToString())%> alt='<%#Eval("OfferGroup.Enterprise.DBAName")%>' />
                    <%--<asp:Image runat="server" ID="imgKeyTagLogo" ImageUrl='~/CouponLogos/<%#Eval("OfferGroup.Enterprise.LogoFile")%>' />--%>
                </div>
                <div id="KeyTagHeader">
                    <%#Eval("OfferGroup.Enterprise.DBAName")%>
                </div>
                <div id="KeyTagText">
                    <%#Eval("Title")%>
                </div>
                <div id="KeyTagSocialMedia">
                    <telerik:RadSocialShare ID="radSocialMediaKeyTag" runat="server" CssClass="DblUpFB"
                    TitleToShare='<%#Eval("Title")%>' UrlToShare='http://www.mydomain.com/Detail.aspx?ogid=<;%=Eval("OfferGroupID").ToString()%>'>
                        <MainButtons>
                            <telerik:RadSocialButton SocialNetType="ShareOnFacebook" />
                            <telerik:RadSocialButton SocialNetType="ShareOnTwitter" />
                            <telerik:RadSocialButton SocialNetType="SendEmail" />
                        </MainButtons>
                    </telerik:RadSocialShare>
                </div>
                <div id="KeyTagNumOffers"><a href='Detail.aspx?ogid=<%#Eval("OfferGroupID")%>'><%#((int)Eval("OfferGroup.Offers.Count")-1).ToString()%> More Offers</a></div>
                <div id="KeyTagPrint">
                    <asp:ImageButton runat="server" ID="btnPrint" OnClientClick='<%#FormatJS(Eval("OfferGroupID").ToString())%>' ImageUrl="~/images/InsidePage_PrintButton.png" />
                </div>
            </div>
        </ItemTemplate>

 

 

 

 

Sys.Application.add_init(

function() {

$create(Telerik.Web.UI.RadSocialShare, {

"_addFbScript":false,"_addGoogleScript":false,"_addTwitterScript":false,"_uniqueId":"ctl00$ContentPlaceHolder1$radDiscountList$ctrl1$radSocialMediaKeyTag","clientStateFieldID":"ctl00_ContentPlaceHolder1_radDiscountList_ctrl1_radSocialMediaKeyTag_ClientState","mainButtons":"[['ShareOnFacebook','http://www.doubleupdiscounts.com/Detail.aspx?ogid=<%=Eval("OfferGroupID").ToString()%>','Free Pizza on Us!', '470', '470', '', ''],['ShareOnTwitter','http://www.mydomain.com/Detail.aspx?ogid=<%=Eval("OfferGroupID").ToString()%>','Free Pizza on Us!', '470', '470', '', ''],['SendEmail','http://www.mydomain.com/Detail.aspx?ogid=<%=Eval("OfferGroupID").ToString()%>','Free Pizza on Us!', '470', '470', '', '']]"}, null, null, $get("ctl00_ContentPlaceHolder1_radDiscountList_ctrl1_radSocialMediaKeyTag"));

});

Svetlina Anati
Telerik team
 answered on 24 Jan 2012
4 answers
292 views
Hi,

I have a RadComboBox as an element in a NestedViewTemplate of a RadGrid. There are also several labels in the nested view whose text I would like to change dynamically depending on the selected item of the combobox.

I tried:
RadComboBox combo = (RadComboBox)CustomerGrid.MasterTableView.Items[0].ChildItem.FindControl("cardsCombo");

from within cardsCombo_SelectedIndexChanged to try and get hold of it, to no avail (I guess I'm looking in the wrong place).

So my question is, how do I implement SelectedIndexChanged functionality from within the nested view?

Any help would be greatly appreciated.

Cheers,
Christian
Christian
Top achievements
Rank 1
 answered on 24 Jan 2012
1 answer
220 views
I am providing you the code which i used ....i want when i uncheck the checkbox then filter text will clear...

In radgrid
<CommandItemTemplate
>

<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">

<tr>

<td width="17%" align="left" style="padding-right: 15px">

<asp:CheckBox ID="chkViewFilter" runat="server" Checked="false" onclick="showFilterItem(this)" />

<asp:Label ID="Label4" runat="server" Text="Show Filter"></asp:Label>

</td>
<CommandItemTemplate>

<script>

 

//Hide and show Filter on checking/Unchecking of checkbox

 

function showFilterItem(val) {

 

try {

 

var picker = $find("ctl00_ContentPlaceHolder1_User_RadGrid_ctl00_ctl02_ctl00_chkViewFilter");

 

if (val.checked) {

$find(

 

'ctl00_ContentPlaceHolder1_User_RadGrid').get_masterTableView().showFilterItem();

document.getElementById(

 

"ctl00_ContentPlaceHolder1_HiddenField8").value = 1;

}

 

else {

 

//document.getElementById('ctl00_ContentPlaceHolder1_RadDtPkFrom').value = ""

$find(

 

'ctl00_ContentPlaceHolder1_User_RadGrid').get_masterTableView().hideFilterItem();

document.getElementById(

 

"ctl00_ContentPlaceHolder1_HiddenField8").value = 0;

 

// $find('ctl00_ContentPlaceHolder1_User_RadGrid').get_masterTableView().filter("Opportunity", "", "NoFilter");

$find(

 

'<%=User_RadGrid.ClientID%>').get_masterTableView().get_filterExpressions().clear();

}

}

 

catch (ex) {

}

}

</script>
Princy
Top achievements
Rank 2
 answered on 24 Jan 2012
3 answers
66 views
I have an issue combining the FormDecrator and the Multipage controls.

The Multipage is bounded to a TabStrip and changes accordingly. It seems like the FormDecorator is not changing the style of the controls inside the hidden PageViews. As soon as I change the tab the FormDecortator does the trick and changes the style for all controls inside the active PageView but this effect is visible to the user and you can actually see the style changes. This only happens the first time you access a certain tab. If you click that tab again the controls are already styled correctly.

Is there a way around this? Meaning, I would like to apply the styling to ALL controls even hidden ones. Moreover, the Javascript which changes the style works in IE and in Firefox but in Chrome the style doesn't change unless a post-back occurs. 

Thanks,

Nick
Rumen
Telerik team
 answered on 24 Jan 2012
2 answers
70 views
hi,
Problem 1:

i have the 3 level hierarchical grid when i click on the main level row edit/delete command is happen the expand symbol is missing  for the entire grid but in the demo the symbol is reliable i want same functionality what are the steps i follow please tell me

problem 2:
i set the datakey field in mastertable view as like    <MasterTableView EditMode="InPlace" Name="product" DataKeyNames="PKProductID"> but in the code updatecommand i am unable to get the the name and also

editableItem.GetDataKeyValue("pkproductid") method throw error why?
how can i get the name of the table and datakey of the row

Thanks & Regards,
M.Koteswara Rao
koteswararao
Top achievements
Rank 1
 answered on 24 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?