Search Results

Search found 196 results on 8 pages for 'datafield'.

Page 5/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • Flash Builder (Flex 4): datagrid populated by XML, how can I add an image in some of the rows?

    - by ufk
    I have a DataGrid table with columns name, phone. In column name I would like to add a picture near the name of the person. How can I add a picture in a datagrid row? <fx:Declarations> <fx:XMLList id="people" xmlns=""> <test> <name>moshe</name> <phone>555</phone> </test> </fx:XMLList> </fx:Declarations> <mx:DataGrid id="dg" color="0x323232" width="532" rowCount="10" top="10" left="10" DataProvider="{people}"> <mx:columns> <mx:DataGridColumn dataField="name" headerText="person name"/> <mx:DataGridColumn dataField="phone" headerText="phone"/> </mx:columns> </mx:DataGrid>

    Read the article

  • Problem to display 3D google map.

    - by nemade-vipin
    hello friends, I have implemented one Flex application in which I want to display 3D google map.In which I am getting the error the NUll object reference during map display. Here is my code:- import com.google.maps.controls.MapTypeControl; import adobe.utils.XMLUI; import mx.rpc.events.FaultEvent; import mx.controls.Alert; import generated.webservices.*; import mx.collections.ArrayCollection; import mx.controls.*; import generated.webservices.*; import com.google.maps.LatLng; import com.google.maps.Map3D; import com.google.maps.MapEvent; import com.google.maps.MapMouseEvent; import com.google.maps.services.GeocodingEvent; import com.google.maps.services.ClientGeocoder; import com.google.maps.overlays.Marker; import com.google.maps.InfoWindowOptions; import com.google.maps.MapOptions; import com.google.maps.MapType; import com.google.maps.View; import com.google.maps.controls.NavigationControl; import com.google.maps.geom.Attitude; import mx.controls.Alert; [Bindable] private var childName:ArrayCollection; [Bindable] private var childId:ArrayCollection; private var photoFeed:ArrayCollection; private var trackinginfochild:TrackingInfo; private var arrayOfchild:Array; private var newEntry:GetSBTSMobileAuthentication; private var trackinginfo:GetSBTSTrackingInfo; private var childObj:Child; private var UserId:int; private var lat:int; private var long:int; private var latlong:LatLng; public var user:SBTSWebService; public function authentication():void { // Instantiate a new Entry object. user = new SBTSWebService(); if(user!=null) { user.addSBTSWebServiceFaultEventListener(handleFaults); user.addgetSBTSMobileAuthenticationEventListener(authenticationResult); newEntry = new GetSBTSMobileAuthentication(); if(newEntry!=null) { newEntry.mobile=mobileno.text; newEntry.password=password.text; user.getSBTSMobileAuthentication(newEntry); } } } public function handleFaults(event:FaultEvent):void { Alert.show("A fault occured contacting the server. Fault message is: " + event.fault.faultString); } public function authenticationResult(event:GetSBTSMobileAuthenticationResultEvent):void { if(event.result != null && event.result._return>0) { if(event.result._return > 0) { UserId = event.result._return; loginform.enabled = false; getChildList(UserId); viewstack2.selectedIndex=1; } else { Alert.show("Authentication fail"); } } } public function getChildList(userId:int):void { var childEntry:GetSBTSMobileChildrenInfo = new GetSBTSMobileChildrenInfo(); childEntry.UserId = userId; user.addgetSBTSMobileChildrenInfoEventListener(sbtsChildrenInfoResult); user.getSBTSMobileChildrenInfo(childEntry); } public function sbtsChildrenInfoResult(event:GetSBTSMobileChildrenInfoResultEvent):void { if( event.result._return!=null) { arrayOfchild = event.result._return as Array; photoFeed = new ArrayCollection(arrayOfchild); childName = new ArrayCollection(); for( var count:int=0;count<photoFeed.length;count++) { childObj = photoFeed.getItemAt(count,0) as Child; childName.addItem(childObj.strName); } } } private function trackingInfo():void { for( var count:int=0;count user.getSBTSTrackingInfo(trackinginfo); } } } } private function getTrackingInfo(event:GetSBTSTrackingInfoResultEvent):void { if(event.result._return != null) { trackinginfochild = event.result._return as TrackingInfo; lat = trackinginfochild.dblLatitude; long = trackinginfochild.dblLongitude; latlong = new LatLng(lat,long); } } private function onMapPreinitialize(event:MapEvent):void { var myMapOptions:MapOptions = new MapOptions(); myMapOptions.zoom = 12; myMapOptions.center = latlong; myMapOptions.mapType = MapType.NORMAL_MAP_TYPE; myMapOptions.viewMode = View.VIEWMODE_PERSPECTIVE; myMapOptions.attitude = new Attitude(20,30,0); buslocation.setInitOptions(myMapOptions); buspath.setInitOptions(myMapOptions); } private function onMapReady(event:MapEvent):void { this.buslocation.addControl(new NavigationControl()); this.buslocation.addControl( new MapTypeControl()); } ]]> <mx:Move id="hideEffect" yTo="-500" /> <mx:Move id="showEffect" xFrom="500"/> <mx:Panel width="100%" height="100%" headerColors="[#000000,#FFFFFF]" hideEffect="{hideEffect}" showEffect="{showEffect}"> <mx:TabNavigator id="viewstack2" selectedIndex="0" creationPolicy="all" width="100%" height="100%"> <mx:Form label="Login Form" id="loginform" hideEffect="{hideEffect}" showEffect="{showEffect}"> <mx:FormItem label="Mobile NO:" creationPolicy="all"> <mx:TextInput id="mobileno"/> </mx:FormItem> <mx:FormItem label="Password:" creationPolicy="all"> <mx:TextInput displayAsPassword="true" id="password" /> </mx:FormItem> <mx:FormItem> <mx:Button label="Login" click="authentication()"/> </mx:FormItem> </mx:Form> <mx:Form label="Child List" id="childForm" hideEffect="{hideEffect}" showEffect="{showEffect}"> <mx:Label width="100%" color="blue" text="Select Child."/> <mx:RadioButtonGroup id="radioGroup" itemClick="trackingInfo()"/> <mx:Repeater id="fieldRepeater" dataProvider="{childName}"> <mx:RadioButton groupName="radioGroup" label="{fieldRepeater.currentItem}" value="{fieldRepeater.currentItem}"/> </mx:Repeater> </mx:Form> <mx:Form label="Child Information" hideEffect="{hideEffect}" showEffect="{showEffect}"> <mx:FormItem> <mx:DataGrid id="childinfo"> <mx:columns> <mx:DataGridColumn headerText="Child Name" dataField="strName"/> <mx:DataGridColumn headerText="School Name" dataField="strSchoolName"/> <mx:DataGridColumn headerText="Pick Up Point" dataField="strPickUpPointName"/> <mx:DataGridColumn headerText="Drop Down Point" dataField="strDropDownPointName"/> </mx:columns> </mx:DataGrid> </mx:FormItem> <mx:FormItem> <mx:Button label="click here to see bus location"/> </mx:FormItem> </mx:Form> <mx:Form label="Bus Location" hideEffect="{hideEffect}" showEffect="{showEffect}"> <maps:Map3D xmlns:maps="com.google.maps.*" mapevent_mappreinitialize="onMapPreinitialize(event)" id="buslocation" width="100%" height="100%" url="http://code.google.com/apis/maps/" key="ABQIAAAAXuX6aG-r_N0-tQNxUEV-vRSE8al1BQssMxLXJiP75kIjR3ssLxT3D52_u94hI-dMIkD72FmnK-P4og"/> </mx:Form> <mx:Form label="Bus path" hideEffect="{hideEffect}" showEffect="{showEffect}"> <maps:Map3D xmlns:maps="com.google.maps.*" mapevent_mappreinitialize="onMapPreinitialize(event)" id="buspath" width="100%" height="100%" url="http://code.google.com/apis/maps/" key="ABQIAAAAXuX6aG-r_N0-tQNxUEV-vRSE8al1BQssMxLXJiP75kIjR3ssLxT3D52_u94hI-dMIkD72FmnK-P4og"/> </mx:Form> </mx:TabNavigator> </mx:Panel> I am getting this error :- TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.google.maps.geom::Geometry$/computeSeparatingAxes() at com.google.maps.geom::TileEnumerator/enumerateTiles() at com.google.maps.core::PerspectiveTilePane/computeOptimalSet() at com.google.maps.core::PerspectiveTilePane/render() at com.google.maps.core::PerspectiveTilePane/configure() at com.google.maps.managers::PerspectiveTileManager/updateView() at com.google.maps.managers::PerspectiveTileManager/initializePanes() at com.google.maps.managers::PerspectiveTileManager/onInitialize() at MethodInfo-190() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at com.google.maps.wrappers::BaseEventDispatcher/dispatchEvent() at com.google.maps.wrappers::EventDispatcherWrapper/dispatchEvent() at com.google.maps.core::MapImpl/size() at com.google.maps.core::MapImpl/setSize() at com.google.maps.wrappers::IMapWrapper/setSize() at com.google.maps::Map/internalSetSize() at com.google.maps::Map/onUIComponentResized() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at mx.core::UIComponent/dispatchResizeEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:7077] at mx.core::UIComponent/setActualSize()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6706] at mx.containers.utilityClasses::BoxLayout/updateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\containers\utilityClasses\BoxLayout.as:219] at mx.containers::Form/updateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\containers\Form.as:375] at mx.core::UIComponent/validateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6351] at mx.core::Container/validateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Container.as:2677] at mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:622] at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:695] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628] at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568] Please resolve my issue.

    Read the article

  • Flex AdvancedDataGrid - ColumnOrder With Formatter and ItemRenderer Question For Experts

    - by robin1126
    I have a advanceddatagrid that has around 15 columns. Some are string, some are numbers. I have shown 4 columns below. The number columns have formatting done for zero precision and 2 digits precision. The itemRenderer is just to show Blue Color if the number is +ve and Red Color if the number is -ve. It looks something like below ... I am trying to save the users setting of column order when he closes the application and reload with the same order when the user opens the applications. I am using SharedObjects and below is the code. for(var i:int=0; i< adgrid.columns.length;i++){ var columnObject:Object = new Object(); columnObject.columnDataField = adgrid.columns[i].dataField as String; columnObject.columnHeader =adgrid.columns[i].headerText as String; columnObject.width = adgrid.columns[i].width; columnArray.push(columnObject); } and then I save the columnArray to SharedObject. I retrive them using the below code for(var i:int=0;i adgrid.columns[i].dataField =columnArray[i].columnDataField; adgrid.columns[i].headerText =columnArray[i].columnHeader; adgrid.columns[i].width = columnArray[i].width; } How can I save and reload the Formatter and ItemRenderer data . I am having trouble saving the formatter and itemrenderer and reloading it again. I would really appreciate if you can shown the code. How can I reshuffle the columns but can preserve all the properties of it to the sharedobject and recover it again.

    Read the article

  • Getting gridview column value as parameter for javascript function

    - by newName
    I have a gridview with certain number of columns and the ID column where I want to get the value from is currently set to visible = false. The other column is a TemplateField column (LinkButton) and as the user clicks on the button it will grab the value from the ID column and pass the value to one of my javascript function. WebForm: <script language=javascript> function openContent(contentID) { window.open('myContentPage.aspx?contentID=' + contentID , 'View Content','left=300,top=300,toolbar=no,scrollbars=yes,width=1000,height=500'); return false; } </script> <asp:GridView ID="gvCourse" runat="server" AutoGenerateColumns="False" OnRowCommand="gvCourse_RowCommand" OnRowDataBound="gvCourse_RowDataBound" BorderStyle="None" GridLines="None"> <RowStyle BorderStyle="None" /> <Columns> <asp:TemplateField> <ItemTemplate> <asp:LinkButton ID="lnkContent" runat="server" CommandName="View" CommandArgument='<%#Eval("contentID") %>' Text='<%#Eval("contentName") %>'> </asp:LinkButton> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="contentID" HeaderText="contentID" ReadOnly="True" SortExpression="contentID" Visible="False" /> <asp:BoundField DataField="ContentName" HeaderText="ContentName" ReadOnly="True" SortExpression="ContentName" Visible="False" /> </Columns> <AlternatingRowStyle BorderStyle="None" /> Code behind: protected void gvCourse_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "View") { intID = Convert.ToInt32(e.CommandArgument); } } protected void gvCourse_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { ((LinkButton)e.Row.FindControl("lnkContent")).Attributes.Add("onclick", "return openContent('" + intID + "');"); } } right not i'm trying to get the intID based on user selected item so when the user clicks on the linkbutton it will open a popup window using javascript and the ID will be used as querystring.

    Read the article

  • Silverlight DataForm Memory Leak

    - by Andrew Garrison
    Some Background I have noticed that setting the EditTemplate of a DataForm (from the Silverlight Toolkit) can cause the DataForm to not be garbage collected. Consequently, the parent control of the DataForm cannot be garbage collected either, causing a very significant memory leak. Here's some XAML which demonstrates the case. <toolkit:DataForm HorizontalAlignment="Stretch" Margin="10" VerticalAlignment="Stretch"> <toolkit:DataForm.EditTemplate> <DataTemplate> <toolkit:DataField Label="Dummy Binding:"> <TextBox Text="{Binding DummyBinding, Mode=TwoWay}" /> </toolkit:DataField> </DataTemplate> </toolkit:DataForm.EditTemplate> </toolkit:DataForm> I have opened an issue on CodePlex. The isssue has an attachment which has a project which desmonstrates the case. So, My Question Is Has anyone else encountered this issue? More importantly, does anyone know of any workarounds? How can I force this DataForm to be garbage collected?

    Read the article

  • Binding an ASP.NET GridView Control to a string array

    - by Michael Kniskern
    I am trying to bind an ASP.NET GridView control to an string array and I get the following item: A field or property with the name 'Item' was not found on the selected data source. What is correct value I should use for DataField property of the asp:BoundField column in my GridView control. Here is my source code: ASPX page <asp:GridView ID="MyGridView" runat="server" AutoGenerateColumns="false"> <Columns> <asp:BoundField DataField="Item" /> <asp:CommandField ButtonType="Link" ShowSelectButton="true" SelectText="Click Me!" /> </Columns> </asp:GridView> Code Behind: string[] MyArray = new string[1]; MyArray[0] = "My Value"; MyGridView.DataSource = MyArray; MyGridView.DataBind(); UPDATE I need to have the AutoGenerateColumns attribute set to false because I need to generate additional asp:CommandField columns. I have updated my code sample to reflect this scenarion

    Read the article

  • Flex: Double click event propagation on datagrid dependent on component order?

    - by MyMacAndMe
    I'd like to have a double click event on a datagrid in Flex3. The following example only works if the Accordion (id = "mustBeSecond") container comes after the DataGrid. Why is the order of the components important and what can I do to prevent this behavior? (The example does not work. If you change the order of "mustBeSecond" and "gridReportConversions" the example works fine) <mx:Script> <![CDATA[ import mx.controls.Alert; import mx.collections.ArrayCollection; [Bindable] private var dp:ArrayCollection = new ArrayCollection([ {qty:1,referer:'http://google.com'}, {qty:25,referer:'http://cnn.com'}, {qty:4,referer:'http:stackoverflow.com'}]); private function refererRowDoubleClicked(e:Event):void { Alert.show("double click"); } ]]> </mx:Script> <mx:HBox width="100%" height="100%"> <mx:Accordion width="200" height="200" id="mustBeSecond"> <mx:Canvas label="Navigation Box" width="100%" height="100%"> <mx:VBox> <mx:LinkButton label="First Link" /> <mx:LinkButton label="Second Link" /> </mx:VBox> </mx:Canvas> </mx:Accordion> <mx:DataGrid id="gridReportConversions" height="100%" width="100%" dataProvider="{this.dp}" mouseEnabled="true" doubleClickEnabled="true" itemDoubleClick="refererRowDoubleClicked(event)"> <mx:columns> <mx:DataGridColumn width="75" dataField="qty" headerText="Qty" /> <mx:DataGridColumn dataField="referer" headerText="URL" /> </mx:columns> </mx:DataGrid> </mx:HBox>

    Read the article

  • Passing a LINQ DataRow Reference in a GridView's ItemTemplate

    - by Bob Kaufman
    Given the following GridView: <asp:GridView runat="server" ID="GridView1" AutoGenerateColumns="false" DataKeyNames="UniqueID" OnSelectedIndexChanging="GridView1_SelectedIndexChanging" > <Columns> <asp:BoundField HeaderText="Remarks" DataField="Remarks" /> <asp:TemplateField HeaderText="Listing"> <ItemTemplate> <%# ShowListingTitle( ( ( System.Data.DataRowView ) ( Container.DataItem ) ).Row ) %> </ItemTemplate> </asp:TemplateField> <asp:BoundField HeaderText="Amount" DataField="Amount" DataFormatString="{0:C}" /> </Columns> </asp:GridView> which refers to the following code-behind method: protected String ShowListingTitle( DataRow row ) { Listing listing = ( Listing ) row; return NicelyFormattedString( listing.field1, listing.field2, ... ); } The cast from DataRow to Listing is failing (cannot convert from DataRow to Listing) I'm certain the problem lies in what I'm passing from within the ItemTemplate, which is simply not the right reference to the current record from the LINQ to SQL data set that I've created, which looks like this: private void PopulateGrid() { using ( MyDataContext context = new MyDataContext() ) { IQueryable < Listing > listings = from l in context.Listings where l.AccountID == myAccountID select l; GridView1.DataSource = listings; GridView1.DataBind(); } }

    Read the article

  • Access to multiple ItemRenderers within an AdvancedDataGrid

    - by user310340
    I've create an AdvancedDataGrid where most of the cell are based on an ItemRenderer. The custom ItemRenderer (SoundBox) extends VBox. This custom component allow for simple changes in the background color based on user clicking on a cell. Here is the snippet of the AdvancedDataGrid (nothing too advanced): <mx:AdvancedDataGrid id="fsfw" dataProvider="{fsfWordList}" sortableColumns="false" > <mx:groupedColumns> <mx:AdvancedDataGridColumn width="35" dataField="wordcount" headerText=" "/> <mx:AdvancedDataGridColumn id="myWord" width="150" headerText="TEST ITEMS"> <mx:itemRenderer> <mx:Component> <components:SoundBox width="100%" letterSound="{data.word}" /> </mx:Component> </mx:itemRenderer> </mx:AdvancedDataGridColumn> <mx:AdvancedDataGridColumn width="200" headerText="Correct / 2 points" dataField="sound1"> <mx:itemRenderer> <mx:Component> <components:SoundBox width="100%" letterSound="{data.sound1}" pointColumn="2"/> </mx:Component> </mx:itemRenderer> </mx:AdvancedDataGridColumn> </mx:groupedColumns> </AdvancedDataGrid> What I'm trying to do is change the background color of (let's just say I have one row of data) row1, cell1 to green when the user clicks on cell3 of row1. I'm unsure as to how I get access to those items (ItemRenderer/SoundBox) within the Grid. Any Ideas? THX!

    Read the article

  • How do I expose the columns collection of GridView control that is inside a user control

    - by Christopher Edwards
    See edit. I want to be able to do this in the aspx that consumes the user control. <uc:MyControl ID="MyGrid" runat="server"> <asp:BoundField DataField="FirstColumn" HeaderText="FirstColumn" /> <asp:BoundField DataField="SecondColumn" HeaderText="SecondColumn" /> </uc> I have this code (which doesn't work). Any ideas what I am doing wrong? VB Partial Public Class MyControl Inherits UserControl <System.Web.UI.IDReferenceProperty(GetType(DataControlFieldCollection))> _ Public Property Columns() As DataControlFieldCollection Get Return MyGridView.Columns End Get Set(ByVal value As DataControlFieldCollection) ' The Columns collection of the GridView is ReadOnly, so I rebuild it MyGridView.Columns.Clear() For Each c As DataControlField In value MyGridView.Columns.Add(c) Next End Set End Property ... End Class C# public partial class MyControl : UserControl {         [System.Web.UI.IDReferenceProperty(typeof(DataControlFieldCollection))]     public DataControlFieldCollection Columns {         get { return MyGridView.Columns; }         set {             MyGridView.Columns.Clear();             foreach (DataControlField c in value) {                 MyGridView.Columns.Add(c);             }         }     } ... } EDIT: Actually it does work, but auto complete does not work between the uc:MyControl opening and closing tags and I get compiler warnings:- Content is not allowed between the opening and closing tags for element 'MyControl'. Validation (XHTML 1.0 Transitional): Element 'columns' is not supported. Element 'BoundField' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing. So I guess I need to use some sort of directive to tell the complier to expect content between the tags. Any ideas?

    Read the article

  • Flex datagrid headerColor style not working....

    - by Jerry
    Hello guys. I am trying to change the datagrid header color by editing headerColor style. I could change the font size, font family...etc except the headerColor. Would someone help me about it? Thanks a lot. My code Mxml <mx:DataGrid id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{cityinfoResult3.lastResult}"> <mx:columns> <mx:DataGridColumn headerText="Detail" dataField="detail"/> <mx:DataGridColumn headerText="Name" dataField="name"/> </mx:columns> </mx:DataGrid> Style #dataGrid{ headerColors: #ff6600; //everything works except this one. The color can't be //changed? rollOverColor: #33ccff; textRollOverColor: #ffffff; iconColor: #ff0000; fontFamily: Arial; fontSize:12; dropShadowEnabled: true; alternatingItemColors: #330099, #0000cc; color: #ffffff; borderColor: #ffffff; }

    Read the article

  • TemplateField button causing GridView Invalid Postback

    - by Carter
    Ok, so I've got a template field in a gridview that contains just a simple button... <asp:GridView ID="KeywordsGridView" AllowPaging="false" AutoGenerateColumns="false" BackColor="white" GridLines="None" HeaderStyle-CssClass="Table_Header" RowStyle-CssClass="Table_Style" runat="server"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:Button runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="References" SortExpression="References" HeaderText="Total References" /> <asp:BoundField DataField="Keyword" SortExpression="Keyword" HeaderText="Keyword" /> </Columns> </asp:GridView> Whenever I click the button I get the error... Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. I've found a decent amount of articles referencing this issue, including a couple on SO, for example... http://stackoverflow.com/questions/228969/asp-net-invalid-postback-or-callback-argument-event-validation-is-enabled-usi and... http://stackoverflow.com/questions/103560/invalid-postback-or-callback-argument I might just be misunderstanding, but as far as I can tell they don't really help me. How do I get this to go away without setting enableEventValidation="false"?

    Read the article

  • Flex : How to link data to a datagrid ?

    - by Tristan
    Hello, I'm following flex tutorials but i'm not doing exactly as they do, so : What i want I have an input text, with a button 'search'. I want when this button is clicked that the data returned by the function search are displayed in the datagrid. What i have : The text input : <s:TextInput includeIn="DetailServeurs" x="58" y="361" width="209" id="txt_search" text="Default text" focusIn="txt_search_focusInHandler(event)"/> a Search button : <s:Button includeIn="DetailServeurs" x="275" y="361" label="Rechercher" id="btn_rechercher" click="btn_rechercher_clickHandler(event)"/> a clickhandler for this search button : protected function btn_rechercher_clickHandler(event:MouseEvent):void { if(txt_search.text != ""){ getServeurByNameResult.token = serveurService.getServeurByName(txt_search.text); } } and a datagrid : <mx:DataGrid includeIn="DetailServeurs" x="30" y="124" width="1002" height="179" id="dataGrid" dataProvider="{getServeurByNameResult.lastResult}"> <mx:columns> <mx:DataGridColumn headerText="GSP_nom" dataField="GSP_nom"/> <mx:DataGridColumn headerText="port" dataField="port"/> ........ </mx:columns> </mx:DataGrid> So how can i display the results in the datagrid ? Thanks ! ;)

    Read the article

  • DataGrid - Edit the selected row when a button is clicked.

    - by Chepech
    Hi all. I have a very simple DataGrid with 2 columns, some thing like this: <mx:DataGrid id="grid" > <mx:columns> <mx:DataGridColumn dataField="name" headerText="Name"/> <mx:DataGridColumn dataField="date" headerText="Date"/> </mx:columns> </mx:DataGrid> What Im trying to do is to activate the edition of the selected row when the user clicks a button. So far I've been unable to find any example of how to do this. I already tried 6 or 7 different approaches but non works. Does any one has a clue how to do this? How do you get the selected row (NOT selectedItem) of a DataGrid and how can you: Change the ItemRenderEditor or ItemRenderer on the fly of just that row. Or enable the edition of that specific row without clicking it. This are the questions that I've been unable to answer Help will be greatly appreciated.

    Read the article

  • gridview commandargument on buttonfield pagination used

    - by ClareBear
    Hello all, I am using c#.net I have a gridview which needs to contain a 'Use' button (appointmentId set as the commandargument). Source Code <asp:GridView ID="resultsReturned" runat="server" AllowPaging="True" AutoGenerateColumns="False" EnableSortingAndPagingCallbacks="True" OnPageIndexChanged="resultsReturned_PageIndexChanged" onrowcommand="resultsReturned_RowCommand"> <Columns> <asp:BoundField DataField="UserAppointmentId" HeaderText="App ID" /> <asp:BoundField DataField="UserBookingName" HeaderText="Booking Name" /> <asp:TemplateField> <ItemTemplate> <asp:Button runat="server" ID="UseButton" Text="Use" CommandName="Use" CommandArgument="UserAppointmentId" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> Code-Behind protected void resultsReturned_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Use") { correctAppointmentID.Value = (e.CommandArgument.ToString()); } } This is used for the pagination: private void BindAppointments() { var results = appointmentRepos.GetBookingIdBySearchCriteria(catgoryid, resultsReturned.PageIndex * resultsReturned.PageSize, -1); resultsReturned.DataSource = results; resultsReturned.DataBind(); } I am binding the appointments to the gridview within the PageLoad/search_Click This is the error I am receiving: Callbacks are not supported on TemplateField because some controls cannot update properly in a callback. Turn callbacks off on 'resultsReturned'. Thanks in advance for any help Clare

    Read the article

  • Lucene (.NET) Document stucture and performance suggestions.

    - by Josh Handel
    Hello, I am indexing about 100M documents that consist of a few string identifiers and a hundred or so numaric terms.. I won't be doing range queries, so I haven't dugg too deep into Numaric Field but I'm not thinking its the right choose here. My problem is that the query performance degrades quickly when I start adding OR criteria to my query.. All my queries are on specific numaric terms.. So a document looks like StringField:[someString] and N DataField:[someNumber].. I then query it with something like DataField:((+1 +(2 3)) (+75 +(3 5 52)) (+99 +88 +(102 155 199))). Currently these queries take about 7 to 16 seconds to run on my laptop.. I would like to make sure thats really the best they can do.. I am open to suggestions on field structure and query structure :-). Thanks Josh PS: I have already read over all the other lucene performance discussions on here, and on the Lucene wiki and at lucid imiagination... I'm a bit further down the rabbit hole then that...

    Read the article

  • Flex datagrid headerColor style is not working....

    - by Jerry
    Hello guys. I am trying to change the datagrid header color by editing headerColor style. I could change the font size, font family...etc except the headerColor. Would someone help me about it? Thanks a lot. My code Mxml <mx:DataGrid id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{cityinfoResult3.lastResult}"> <mx:columns> <mx:DataGridColumn headerText="Detail" dataField="detail"/> <mx:DataGridColumn headerText="Name" dataField="name"/> </mx:columns> </mx:DataGrid> Style #dataGrid{ headerColors: #ff6600; //everything works except this one. The color can't be //changed? rollOverColor: #33ccff; textRollOverColor: #ffffff; iconColor: #ff0000; fontFamily: Arial; fontSize:12; dropShadowEnabled: true; alternatingItemColors: #330099, #0000cc; color: #ffffff; borderColor: #ffffff; }

    Read the article

  • How to display rich text in tooltip ASP.Net ?

    - by mokokamello
    Experts ! i use the following code to display a tooltip <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="AccessDataSource1"> <Columns> <asp:CommandField ShowEditButton="True" /> <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" /> <asp:BoundField DataField="datefu" HeaderText="date" SortExpression="datefu" /> <asp:TemplateField HeaderText="title" SortExpression="titlefu"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("titlefu") %>'></asp:TextBox> </EditItemTemplate> <ItemTemplate> <a href="#" title="<asp:Literal ID="Label1" runat="server" Text='<%# Eval("fu") %>'/>"/> <asp:Label ID="NamePatientLabel" runat="server" Text='<%# Eval("titlefu") %>' /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> display the following result however when i edit the text as follows (making it bold and red in another gridview containing rich text editor) i get the following (as a formatting result in the second grid view) however when i view in the first gridview to display the tooltip i get the following reult i really need your help to display the tooltip as rich text

    Read the article

  • Inconsistent behavior working with "Flex on Rails" example.

    - by kmontgom
    I'm experimenting with Flex and Rails right now (Rails is cool). I'm following the examples in the book "Flex on Rails", and I'm getting some puzzling and inconsistent behavior. Heres the Flex MXML: <mx:HTTPService id="index" url="http://localhost:3000/people.xml" resultFormat="e4x" /> <mx:DataGrid dataProvider="{index.lastResult.person}" width="100%" height="100%"> <mx:columns> <mx:DataGridColumn headerText="First Name" dataField="first-name"/> <mx:DataGridColumn headerText="Last Name" dataField="last-name"/> </mx:columns> </mx:DataGrid> <mx:Script> <![CDATA[ import mx.controls.Alert; private function main():void { Alert.show( "In main()" ); } ]]> </mx:Script> When I run the app from my IDE (Amythyst beta, also cool), the DataGrid appears, but is not populated. The Alert.show() also triggers. When I go out to a web browser and manually enter the url (http://localhost:3000/people.xml), the Mongrel console shows the request coming through and the browser shows the web response. No exceptions or other error messages occur. Whats the difference? Do I need to alter some OS setting? I'm using Win7 on an x64 machine.

    Read the article

  • ASP:GridView does not show data with ObjectdataSource

    - by Kashif
    I have been trying to bind a DataGrid with ObjectDataSource having custom paging but no output is display on my usercontrol. Here is the code I am using <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="LeadId" DataSourceID="dsBuyingLead1" AllowPaging="True"> <Columns> <asp:BoundField DataField="Subject" HeaderText="Subject" ReadOnly="True" /> <asp:BoundField DataField="ExpiryDate" HeaderText="ExpiryDate" ReadOnly="True" /> </Columns> </asp:GridView> <asp:ObjectDataSource ID="dsBuyingLead1" runat="server" EnablePaging="True" DataObjectTypeName="Modules.SearchBuyingLeadInfo" OldValuesParameterFormatString="original_{0}" SelectMethod="GetAllBuyingLeads" StartRowIndexParameterName="startRow" MaximumRowsParameterName="maximumRows" SelectCountMethod="GetAllBuyingLeadsCount" TypeName="Modules.SearchController"> <SelectParameters> <asp:QueryStringParameter Name="searchText" QueryStringField="q" Type="String" /> </SelectParameters> </asp:ObjectDataSource> Here are my methods from SearchController class: [DataObjectMethod(DataObjectMethodType.Select)] public static long GetAllBuyingLeadsCount(string searchText) { return DataProvider.Instance().GetAllBuyingLeadsCount(searchText); } [DataObjectMethod(DataObjectMethodType.Select)] public static List<SearchBuyingLeadInfo> GetAllBuyingLeads (string searchText, int startRow, int maximumRows) { List<SearchBuyingLeadInfo> l = CBO.FillCollection<SearchBuyingLeadInfo> ( DataProvider.Instance() .GetAllBuyingLeadswithText(searchText, startRow, maximumRows) ); return l; } Where SearchBuyingLeadInfo is my Data Access Object class I have verified by setting up break points that both GetAllBuyingLeadsCount and GetAllBuyingLeads return non-zero values but unfortunately nothing is displayed on the grid. Only the column headers are displayed. Can anyone tell me what am I missing?

    Read the article

  • How to parse XML to flex Data Grid contents.

    - by Jeeva
    My xml file which is in a webserver is show below. <root> <userdetails> <username>raja</username> <status>offline</status> </userdetails> <userdetails> <username>Test</username> <status>online</status> </userdetails> </root> How can i parse this to flex data grid contents. I tried with below coding < ?xml version="1.0" encoding="utf-8"? < mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="initApp()" < mx:HTTPService id="userList" result="handleData(event)" resultFormat="object" url="http://apps.facebook.com/ajparkin/user_list.xml" / <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.rpc.events.ResultEvent; import mx.controls.Alert; public function initApp():void { userList.send(); } [Bindable] var userdetailsArray:ArrayCollection; private function handleData(evt:ResultEvent):void { this.userdetailsArray= evt.result.userdetails; } ]]> </mx:Script> <mx:DataGrid dataProvider="{userdetailsArray}"> <mx:columns> <mx:DataGridColumn dataField="username" headerText="User Name"/> <mx:DataGridColumn dataField="status" headerText="Status" /> </mx:columns> </mx:DataGrid> </mx:Application> I'm getting only the field names not the data.

    Read the article

  • Flex DataGridColumn with array of objects as data provider

    - by rforte
    I have a datagrid that uses an array of objects as the data provider. The objects are essentially key/value pairs: { foo:"something"} { bar:"hello"} { caca:"lorem"} The datagrid has 2 columns. The first column is the key and the second column is the value. Right now my grid looks like: My dataFormatter function makes sure that depending on the column (i.e. the dataField value) the correct key or value gets printed out. This works fine for displaying. However, as soon as I try and edit the value field it essentially adds a new value into the object with a key of '1'. For example, if I edit the {caca:"lorem"} object it will then contain the value {caca:"lorem",1:"new value"}. Is there any possible way I can set the DataGridColumn so that when I edit a value it will update the value associated with the key rather than inserting a new value? I've tried using a custom item editor but it still does the insert. It seems like I need to be able to update the 'dataField' with the actual key value but I'm not sure how to do that.

    Read the article

  • Modify Gridview as it's being rendered through javascript

    - by JonF
    I'm trying to modify a field in each row of my gridview as it is rendered. I need to modify it with client side Javascript. I'm somewhat new to asp.net, but I think I should be doing something with clientscriptmanager. I came up with a simple scenario which is basically what I want to do to avoid getting bogged down in the details. If I could accomplish the following I could accomplish my goal. Say I have a grid view of names and salaries. I want to double each persons salary before displaying it. Obviously I can do it in the code behind, but due to the nature of the more complex actual thing I'm doing, I need to do it in javascript <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" onrowdatabound="GridView1_RowDataBound" > <Columns> <asp:BoundField HeaderText="Full Name" DataField="Name" ></asp:BoundField> <asp:BoundField HeaderText="Salary" DataField="Salary" /> </Columns>

    Read the article

  • How to get the value of a ComboBox within a DataGrid

    - by Jason Towne
    While this may be a simple problem, I'm having a heck of a time coming up with a solution. I have a DataGrid with a ComboBox as an ItemRenderer for one of my columns. When the user selects a row, I want to get the ComboBox's selected value for the selected row. Any suggestions? Some sample code: <mx:DataGrid id="myGrid" dataProvider="{myData}"> <mx:columns> <mx:DataGridColumn headerText="Column 1" dataField="dataField1" /> <mx:DataGridColumn headerText="Column 2" dataField="dataField2_Array"> <mx:itemRenderer> <mx:Component> <mx:HBox paddingLeft="5"> <mx:ComboBox id="myComboBox" dataProvider="{data.dataField2_Array}" /> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> </mx:columns> </mx:DataGrid>

    Read the article

  • Flex ItemRenderer/Editor ComboBox Issue...Puhleezz Help

    - by Mohit
    Hi EveryOne Beginner in Flex ...Even worse with item renderers... Have managed to add a Combobox to a datagrid using a itemEditor... I want to change the options in a combo box depending on the value selected by the user on a previous combo.. In the combo box i want to display a certain value (Model Name ) but for quering a table i'll pass the corresponding code of the model :(... sounds simple enough ..unfortunately not able to implement it I have found this problem on this site but the solution seems an overkill for my "small" problem..was hoping if anyone could guide me towards a more simpler solution... My xml comes as <item><mstValue>CH1</mstValue><mstRemarks>CARRIER</mstRemarks></item> <item><mstValue>CH2</mstValue><mstRemarks>TRANS</mstRemarks></item> <item><mstValue>CH3</mstValue><mstRemarks>YORK</mstRemarks></item> Now i have been able to show the values in a combo .if user selects CARRIER i want to pass CH1(dont know how to do it with itemeditors)...and then fetch values corresponding to CH1 from a table (second part of the problem)...in the sample below i used this.parentDocument.modelComboChanged(this.selectedItem) to pass the selected value ...instedd i need to pass the code for it which comes from the xml...Pls help this making me go crazy.... <mx:DataGrid id="chillerGrid" dataProvider="{chillerGridDp}" editable="true" itemRollOver="{ComponentUtil.setTooltip(event,this)}" itemRollOut="ComponentUtil.resetTooltip(event)" width="70%" height="160"> <mx:columns> <mx:DataGridColumn id="test" headerText="Model" dataField="model" editorDataField="value" editable="true" backgroundColor="#f4f2bd" width="100" > <mx:itemEditor> <mx:Component> <mx:ComboBox creationComplete="{if(text=='')selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();}" change="{if(text == ''){selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();};this.parentDocument.modelComboChanged(this.selectedItem)}" dataProvider="{this.parentDocument.arrColl1}" text="mstRemarks" labelField="mstRemarks" editable = "false" > <!--<mx:dataProvider > <mx:String></mx:String> <mx:String>Model1</mx:String> <mx:String>Model2</mx:String> <mx:String>Model3</mx:String> <mx:String>Model4</mx:String> <mx:String>Model5</mx:String> </mx:dataProvider>--> </mx:ComboBox> <!--<components:ComboBoxIn dataProvider="{this.parentDocument.arrColl1}" labelField="mstRemarks" /> --> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> <mx:DataGridColumn headerText="Make" dataField="make" editorDataField="value" editable="true" backgroundColor="#f4f2bd" width="100" > <mx:itemEditor> <mx:Component> <mx:ComboBox creationComplete="{if(text=='')selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();}" change="{if(text == ''){selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();} }" labelField="@label" editable = "false" > <mx:dataProvider> <mx:String></mx:String> <mx:String>Carrier</mx:String> <mx:String>York</mx:String> <mx:String>Trane</mx:String> </mx:dataProvider> </mx:ComboBox> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> <mx:DataGridColumn headerText="Chillers" dataField="chillers" width="200" editable="true"> <mx:itemEditor> <mx:Component> <mx:TextInput maxChars="49" /> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> </mx:columns> </mx:DataGrid>

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >