Search Results

Search found 192 results on 8 pages for 'ashish aggarwal'.

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

  • Problem in DataBinding an Enum using dictionary approach to a combobox in WPF.

    - by Ashish Ashu
    I have a Dictionary which is binded to a combobox. I have used dictionary to provide spaces in enum. public enum Option {Enter_Value, Select_Value}; Dictionary<Option,string> Options; <ComboBox x:Name="optionComboBox" SelectionChanged="optionComboBox_SelectionChanged" SelectedValuePath="Key" DisplayMemberPath="Value" SelectedItem="{Binding Path = SelectedOption}" ItemsSource="{Binding Path = Options}" /> This works fine. My queries: 1. I am not able to set the initial value to a combo box. In above XAML snippet the line SelectedItem="{Binding Path = SelectedOption}" is not working. I have declared SelectOption in my viewmodel. This is of type string and I have intialized this string value in my view model as below: SelectedOption = Options[Options.Enter_Value].ToString(); 2. The combobox is binded to datadictionary which have two options first is "Enter_value" and second is "Select_value" which is actually Option enum. Based on the Option enum value I want to perform different action. For example if option is equal to option.Enter_value then Combo box becomes editable and user can enter the numeric value in it. if option is equal to option.Select_value value then the value comes from the database and the combo box becomes read only and shows the fetched value from the database. Please Help!!

    Read the article

  • How to Validate an XML Node against an XSD in C++?

    - by Ashish
    Hi Please note that I'm asking for validation against a particular node and not the whole file. For examples <somexmldoc> <someNode> <UserDefinedNode> </> <UserDefinedNode> </> </someNode> </somexmldoc> For this XML doc, I have an wholeDoc.XSD which could be used to validate the whole document except "UserDefinedNode" (This node is specified with "any" tag in xsd, which allows a user to define anything under that node). Is it possible to have a separate userdefined.XSD file to validate "UserDefinedNode"? Is it possible to use MSXML for C++ (IXMLDomDocument) to validate this? Thanks!

    Read the article

  • why does the array doesn't get initialized by global variable , even though it should not?

    - by ashish yadav
    why does the array a does not get initialized by global variable 'size'. include int size=5; int main() { int a[size]={1,2,3,4,5}; printf("%d",a[0]); return 0; } the compilation error is shown as "variable-sized object may not be initialized". according to me the array should get initialized by 'size'. i apologize if i am not clear but i feel i have expressed myself well enough. thank you!!!!!!!!!!!

    Read the article

  • Vertically align UILabel

    - by Ashish Agarwal
    I am trying to vertically align the text in the UILabel view of my app. The problem is that I want the text to be vertically aligned to the top and the size of the label to be 280 x 150. I am only able to achieve one of these 2 things. If I remove the line [myLabel sizeToFit]; then the alignment of the text is alright but the size is messed up. But if I add the above line, then the alignment is messed up but the size is alright. How do I fix this problem. I've added the code below - CGRect labelFrame = CGRectMake(22, 50, 280, 150); UILabel *myLabel = [[UILabel alloc] initWithFrame:labelFrame]; [myLabel setText:finalRecipe]; [myLabel setBackgroundColor: [UIColor lightGrayColor]]; [myLabel setNumberOfLines:0]; [myLabel sizeToFit]; [self.view addSubview:myLabel];

    Read the article

  • Why the databinding fails in ListView (WPF) ?

    - by Ashish Ashu
    I have a ListView of which ItemSource is set to my Custom Collection. I have defined a GridView CellTemplate that contains a combo box as below : <ListView MaxWidth="850" Grid.Row="1" SelectedItem="{Binding Path = SelectedCondition}" ItemsSource="{Binding Path = Conditions}" FontWeight="Normal" FontSize="11" Name="listview"> <ListView.View> <GridView> <GridViewColumn Width="175" Header="Type"> <GridViewColumn.CellTemplate> <DataTemplate> <ComboBox Style="{x:Null}" x:Name="TypeCmbox" Height="Auto" Width="150" SelectedValuePath="Key" DisplayMemberPath="Value" SelectedItem="{Binding Path = MyType}" ItemsSource="{Binding Path = MyTypes}" HorizontalAlignment="Center" /> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </ListView> My Custom collection is the ObservableCollection. I have a two buttons - Move Up and Move Down on top of the listview control . When user clicks on the Move Up or Move Down button I call MoveUp and MoveDown methods of Observable Collection. But when I Move Up and Move Down the rows then the Selected Index of a combo box is -1. I have ensured that selectedItem is not equal to null when performing Move Up and Move Down commands. Please Help!!

    Read the article

  • Why we can't we overload "=" using friend function?

    - by ashish-sangwan
    Why it is not allowed to overload "=" using friend function? I have written a small program but it is giving error. class comp { int real; int imaginary; public: comp(){real=0; imaginary=0;} void show(){cout << "Real="<<real<<" Imaginary="<<imaginary<<endl;} void set(int i,int j){real=i;imaginary=j;} friend comp operator=(comp &op1,const comp &op2); }; comp operator=(comp &op1,const comp &op2) { op1.imaginary=op2.imaginary; op1.real=op2.real; return op1; } int main() { comp a,b; a.set(10,20); b=a; b.show(); return 0; } The compilation gives the following error :- [root@dogmatix stackoverflow]# g++ prog4.cpp prog4.cpp:11: error: ‘comp operator=(comp&, const comp&)’ must be a nonstatic member function prog4.cpp:14: error: ‘comp operator=(comp&, const comp&)’ must be a nonstatic member function prog4.cpp: In function ‘int main()’: prog4.cpp:25: error: ambiguous overload for ‘operator=’ in ‘b = a’ prog4.cpp:4: note: candidates are: comp& comp::operator=(const comp&) prog4.cpp:14: note: comp operator=(comp&, const comp&)

    Read the article

  • How to restrict focus in textbox

    - by Ashish Singhal
    I have a dialog with few controls. There is a TextBox named txtControl and two Buttons Accept and Cancel. I want that once the focus is in txtControl, the focus should not go away, until I click on Accept or Cancel button. If I try to click on any other control without clicking on Accept or Cancel button, then focus should remains in txtControl. Also I don't want to disable or gay out other controls.

    Read the article

  • How can I change column fore color in DataGridview as per condition?

    - by Ashish
    hi, i have one table like employee and one of its row is 'status' if status value is 'approve' then i want to show that row in green color and else i want to show it in red color. i have tried following but not working if (e.Row.RowType == DataControlRowType.Header) { string status = DataBinder.Eval(e.Row.DataItem, "IsApprove").ToString(); if (status == "pending") { e.Row.ForeColor = System.Drawing.Color.Red; // Change the row's Text color } } ALSO THIS ONE private void gvleavedetail_cellformatting(object sender, datagridviewcellformattingeventargs e) { // if the column is the artist column, check the // value. if (this.gvleavedetail.columns[e.columnindex].name == "artist") { if (e.value != null) { // check for the string "pink" in the cell. string stringvalue = (string)e.value; stringvalue = stringvalue.tolower(); if (stringvalue == "high") { e.cellstyle.backcolor = color.pink; } } } But in this case i'm getting error for datagridviewcellformattingeventargs I'm using VS2010

    Read the article

  • What is the difference between binding data in data grid view methods ??

    - by Ashish
    What is the difference between binding data in data grid view methods ?? <ItemTemplate> <asp:LinkButton ID="lnkBtnUserName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"UserFirstName")%>' CommandArgument='<%# Eval("UserID") %>' OnClick="lnkBtnUserName_Click" /> </ItemTemplate> and this second one <asp:TemplateField HeaderText="Employee ID"> <ItemTemplate> <asp:Label ID="lblempid" runat="server" Text='<%# Bind("EmpId.EmpId") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> means in method 1 Text='<%# DataBinder.Eval(Container.DataItem,"UserFirstName")%>' CommandArgument='<%# Eval("UserID") %>' method 2 Text='<%# Bind("EmpId.EmpId") also explain use one this CommandArgument='<%# Eval("UserID") in 1st one ????

    Read the article

  • wix sfxca binding to CLR v 2.0 instead of v4.0

    - by ashish.s
    Iam building managed custom actions using .net 4.0, but when i package the installer and run it,it fails giving me "assembly is built by newer version" error. In the install log I can also see that the SfxCA is binding to v2.0 instead of 4.0, how can i configure it so it loads the v 4.0 version many thanks

    Read the article

  • dreferencing 2 d array

    - by ashish-sangwan
    Please look at this peice of code :- #include<stdio.h> int main() { int arr[2][2]={1,2,3,4}; printf("%d %u %u",**arr,*arr,arr); return 0; } When i compiled and executed this program i got same value for arr and *arr which is the starting address of the 2 d array. For example:- 1 3214506 3214506 My question is why does dereferencing arr ( *arr ) does not print the value stored at the address contained in arr ?

    Read the article

  • onActivityResult on tabwidget

    - by Ashish Rana
    I am new in android development. I am not getting call onActivityResult method. @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { System.out.println("================================"); if(resultCode==RESULT_OK) { Toast.makeText(TaskListActivity.this, "Pass", Toast.LENGTH_LONG).show(); } else{ Toast.makeText(TaskListActivity.this, "Fail", Toast.LENGTH_LONG).show(); } }

    Read the article

  • Is it possible to apply NOT(!) operator while DataBinding a property of a control ?

    - by Ashish Ashu
    I have Button control and I have to set the IsEanbled property based on the bool variable. bool IsBoolVariable I want if IsBoolVariable property is true then I want to set the IsEnabled property to false AND when IsBoolVariable property is false then I want to set the IsEnabled property to true. Is it possible to apply not(!) operator while defining the binding as given below <Button IsEnabled = "{Binding Path = **!**IsBoolVariable}" /> I can very well do that by applying convertors , but that is the only way to do that?

    Read the article

  • Oracle-AmberPoint Webcast: Learn How Your Business Can Profit from the Combination

    - by jyothi.swaroop
    With the recent acquisition of AmberPoint, Oracle now offers an enhanced end-to-end SOA solution that features runtime governance, business transaction management, and cross-platform management capabilities. Put that solution to work and your business can achieve lower costs of implementation and higher profit. Join Ed Horst, Vice President, Oracle (former CMO of AmberPoint), and Ashish Mohindroo, Senior Director, Product Marketing, Oracle, as they discuss in this live Webcast the customer advantages of the Oracle and AmberPoint combination. Learn how our SOA solutions with AmberPoint capabilities can help you: Achieve more agility and visibility into your business processes Increase control and performance of critical applications Improve performance and reduce IT costs to benefit your bottom line Register for the Live Webcast Event Date: Thursday, May 20, 2010 Time: 10 a.m. PT/1 p.m. ET

    Read the article

  • Time out while mounting samba share

    - by nullDev
    I am trying to mount a hard-disk connected to my WDTV Live box. The following command smbclient -L 192.168.1.2 -U guest gives the following output: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.5.1] Sharename Type Comment --------- ---- ------- Expansion_Drive Disk Expansion_Drive MICROVAULT Disk MICROVAULT IPC$ IPC IPC Service (WDTV LIVE) Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.5.1] Server Comment --------- ------- WDTVLIVE WDTV LIVE Workgroup Master --------- ------- WORKGROUP But if I try sudo smbmount //WDTVLIVE/Expansion_Drive /home/ashish/wdtvlive/ -o guest,rw I get the following: Warning: mapping 'guest' to 'guest,sec=none' mount error(110): Connection timed out Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) I am able to browse and mount through Nautilus as well, but I dont want the drive to be mounted at gvfs.

    Read the article

  • combo box dropdown position

    - by Mironline
    dear friends I have a maximum size form which has the combobox (docked in top-right) and the combobox width is set to 500 px. now , the dropdown appear out of the screen , I want to set he dropdown position to start from right side to left side; // I use the visual studio 2008 and C# language // // thank you ashish yadav thank you . -mironline

    Read the article

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