Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
42 views

I am using Grid / Hierarchy with Templates to display data in tabs and grid. Is there anyway I can use Edit Popup??

Please help...
Thanks,
Lakshmi

kitty
Top achievements
Rank 1
 asked on 16 Mar 2011
2 answers
74 views
I have the code of my friend using ASP Textbox:

string customerName = (MultiView1.Views[3].FindControl("txtCustomerName") as TextBox).Text;
int age = int.Parse((MultiView1.Views[3].FindControl("txtAge") as TextBox).Text);

so,i replaced ASP Textbox with Rad Textbox but when i debug my code is fail.If i want to using RadTextbox how can i do?
Marin
Telerik team
 answered on 16 Mar 2011
1 answer
165 views
Dears,

I have an Telerik grid view with Automatic insert update delete ..but these events didnt call when i clicked to thier releted buttons
as following :


 

 

Protected Sub RadGrid1_ItemInserted(ByVal source As Object, ByVal e As GridInsertedEventArgs) Handles

RadGrid1.ItemInserted

 

 

 

 

 

 

If e.Exception IsNot Nothing

Then

 

 

e.ExceptionHandled =

 

True

 

 

e.KeepInInsertMode =

 

True

 

 

DisplayMessage(

 

True, "Employee cannot be inserted. Reason: " & Convert

.ToString(e.Exception.Message))

 

 

 

 

 

 

Else

 

 

DisplayMessage(

 

False, "Employee inserted"

)

 

 

 

 

 

 

End

If

 

 

 

 

Dim gridEditFormItem As GridEditFormItem = DirectCast(e.Item, GridEditFormItem

)

 

 

 

 

 

 

Dim dropDownList As DropDownList = DirectCast(gridEditFormItem.FindControl("ddlTOC"), DropDownList

)

 

 

 

 

 

 

Dim TextBox As TextBox = DirectCast(gridEditFormItem.FindControl("TextBox8"), TextBox

)

 

 

 

 

 

 

 

 

 

End

Sub


and this is the source code :

 

 

<telerik:RadPageView ID="RadPageView2" runat="server">

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" CssClass="RadGrid" GridLines="None"

 

 

 

AllowPaging="True" PageSize="20" AllowSorting="True" AutoGenerateColumns="False"

 

 

 

ShowStatusBar="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"

 

 

 

AllowAutomaticUpdates="True" OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted"

 

 

 

OnItemUpdated="RadGrid1_ItemUpdated" OnItemCommand="RadGrid1_ItemCommand" OnPreRender="RadGrid1_PreRender">

 

 

 

<MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="الأجراء">

 



any help i will be grateful

 

 

Marin
Telerik team
 answered on 16 Mar 2011
1 answer
75 views
Hello there,

I have several telerik controls on the page and I am facing the issue of missing Styles, when I browse the site via IE.  However, it works good with Firefox.  I am using the "latest" Q3 2010 SP1 that came out in Feb 2011.

I did go through this link [still does not work well]

http://www.telerik.com/community/forums/aspnet-ajax/scriptmanager-and-stylesheetmanager/question-on-2010-sp1.aspx

If you could "exactly" outline what I needed to do, to get this working, that would be much appreciated. My gridview is the one losing the styles.

Here's what I did

1) Added the entry to web.config <add key="Telerik.Web.UI.StyleSheetFolder" value="~/styles"/>
2) In the head section, I added [just guessed this URL]
<link rel="stylesheet" type="text/css" href="../styles/Skins/TabStrip.css" />
<link rel="stylesheet" type="text/css" href="../styles/Skins/Simple/TabStrip.Simple.css" />

Could you provide me "exact" fix to my solution?

-Rajesh
Simon
Telerik team
 answered on 16 Mar 2011
8 answers
199 views
Hi Everyone,

I have a treeview which has one root node and 2 child nodes each of whom has many children but they do not contain any children.
I have a button on the page which I would like to enable when a user has checked one of the nodes or disable if the user has unchecked all nodes.

I have added the following script:

function

 

 OnNodeChecked(sender,eventArgs) {

 

 

 

var tree = $find('rdtOutputColumns');

 

 

var button = $get("btnOK");

 

 

 

if (tree.get_checkedNodes().length > 0) {

 

 

button.disabled = false;

 

}

 

else {

 

button.disabled =

true;

 

}

}

