Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
262 views

Please help me on this since I am new.  Thanks a lot.

I changed the text box to a dropdown as below:

from

        <telerik:GridBoundColumn DataField="name" DefaultInsertValue=""
            HeaderText="name" SortExpression="name" UniqueName="name">
        </telerik:GridBoundColumn>

to
        <telerik:GridDropDownColumn DatasourceID=sqldatasource2 ListValueField=name ListTextField=name
            EnableEmptyListItem=true EmptyListItemText="choose an option" DataField="name"
            datatype=System.String
            HeaderText="name" SortExpression="name" UniqueName="name">
        </telerik:GridDropDownColumn>

the statement below from insertCommand event handler failed since I don't know how to get the selected value from the dropdown

Dim CompanyName As String = TryCast(newItem("name").Controls(0), TextBox).Text

Please help me.
---------------------------------------------------------------------------------------------------------------------

[VB] InsertCommand event handler

'Get the GridEditableItem of the RadGrid

Dim

newItem

 

As GridEditableItem = TryCast(e.Item, GridEditableItem)

 

'Access the textbox from the edit form template and store the values in string variables.

Dim

 

 

CompanyName As String = TryCast(newItem("CompanyName").Controls(0), TextBox).Text

 

Dim

 

 

Phone As String = TryCast(newItem("Phone").Controls(0), TextBox).Text

 

Try

'Insert Query execution

SqlDataSource1.InsertCommand =

 

"INSERT INTO Shippers (CompanyName, Phone) Values ('" +

 

CompanyName +

 

"','" + Phone + "')"

 

SqlDataSource1.Insert()

Catch

 

 

ex As Exception

 

RadGrid1.Controls.Add(

 

New LiteralControl("Unable to insert Shipper. Reason: " +

 

ex.Message))

e.Canceled =

 

True

 

End Try
--------------------------------------------------------
 

 

 

 

 

Supriya
Top achievements
Rank 1
 answered on 28 Sep 2012
1 answer
77 views
Hello,

does PanelBat support globalization?
By that, I mean Rad Panel Item text.


br,
Jan
Jan
Top achievements
Rank 1
 answered on 28 Sep 2012
1 answer
103 views
Hello all,

How can I use the Radgrid.GetBindingData with a stored procedure? When I replace the 2nd parameter with the name of a stored proc I get compilation errors. Is it possible?

I would greatly appreciate if someone can give me an answer.


GridBindingData data = RadGrid.GetBindingData("xxxxx.WCF.dbPublisherDataContext", "vPublisherQueues", startRowIndex, maximumRows, sortExpression, filterExpression);                        
Tsvetina
Telerik team
 answered on 28 Sep 2012
1 answer
148 views
Hi All,

  I want full code releted to  Multi select Combobox with check boxes as items in radgrid in silverlight.

Thanks,
Himansu
Ivana
Telerik team
 answered on 28 Sep 2012
3 answers
171 views
Hai,

             I have designed Web Mail using Rad Grid.I have displayed Mails in Rad Grid.On Clicking the mail,I need to the redirect to the another page with the  id of the row as querystring.Can anyone pls tell me how to do it?
Kostadin
Telerik team
 answered on 28 Sep 2012
5 answers
116 views
Hi!

I'm currently working on creating RadHtmlField(editor) programatically on a sharepoint 2007 page with following

Requirements:-

1) The editor is created based on how many user requires. Example, If he/she wants 10 editors, he/she will get 10 editors that comes together with a textbox each, as editor title in the page.

Current settings:-

1) Both editors and textboxes are wrapped in a usercontrol.
2) The usercontrol Fieldname is set to "Content". The [Content] is one of the page layout content type.
3) In code behind, the editors are created with no Fieldname.
4) Each editors.html and textboxes.value will be assigned from [Content] value that being serialized based on indexes.

Problems:-

1) Every time the editors are rendered, its fieldname picks up usercontrol's Fieldname "Content" value.
2) This will overwrite editors.html value that being assigned previously. Thus It will always display the last editors.html when publish.
3) If i assigned a dummy value for each editor's Fieldname, the editor will not show up

Is there anywhere that i can achieve the requirements or workarounds that can make it happens? Since, there is no reference for RadHtmlField anywhere in the internet, i really need your help.

Telerik.Web.UI version: 2010.3.1317.20, RadEditorSharepoint version: 2.0.50727
Rumen
Telerik team
 answered on 28 Sep 2012
1 answer
68 views
I am looking forward to the new features I saw here.
Marin Bratanov
Telerik team
 answered on 28 Sep 2012
1 answer
55 views
Hi,

My codes is here.
protected void Button1_Click(object sender, EventArgs e)
       {
 
 DataTable dt = new DataTable();
           OleDbDataAdapter da=new OleDbDataAdapter("Select NAME, PHONE FROM TBL_CITY WHERE POP='"+TextBox1.Text+"' and ROWNUM<150",conn);
           da.Fill(dt);
           RadGrid1.DataSource = dt;
           RadGrid1.DataBind();
       }

<telerik:RadGrid ID="RadGrid2" runat="server" AllowPaging="True">
    </telerik:RadGrid>


When I click the button1 its ok. Radgrid is working.

But when I click the Next page or any page number, I can't see radgrid. 


For example:

I click the button1. Radgrid is ok.

When I click the 5. page number. I cant see radgrid.

After when ı click the button1. I am seeing 5. page radgrid :) 



How can I do? 

Sorry for my english.
Andrey
Telerik team
 answered on 28 Sep 2012
4 answers
194 views
In a pivot table format grid, how does one go about either inserting or updating a row. Need to loop through each column in a row. Since most column UniqueNames contain an item's value. How do you first loop through columns and then identify each where there is no distinct unique name. And also because each record spans multiple dates which requires a multi-record update.

The pivot table I have created, lists date columns and statistics rows.

                     | 09/02/2012 | 09/03/2012 | 09/05/2012 | 09/09/2012
Stat1            |         1         |          0         |         5         |         3       
Stat2            |         8         |          0         |         1         |         0       
Stat3            |         0         |          6         |         2         |         7       

Thank you,

SteveO
JSON
Top achievements
Rank 1
 answered on 28 Sep 2012
1 answer
124 views
Hi ,
my radgirid sample markup
<telerik:RadGrid ID="RadCagri" runat="server"
             CellSpacing="0" Culture="tr-TR" Height="380px" GridLines="None"
    AllowPaging="True" AutoGenerateColumns="False" CssClass="Grid_Modul"
    AllowFilteringByColumn="True" AllowSorting="True" Skin="Simple">           
                  
            <MasterTableView DataKeyNames="GERCEKADI" HierarchyLoadMode="Client" >
            <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
            </EditFormSettings>
 
            <PagerStyle Mode="NextPrevAndNumeric" />
           <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
               <Columns>
 
                     <telerik:GridBoundColumn DataField="GERCEKADI" HeaderText="ÇaÄŸrı Merkezi Uzm."
                       FilterControlAltText="Filter GERCEKADI column" UniqueName="GERCEKADI"
                       FilterControlWidth="250px"><ItemStyle Wrap="False" /></telerik:GridBoundColumn>
 
                  <telerik:GridBoundColumn DataField="TXTUNVAN" HeaderText="Müşteri Adı"
                       FilterControlAltText="Filter TXTUNVAN column" UniqueName="AG" DataType="System.String" FilterControlWidth="400px">
                       <ItemStyle Wrap="False" /></telerik:GridBoundColumn>
 
                  <telerik:GridBoundColumn DataField="TXTPROJEADI" HeaderText="Proje"
                       FilterControlAltText="Filter TXTPROJEADI column" DataType="System.String"
                       UniqueName="TXTPROJEADI">
                       <ItemStyle Wrap="False" /></telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="LNGMERKEZKOD" HeaderText="merkez Kod"
                       FilterControlAltText="Filter LNGMERKEZKOD column" DataType="System.Int32"
                       UniqueName="LNGMERKEZKOD" Display="false">
                       <ItemStyle Wrap="False" /></telerik:GridBoundColumn>
 
 
                      <telerik:GridDateTimeColumn DataField="TRHTARIH"
                       DataFormatString="{0:dd/MM/yyyy}" DataType="System.DateTime"
                       FilterControlAltText="Filter TRHTARIH column" FilterControlWidth="150px"
                       HeaderText="Arama Tarihi" UniqueName="TRHTARIH">
                       <ItemStyle Wrap="False" /></telerik:GridDateTimeColumn>
                 
                   <telerik:GridDateTimeColumn DataField="TXTSAAT"
                       DataFormatString="{0:HH:mm:ss}" DataType="System.DateTime" FilterControlWidth="100px"
                       FilterControlAltText="Filter TXTSAAT column" HeaderText="Arama Saati"
                       MinDate="" UniqueName="TXTSAAT">
                   </telerik:GridDateTimeColumn>
 
                    <telerik:GridBoundColumn DataField="TXTDEPARTMAN" HeaderText="ÇaÄŸrı KuyruÄŸu"
                       FilterControlAltText="Filter TXTDEPARTMAN column" DataType="System.String"
                       UniqueName="TXTDEPARTMAN">
                       <ItemStyle Wrap="False" /></telerik:GridBoundColumn>
 
                </Columns>
              </MasterTableView>
             <ClientSettings>
                <DataBinding Location="GridMasterDetailsService.svc" FilterParameterType="Linq" SelectMethod="GetCLG"
                 SortParameterType="Linq" ShowEmptyRowsOnLoad="True">               
                </DataBinding>
                <ClientEvents OnDataBound="RadCagri_DataBound" OnDataBinding="RadCagri_DataBinding" OnGridCreated="RadCagriCriteria" />
                <Selecting AllowRowSelect="True"></Selecting>
                <Scrolling AllowScroll="True"></Scrolling>
            </ClientSettings>
             
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
             
 
 
 
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu></telerik:RadGrid>
and my button click 
RadCagri.ExportSettings.ExportOnlyData = True
       RadCagri.ExportSettings.IgnorePaging = True
       RadCagri.ExportSettings.OpenInNewWindow = True
       RadCagri.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerBind
       RadCagri.MasterTableView.ExportToExcel()
but export excell empty whyy my page usercontrol

Help mee Thanks
Kostadin
Telerik team
 answered on 28 Sep 2012
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?