I am trying to add a 'Save' Button for every row that exsists in a datagrid. On clicking the button I want a popup to ask the users to confirm and save the changes done to the fields in that row. Is this possible in Infragistics Datagrid or Datapresenter?
Thanks.
Hello,
I haven't look at the exact code of the XamShowCase sample, but it looks that this is the ForestGreen theme from our external theme assemblies. You can change it to Office2kBlue and RolayeStong from the Select Theme button. This theme would be added in the form of resource dictionaries to the application.
Regarding the button, what could have happened is that the FieldLayout is not correct anymore. From what I can see, you are using an Field instead of UnboundField. Please note that Fields' names must match the names of the public properties of the underlying source object. For a save button field, which is probably not a property of your source object, you would have to use an UnboundField. The styles looks correctly defined except I am not sure why you have commented out the ControlTemplate tags
I figured out setting the Theme will set the Label header. I am still not able to make the button in a cell work.
I also have another question on a slightly different topic -
I was going through the XamShowcase example and I like the way infragistics have implemented the Label Header in the Green Theme.
But I am not able to figure out how you are implementing the Label Header Style .
Isn't this generally done by setting the LabelPresenter Style ? Because I dont see this being set anywhere in the xamshowcase code.
Thanks for the reply.
I think I am implementing it the same way. When I add the Save Field to the Presenter all the Cells disappear from the table. Do you see something wrong with the code?
In xamDataPresenter.zResources :
<Style x:Key="SaveButton" TargetType="{x:Type igDP:CellValuePresenter}"> <Setter Property="Template"> <Setter.Value> <!--<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">--> <Button x:Name="Save" Content="Save" Width="Auto" Height="20" /> <!--</ControlTemplate>--> </Setter.Value> </Setter> </Style>
In xamDataPresenter. Fields : <igDP:Field Label ="Save"> <igDP:Field.Settings> <igDP:FieldSettings CellValuePresenterStyle="{StaticResource SaveButton}"CellHeight="12" CellWidth="50" /> </igDP:Field.Settings> </igDP:Field>
Yes, this is possible. You can create a style for the CellValuePresenter and put a button in its template. This style is to be applied the the button field's settings -> CellValuePresenterStyle property. Then you can create a custom command or just an event handler for the Click of the button and show the confirmation popup.