This works fine for intially enabling the button when a user checks one or more of the child nodes but if previously checked nodes are unchecked then the get_checkedNodes().length reports that 1 node is still checked and so my button is never disabled again.

Has anybody got any ideas as to why the get_checkNodes() function is returning a node that is no longer checked?

Many thanks
Antony

Phil
Top achievements
Rank 1
 answered on 16 Mar 2011
2 answers
80 views
I want get my last inserted row with the primary key. How can I do that.  

I am using radgrid with linqdatasource with automatic insert operation. 

I don't want  do it with select query to database to get the last inserted row.  If multiple people doing insert from different places I will get wrong data. 


Thanks
Farid Hayati
Top achievements
Rank 1
 answered on 16 Mar 2011
3 answers
78 views
Hello,

I am regular using telerik controls. I implemented the advance feature in my project in one grid, now gird column alignemtn got distruct, please can you give me suggetion for this. for you reference I sending you some codes and output screen, you can see in screen column heading anddata both alignemnt is not good. So  please can you help me in this. I will say thank in advance
   
<telerik:RadGrid ID="radGridInbox" runat="server" AutoGenerateColumns="false" OnItemDataBound="radGridInbox_ItemDataBound"
                                        GridLines="Horizontal" AllowPaging="true" PageSize="25" OnNeedDataSource="radGridInbox_NeedDataSource"
                                        OnPageIndexChanged="radGridInbox_PageIndexChanged" OnPageSizeChanged="radGridInbox_PageSizeChanged"
                                        Width="100%" CellPadding="0" CellSpacing="0" EnableHeaderContextFilterMenu="true"
                                        EnableHeaderContextMenu="true" BorderWidth="0" EnableAjaxSkinRendering="true"
                                        AllowFilteringByColumn="false" AllowAutomaticInserts="True" AllowAutomaticUpdates="True">
                                        <GroupingSettings CaseSensitive="false" />
                                        <HeaderContextMenu EnableAutoScroll="True" />
                                        <MasterTableView AutoGenerateColumns="false" Width="100%" CommandItemDisplay="Top" PagerStyle-AlwaysVisible="true" DataKeyNames="UserMessageId,UserId,MessageState"
                                            AllowSorting="true" AllowFilteringByColumn="false" FilterItemStyle-HorizontalAlign="Left"
                                            HorizontalAlign="NotSet"EditMode="PopUp" CellPadding="0"
                                            CellSpacing="0" IsFilterItemExpanded="false" GridLines="None" TableLayout="Auto"
                                            BorderWidth="0" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true">
                                            <CommandItemSettings RefreshText="Refresh List" />
                                            <PagerStyle AlwaysVisible="true" Mode="NextPrevNumericAndAdvanced" Position="Bottom" />
                                            <Columns>
                                                <telerik:GridDateTimeColumn DataFormatString="{0:MM/dd/yyyy}" ItemStyle-HorizontalAlign="Left"
                                                    HeaderText="Date" DataField="DeliverOnDate">
                                                    <HeaderStyle HorizontalAlign="Left" Width="8%"></HeaderStyle>
                                                    <ItemStyle HorizontalAlign="Left" Width="8%"></ItemStyle>
                                                </telerik:GridDateTimeColumn>
                                                <telerik:GridBoundColumn ItemStyle-HorizontalAlign="Left" HeaderText="From" DataField="FromUserName">
                                                    <HeaderStyle HorizontalAlign="Left" Width="16%"></HeaderStyle>
                                                    <ItemStyle HorizontalAlign="Left" Width="16%"></ItemStyle>
                                                </telerik:GridBoundColumn> 

Thanks and Regards,
Dilip Kumar
Daniel
Telerik team
 answered on 16 Mar 2011
3 answers
99 views
Im using the ItemsRequested event to filter the contents of one combobox based on the selection in another.  Evrything works fine in IE7 and Opera, but in Firefox (3) and Chrome, it doesnt work.  Normally in the second combo I show a message that says 'loading'  while the data is fetched via ajax without a full page postback, but in Firefox & Chrome, the ajax fetching mechanism just doest work.  Has anyone else experienced this ?  Is there a workaround ?
Helen
Telerik team
 answered on 16 Mar 2011
1 answer
57 views
Hi guys,

look at this sample and go to page 3 of the grid;
then, look at the last group of the page: the group header say "Group continues on the next page", that's ok but look at group footer totals, do you see what is wrong? Why group's items are not included in the group footer totals?
This is what my customer is expecting!

Is there a workaround to achieve that?

Any help in appreciated, thank you!
Radoslav
Telerik team
 answered on 16 Mar 2011
2 answers
129 views
I've tried creating a new style in the Visual Style Builder, selecting just Grid from the control list. I;ve then downloaded the zip, and copied the files into my project.

On one page, I've disabled the embedded styles of the RadGRid, and set the style to the name of the custom style.  I have also created links to the stylesheets:-

<link href="App_Themes/Grid.TestStyle.css" rel="stylesheet" type="text/css" />
   <link href="App_Themes/Menu.TestStyle.css" rel="stylesheet" type="text/css" />
   <link href="App_Themes/Input.TestStyle.css" rel="stylesheet" type="text/css" />
   <link href="App_Themes/Slider.TestStyle.css" rel="stylesheet" type="text/css" />
   <link href="App_Themes/Calendar.TestStyle.css" rel="stylesheet" type="text/css" />

In design mode the grid looks OK, showing the correct colours etc, but on running the page, I get the error:-

Telerik.Web.UI.GridFilterMenu with ID='rfltMenu' was unable to find embedded skin with name 'TestStyle'. Please, make sure that you spelled the skin name correctly, or if you want to use a custom skin, set EnableEmbeddedSkins=false.



The Radgrid definition is:-
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" 
              AllowPaging="True" AllowSorting="True" DataSourceID="SqlDataSource1" 
              GridLines="None" Skin="TestStyle" Width="750px" AllowAutomaticDeletes="True" 
              AllowAutomaticUpdates="True" onitemupdated="RadGrid1_ItemUpdated" 
          Culture="en-GB" EnableEmbeddedSkins="False">
              <MasterTableView DataSourceID="SqlDataSource1" AutoGenerateColumns="False" 
                  DataKeyNames="Purchaser">
                  <CommandItemSettings ExportToPdfText="Export to Pdf" />
                  <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                  </RowIndicatorColumn>
                  <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                  </ExpandCollapseColumn>
                  <Columns>
                      <telerik:GridBoundColumn DataField="Purchaser" 
                          FilterControlAltText="Filter Purchaser column" HeaderText="Purchaser" 
                          ReadOnly="True" SortExpression="Purchaser" UniqueName="Purchaser">
                          <ItemStyle Width="150px" />
                      </telerik:GridBoundColumn>
                      <telerik:GridBoundColumn DataField="PurchaserName" 
                          FilterControlAltText="Filter PurchaserName column" HeaderText="Name" 
                          SortExpression="PurchaserName" UniqueName="PurchaserName">
                      </telerik:GridBoundColumn>
                      <telerik:GridBoundColumn AllowFiltering="False" DataField="ShortName" 
                          FilterControlAltText="Filter ShortName column" HeaderText="Short Name" 
                          SortExpression="ShortName" UniqueName="ShortName">
                      </telerik:GridBoundColumn>
                      <telerik:GridEditCommandColumn ButtonType="ImageButton" 
                          FilterControlAltText="Filter EditCommandColumn column" 
                          CancelImageUrl="Cancel.gif" EditImageUrl="Edit.gif" InsertImageUrl="Update.gif" 
                          UpdateImageUrl="Update.gif">
                      </telerik:GridEditCommandColumn>
                      <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" 
                          ConfirmText="Are you sure you wish to delete this record?" 
                          FilterControlAltText="Filter column column" Text="Delete" UniqueName="column">
                      </telerik:GridButtonColumn>
                  </Columns>
                  <EditFormSettings EditFormType="Template">
                      <EditColumn FilterControlAltText="Filter EditCommandColumn column" 
                          CancelImageUrl="Cancel.gif" EditImageUrl="Edit.gif" InsertImageUrl="Update.gif" 
                          UpdateImageUrl="Update.gif">
                      </EditColumn>
                      <FormTemplate>
                          <table style="width:100%;">
                              <tr>
                                  <td style="text-align: right; width: 129px">
                                      Name:</td>
                                  <td>
                                      <asp:TextBox ID="TextBox2" runat="server" MaxLength="50" 
                                          Text='<%# Bind("PurchaserName") %>' Width="150px"></asp:TextBox>
                                      <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                          ControlToValidate="TextBox2" Display="None" ErrorMessage="Name is required!" 
                                          ValidationGroup="VG1"></asp:RequiredFieldValidator>
                                      <asp:ValidatorCalloutExtender ID="RequiredFieldValidator1_ValidatorCalloutExtender" 
                                          runat="server" Enabled="True" TargetControlID="RequiredFieldValidator1">
                                      </asp:ValidatorCalloutExtender>
                                  </td>
                              </tr>
                              <tr>
                                  <td class="style4" style="width: 129px; text-align: right">
                                      Short Name:</td>
                                  <td>
                                      <asp:TextBox ID="TextBox3" runat="server" MaxLength="15" 
                                          Text='<%# Bind("ShortName") %>' Width="110px"></asp:TextBox>
                                      <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                          ControlToValidate="TextBox3" Display="None" 
                                          ErrorMessage="Short name is required!" ValidationGroup="VG1"></asp:RequiredFieldValidator>
                                      <asp:ValidatorCalloutExtender ID="RequiredFieldValidator2_ValidatorCalloutExtender" 
                                          runat="server" Enabled="True" TargetControlID="RequiredFieldValidator2">
                                      </asp:ValidatorCalloutExtender>
                                  </td>
                              </tr>
                              <tr>
                                  <td class="style4" style="width: 129px; text-align: right">
                                      Type:</td>
                                  <td>
                                      <asp:DropDownList ID="DropDownList5" runat="server" 
                                          SelectedValue='<%# Bind("Type") %>'>
                                          <asp:ListItem>Non-Midlands</asp:ListItem>
                                          <asp:ListItem>Midlands</asp:ListItem>
                                      </asp:DropDownList>
                                  </td>
                              </tr>
                              <tr>
                                  <td class="style4" style="width: 129px; text-align: right">
                                      Sort Order:</td>
                                  <td>
                                      <asp:TextBox ID="TextBox4" runat="server" MaxLength="3" 
                                          Text='<%# Bind("SortOrder") %>' Width="50px"></asp:TextBox>
                                  </td>
                              </tr>
                              <tr>
                                  <td class="style4" style="width: 129px; text-align: right">
                                      Corp Forms Group:</td>
                                  <td>
                                      <asp:DropDownList ID="DropDownList6" runat="server" 
                                          DataSourceID="SqlDataSource2" DataTextField="corpformsgroup" 
                                          DataValueField="corpformsgroup" SelectedValue='<%# Bind("CorpFormsGroup") %>'>
                                      </asp:DropDownList>
                                  </td>
                              </tr>
                              <tr>
                                  <td class="style4" style="width: 129px; text-align: right">
                                      Corp Forms Sort:</td>
                                  <td>
                                      <asp:TextBox ID="TextBox5" runat="server" MaxLength="3" 
                                          Text='<%# Bind("CorpFormsSort") %>' Width="50px"></asp:TextBox>
                                  </td>
                              </tr>
                              <tr>
                                  <td class="style4" style="width: 129px; text-align: right">
                                      NHS Net Address:</td>
                                  <td>
                                      <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("NHSNetAddress") %>' 
                                          Width="350px"></asp:TextBox>
                                  </td>
                              </tr>
                          </table>
                          <br />
                          <table style="width: 300px;">
                              <tr>
                                  <td style="width: 94px">
                                         
                                      <telerik:RadButton ID="RadButton1" runat="server" CommandName="Update" 
                                          Skin="WebBlue" Text="Update" ValidationGroup="VG1">
                                      </telerik:RadButton>
                                  </td>
                                  <td>
                                         
                                      <telerik:RadButton ID="RadButton2" runat="server" CausesValidation="False" 
                                          CommandName="Cancel" Skin="WebBlue" Text="Cancel">
                                      </telerik:RadButton>
                                  </td>
                              </tr>
                          </table>
                      </FormTemplate>
                  </EditFormSettings>
              </MasterTableView>
              <FilterMenu EnableImageSprites="False">
              </FilterMenu>
              <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
              </HeaderContextMenu>
          </telerik:RadGrid>

Any ideas why this is happening.

Thanks
AP
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 16 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?